{
  "openapi": "3.1.0",
  "info": {
    "title": "Lega Calcio a 8 — Platform API",
    "version": "0.0.0",
    "description": "Multi-tenant platform API. Public endpoints expose only public-safe payloads; management endpoints require tenant-bound API keys and scopes. P00 ships the skeleton; concrete endpoints are added per phase."
  },
  "servers": [
    {
      "url": "http://localhost:4000",
      "description": "Local development"
    }
  ],
  "paths": {
    "/health": {
      "get": {
        "summary": "Health check",
        "tags": [
          "platform"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/public/teams/{teamId}": {
      "get": {
        "summary": "Public team profile",
        "tags": [
          "public"
        ],
        "security": [
          {
            "ApiKey": [
              "read:public.teams"
            ]
          }
        ],
        "parameters": [
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Public team",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicTeam"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/public/matches/{matchId}": {
      "get": {
        "summary": "Public match (current display state)",
        "tags": [
          "public"
        ],
        "security": [
          {
            "ApiKey": [
              "read:public.matches"
            ]
          }
        ],
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Public match",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicMatch"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/platform-authority-config": {
      "get": {
        "summary": "Read the versioned server authority and capability graph",
        "tags": [
          "admin",
          "platform",
          "capabilities"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Platform authority configuration",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformAuthorityConfigResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/api-keys": {
      "get": {
        "summary": "List API keys (operator view; no plaintext)",
        "tags": [
          "admin",
          "api-keys"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "List of API key rows (no plaintext or hash)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "internal",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal"
      },
      "post": {
        "summary": "Create an API key (reveal-once plaintext in response)",
        "tags": [
          "admin",
          "api-keys"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiKeyCreateRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created key + reveal-once plaintext",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyCreateResponse"
                }
              }
            },
            "headers": {
              "Cache-Control": {
                "description": "Reveal-once credentials must not be stored by clients or intermediaries.",
                "schema": {
                  "type": "string",
                  "example": "private, no-store, max-age=0"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "internal",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/api-keys/{keyId}/rotate": {
      "post": {
        "summary": "Rotate API key (issues new plaintext; prior marked rotated)",
        "tags": [
          "admin",
          "api-keys"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "keyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "New key + reveal-once plaintext",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyRotateResponse"
                }
              }
            },
            "headers": {
              "Cache-Control": {
                "description": "Reveal-once credentials must not be stored by clients or intermediaries.",
                "schema": {
                  "type": "string",
                  "example": "private, no-store, max-age=0"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "internal",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/api-keys/{keyId}/revoke": {
      "post": {
        "summary": "Revoke API key (reason required)",
        "tags": [
          "admin",
          "api-keys"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "keyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiKeyRevokeRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Revoked key row",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyRow"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "internal",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/widgets": {
      "get": {
        "summary": "List widget configs",
        "tags": [
          "admin",
          "widgets"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Widget configs",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WidgetConfigList"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "internal",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal"
      },
      "post": {
        "summary": "Upsert widget config (publish/revoke audited separately)",
        "tags": [
          "admin",
          "widgets"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WidgetConfigUpsert"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Saved widget config",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WidgetConfigRow"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "internal",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/public/fantasy/leagues": {
      "get": {
        "summary": "List public fantasy leagues for the API-key tenant",
        "tags": [
          "public",
          "fantasy"
        ],
        "security": [
          {
            "ApiKey": [
              "read:public.fantasy"
            ]
          }
        ],
        "parameters": [
          {
            "name": "season_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 50
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Public fantasy league directory",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicFantasyLeagueDirectory"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "public",
        "x-rate-limit-tier": "public_widget",
        "x-audit-required": false,
        "x-privacy-classification": "public"
      }
    },
    "/public/fantasy/leagues/{leagueId}": {
      "get": {
        "summary": "Read final public standings for one fantasy league",
        "tags": [
          "public",
          "fantasy"
        ],
        "security": [
          {
            "ApiKey": [
              "read:public.fantasy"
            ]
          }
        ],
        "parameters": [
          {
            "name": "leagueId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 50
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "team_cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Public fantasy standings",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicFantasyLeagueDetail"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "public",
        "x-rate-limit-tier": "public_widget",
        "x-audit-required": false,
        "x-privacy-classification": "public"
      }
    },
    "/public/widgets/{kind}/{subject_id}": {
      "get": {
        "summary": "Serve a public widget payload (public-safe projection)",
        "tags": [
          "public",
          "widgets"
        ],
        "security": [
          {
            "ApiKey": [
              "read:public.standings",
              "read:public.matches",
              "read:public.teams",
              "read:public.players",
              "read:public.fantasy"
            ]
          }
        ],
        "parameters": [
          {
            "name": "kind",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "standings",
                "next_matches",
                "last_results",
                "top_scorers",
                "live_ticker",
                "team_card",
                "fantasy_leaderboard"
              ]
            }
          },
          {
            "name": "subject_id",
            "in": "path",
            "required": true,
            "description": "Tournament id for sport widgets; league id for `fantasy_leaderboard`.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Public widget payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WidgetPayloadResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "public",
        "x-rate-limit-tier": "public_widget",
        "x-audit-required": false,
        "x-privacy-classification": "public"
      }
    },
    "/admin/white-label": {
      "get": {
        "summary": "Read tenant base white-label branding",
        "tags": [
          "admin",
          "white-label"
        ],
        "security": [
          {
            "Bearer": [],
            "ApiKey": [
              "admin:tenant.white_label"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Tenant base brand (nullable until configured)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WhiteLabelBaseResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "internal",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal"
      },
      "post": {
        "summary": "Upsert tenant base white-label branding",
        "tags": [
          "admin",
          "white-label"
        ],
        "security": [
          {
            "Bearer": [],
            "ApiKey": [
              "admin:tenant.white_label"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WhiteLabelBaseUpsert"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Saved tenant base brand",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WhiteLabelBaseRow"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "internal",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/home-spotlight": {
      "get": {
        "summary": "Read the Home spotlight decision for one city (or the tenant default)",
        "tags": [
          "admin",
          "white-label"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Resolved config, match picker candidates and per-city preview",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HomeSpotlightAdminResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "internal",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal"
      },
      "put": {
        "summary": "Publish the Home spotlight decision (auto / pinned / hidden) for one city",
        "tags": [
          "admin",
          "white-label"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/HomeSpotlightUpsertRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Saved decision with the refreshed preview",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HomeSpotlightAdminResponse"
                }
              }
            }
          },
          "422": {
            "description": "Pin missing, or a gara this city cannot show (home_spotlight_match_invalid)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "internal",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/white-label/atomic": {
      "get": {
        "summary": "Read the authoritative per-organization white-label aggregate and ETag",
        "tags": [
          "admin",
          "white-label"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Atomic white-label aggregate",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WhiteLabelAtomicAggregateResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "internal",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal"
      },
      "put": {
        "summary": "Atomically save per-organization white-label base and extras with ETag CAS",
        "tags": [
          "admin",
          "white-label"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WhiteLabelAtomicUpsert"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Atomic white-label mutation receipt",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WhiteLabelAtomicResponse"
                }
              }
            }
          },
          "409": {
            "description": "Stale ETag or idempotency-key payload conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "internal",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/public/theme": {
      "get": {
        "summary": "Resolve the public white-label theme for the API-key tenant",
        "tags": [
          "public",
          "white-label"
        ],
        "security": [
          {
            "ApiKey": [
              "read:public.theme"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Resolved public-safe theme",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicTheme"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "public",
        "x-rate-limit-tier": "public_widget",
        "x-audit-required": false,
        "x-privacy-classification": "public"
      }
    },
    "/public/demo/mobile-session": {
      "post": {
        "summary": "Exchange a staging demo role for a mobile session bearer",
        "tags": [
          "public",
          "demo"
        ],
        "security": [
          {
            "ApiKey": [
              "read:public.theme"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MobileDemoSessionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Scoped staging demo mobile session",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MobileDemoSessionResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "public",
        "x-rate-limit-tier": "public_widget",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/white-label-extras": {
      "get": {
        "summary": "List per-org white-label extras (subdomain, modules, sponsor slots)",
        "tags": [
          "admin",
          "white-label"
        ],
        "security": [
          {
            "Bearer": [],
            "ApiKey": [
              "admin:tenant.white_label"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "White-label extras",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WhiteLabelExtrasList"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "internal",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal"
      },
      "post": {
        "summary": "Upsert per-org white-label extras (emits white_label.updated)",
        "tags": [
          "admin",
          "white-label"
        ],
        "security": [
          {
            "Bearer": [],
            "ApiKey": [
              "admin:tenant.white_label"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WhiteLabelExtrasUpsert"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Saved row",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WhiteLabelExtrasRow"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "internal",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/affiliations/transfers": {
      "get": {
        "summary": "List affiliation transfer events (append-only)",
        "tags": [
          "admin",
          "affiliations"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Transfers",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AffiliationTransferList"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "internal",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal"
      },
      "post": {
        "summary": "Propose a new affiliation transfer",
        "tags": [
          "admin",
          "affiliations"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AffiliationTransferCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Proposed transfer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AffiliationTransfer"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "internal",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/affiliations/transfers/{transferId}/decide": {
      "post": {
        "summary": "Decide (accept | reject) a proposed transfer",
        "tags": [
          "admin",
          "affiliations"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "transferId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AffiliationTransferDecide"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Decided transfer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AffiliationTransfer"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "internal",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/affiliations/transfers/{transferId}/apply": {
      "post": {
        "summary": "Apply an accepted transfer and re-point current org-owned entities",
        "tags": [
          "admin",
          "affiliations"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "transferId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Applied transfer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AffiliationTransfer"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "internal",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/affiliations/transfers/{transferId}/history": {
      "get": {
        "summary": "Read lineage history for every entity moved by a transfer",
        "tags": [
          "admin",
          "affiliations"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "transferId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Transfer entity lineage history",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AffiliationTransferHistoryList"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "internal",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/affiliations/transfers/{transferId}/rollback": {
      "post": {
        "summary": "Roll back an applied transfer (reason required)",
        "tags": [
          "admin",
          "affiliations"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "transferId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AffiliationTransferRollback"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Rolled-back transfer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AffiliationTransfer"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "internal",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/me/media/rights-policy": {
      "get": {
        "summary": "Read the authoritative rights policy for an owned media target",
        "tags": [
          "self-service",
          "media"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "binding_kind",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "team_logo",
                "player_photo",
                "match_media"
              ]
            }
          },
          {
            "name": "target_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Versioned consumer-media rights policy",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConsumerMediaRightsPolicy"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "self",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/me/media/uploads/preflight": {
      "post": {
        "summary": "Validate an owned media upload and mint a payload-bound preflight receipt",
        "tags": [
          "self-service",
          "media"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConsumerMediaPreflightRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Durable upload preflight receipt",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConsumerMediaPreflightResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "self",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/me/media/uploads": {
      "get": {
        "summary": "List the caller's owned personalization uploads",
        "tags": [
          "self-service",
          "media"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "binding_kind",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "team_logo",
                "player_photo",
                "match_media"
              ]
            }
          },
          {
            "name": "target_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Owned consumer uploads",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConsumerMediaUploadList"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "internal",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal"
      },
      "post": {
        "summary": "Upload a team logo or claimed-player photo for moderation",
        "description": "Bounded authenticated image gateway. Team scope and claimed-player ownership are server-derived; the asset remains pending until operator approval.",
        "tags": [
          "self-service",
          "media"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConsumerMediaUploadRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Pending consumer upload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConsumerMediaUploadStatus"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "internal",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/me/media/uploads/{mediaId}/withdraw": {
      "post": {
        "summary": "Withdraw an owned consumer-media upload using CAS",
        "tags": [
          "self-service",
          "media"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "mediaId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConsumerMediaWithdrawRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Withdrawn upload with durable receipt",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConsumerMediaUploadStatus"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "self",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/me/media/tags": {
      "get": {
        "summary": "List the caller's player-tagged media consent rows",
        "tags": [
          "self-service",
          "media"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Own media tag consents",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeMediaTagConsentList"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "internal",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/me/media/tags/{tagId}/consent": {
      "post": {
        "summary": "Grant or revoke publication consent for the caller's own media tag",
        "tags": [
          "self-service",
          "media"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "tagId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MeMediaTagConsentUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated media tag consent",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeMediaTagConsentRow"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "internal",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/media": {
      "get": {
        "summary": "List operator-safe media assets, one signed page at a time",
        "tags": [
          "admin",
          "media"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 400
            },
            "description": "Opaque cursor returned as next_cursor by the previous page."
          },
          {
            "name": "ids",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated asset ids (at most 100); not combinable with cursor."
          },
          {
            "name": "preview",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "sign",
                "omit"
              ],
              "default": "sign"
            },
            "description": "omit: the whole library without signed previews (matching/counting only)."
          }
        ],
        "responses": {
          "200": {
            "description": "Media list",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminMediaAssetList"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "internal",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/media/tag-subjects": {
      "get": {
        "summary": "List minimal, currently eligible media tag subjects",
        "tags": [
          "admin",
          "media"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Media tag subject options",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MediaTagSubjectOptionList"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "internal",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/media/upload": {
      "post": {
        "summary": "Upload a bounded media image through the authenticated LC8 gateway",
        "tags": [
          "admin",
          "media"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MediaGatewayUploadRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Uploaded asset",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminMediaAssetRow"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/media/presign": {
      "post": {
        "summary": "Create a short-lived, tenant-bound media upload grant",
        "description": "Deprecated compatibility path. Production refuses direct grants; clients must use POST /admin/media/upload.",
        "deprecated": true,
        "tags": [
          "admin",
          "media"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MediaPresignRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Short-lived upload grant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MediaPresignResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Missing media.publish authority or media_feed entitlement",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "410": {
            "description": "Direct upload grants are disabled in production",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/media/{mediaId}/tags": {
      "post": {
        "summary": "Add a tag to a media asset (player tags require consent)",
        "tags": [
          "admin",
          "media"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "mediaId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MediaTagAddRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created tag",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminMediaTagRow"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "internal",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/media/tags/{tagId}/remove": {
      "post": {
        "summary": "Remove a media tag (reason required)",
        "tags": [
          "admin",
          "media"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "tagId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MediaTagRemoveRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Removed tag (append-only)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminMediaTagRow"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "internal",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/media/rights-attestation": {
      "post": {
        "summary": "Attest publication rights for one or many media assets",
        "description": "The operator path for setting rights_state=licensed_verified. Requires media.rights.review; records the attester identity, basis and timestamp and emits media.rights.attested per asset. The separate consumer upload path accepts only an explicit, narrowly scoped captain/player attestation; moderation, processing and tag consent never infer rights.",
        "tags": [
          "admin",
          "media"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MediaRightsAttestationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Attested and skipped assets",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MediaRightsAttestationResult"
                }
              }
            }
          },
          "403": {
            "description": "Missing media.rights.review authority",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/media/{mediaId}/reprocess": {
      "post": {
        "summary": "Requeue a failed media asset for processing",
        "description": "Moves processing_status failed → queued so the media worker retries. Re-checks player tag consent first and emits media.processing.requeued.",
        "tags": [
          "admin",
          "media"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "mediaId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Requeued asset",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminMediaAssetRow"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/media/{mediaId}/moderation": {
      "post": {
        "summary": "Decide moderation state (pending → approved | rejected → taken_down)",
        "tags": [
          "admin",
          "media"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "mediaId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MediaModerationDecideRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated asset",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminMediaAssetRow"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "internal",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/public/feed": {
      "get": {
        "summary": "Public event-generated feed (active posts only; public-safe projection)",
        "tags": [
          "public",
          "feed"
        ],
        "security": [
          {
            "ApiKey": [
              "read:public.media"
            ]
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 100
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 400
            },
            "description": "Opaque cursor returned as next_cursor by the previous page."
          }
        ],
        "responses": {
          "200": {
            "description": "Public feed posts (no tenant/audit/source ids)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicFeedPostList"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "public",
        "x-rate-limit-tier": "public_widget",
        "x-audit-required": false,
        "x-privacy-classification": "public"
      }
    },
    "/public/feed/{feedPostId}": {
      "get": {
        "summary": "Public feed permalink detail (active posts only; public-safe projection)",
        "tags": [
          "public",
          "feed"
        ],
        "security": [
          {
            "ApiKey": [
              "read:public.media"
            ]
          }
        ],
        "parameters": [
          {
            "name": "feedPostId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Public feed post (no tenant/audit/source ids)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicFeedPostRow"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "public",
        "x-rate-limit-tier": "public_widget",
        "x-audit-required": false,
        "x-privacy-classification": "public"
      }
    },
    "/public/sponsors/{campaignId}/impression": {
      "post": {
        "summary": "Record an aggregate sponsor VIEW (impression). served_on is server-derived UTC. Never counts a click.",
        "tags": [
          "public",
          "sponsors"
        ],
        "security": [
          {
            "ApiKey": [
              "read:public.media"
            ]
          }
        ],
        "parameters": [
          {
            "name": "campaignId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SponsorImpressionRequest"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Aggregate impression recorded",
            "headers": {
              "Cache-Control": {
                "description": "Public API-key responses must not be stored or shared across tenants.",
                "schema": {
                  "type": "string",
                  "example": "private, no-store, max-age=0"
                }
              },
              "Vary": {
                "description": "The opaque public API key selects the tenant-scoped response.",
                "schema": {
                  "type": "string",
                  "example": "X-LC8-Api-Key"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "headers": {
              "Cache-Control": {
                "description": "Public API-key responses must not be stored or shared across tenants.",
                "schema": {
                  "type": "string",
                  "example": "private, no-store, max-age=0"
                }
              },
              "Vary": {
                "description": "The opaque public API key selects the tenant-scoped response.",
                "schema": {
                  "type": "string",
                  "example": "X-LC8-Api-Key"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "headers": {
              "Cache-Control": {
                "description": "Public API-key responses must not be stored or shared across tenants.",
                "schema": {
                  "type": "string",
                  "example": "private, no-store, max-age=0"
                }
              },
              "Vary": {
                "description": "The opaque public API key selects the tenant-scoped response.",
                "schema": {
                  "type": "string",
                  "example": "X-LC8-Api-Key"
                }
              }
            }
          },
          "403": {
            "description": "Public API key lacks required media scope/module",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "headers": {
              "Cache-Control": {
                "description": "Public API-key responses must not be stored or shared across tenants.",
                "schema": {
                  "type": "string",
                  "example": "private, no-store, max-age=0"
                }
              },
              "Vary": {
                "description": "The opaque public API key selects the tenant-scoped response.",
                "schema": {
                  "type": "string",
                  "example": "X-LC8-Api-Key"
                }
              }
            }
          },
          "404": {
            "description": "Sponsor campaign not eligible for this tenant/slot",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "headers": {
              "Cache-Control": {
                "description": "Public API-key responses must not be stored or shared across tenants.",
                "schema": {
                  "type": "string",
                  "example": "private, no-store, max-age=0"
                }
              },
              "Vary": {
                "description": "The opaque public API key selects the tenant-scoped response.",
                "schema": {
                  "type": "string",
                  "example": "X-LC8-Api-Key"
                }
              }
            }
          },
          "429": {
            "description": "Public beacon rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "headers": {
              "Cache-Control": {
                "description": "Public API-key responses must not be stored or shared across tenants.",
                "schema": {
                  "type": "string",
                  "example": "private, no-store, max-age=0"
                }
              },
              "Vary": {
                "description": "The opaque public API key selects the tenant-scoped response.",
                "schema": {
                  "type": "string",
                  "example": "X-LC8-Api-Key"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "headers": {
              "Cache-Control": {
                "description": "Public API-key responses must not be stored or shared across tenants.",
                "schema": {
                  "type": "string",
                  "example": "private, no-store, max-age=0"
                }
              },
              "Vary": {
                "description": "The opaque public API key selects the tenant-scoped response.",
                "schema": {
                  "type": "string",
                  "example": "X-LC8-Api-Key"
                }
              }
            }
          }
        },
        "x-tenant-scope": "public",
        "x-rate-limit-tier": "public_widget",
        "x-audit-required": true,
        "x-privacy-classification": "public"
      }
    },
    "/public/sponsors/{campaignId}/click": {
      "post": {
        "summary": "Record an aggregate sponsor CLICK. Requires the single-use HMAC click_token issued with the served placement. Never counts an impression.",
        "tags": [
          "public",
          "sponsors"
        ],
        "security": [
          {
            "ApiKey": [
              "read:public.media"
            ]
          }
        ],
        "parameters": [
          {
            "name": "campaignId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SponsorClickRequest"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Aggregate click recorded",
            "headers": {
              "Cache-Control": {
                "description": "Public API-key responses must not be stored or shared across tenants.",
                "schema": {
                  "type": "string",
                  "example": "private, no-store, max-age=0"
                }
              },
              "Vary": {
                "description": "The opaque public API key selects the tenant-scoped response.",
                "schema": {
                  "type": "string",
                  "example": "X-LC8-Api-Key"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request body or click token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "headers": {
              "Cache-Control": {
                "description": "Public API-key responses must not be stored or shared across tenants.",
                "schema": {
                  "type": "string",
                  "example": "private, no-store, max-age=0"
                }
              },
              "Vary": {
                "description": "The opaque public API key selects the tenant-scoped response.",
                "schema": {
                  "type": "string",
                  "example": "X-LC8-Api-Key"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "headers": {
              "Cache-Control": {
                "description": "Public API-key responses must not be stored or shared across tenants.",
                "schema": {
                  "type": "string",
                  "example": "private, no-store, max-age=0"
                }
              },
              "Vary": {
                "description": "The opaque public API key selects the tenant-scoped response.",
                "schema": {
                  "type": "string",
                  "example": "X-LC8-Api-Key"
                }
              }
            }
          },
          "403": {
            "description": "Public API key lacks required media scope/module",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "headers": {
              "Cache-Control": {
                "description": "Public API-key responses must not be stored or shared across tenants.",
                "schema": {
                  "type": "string",
                  "example": "private, no-store, max-age=0"
                }
              },
              "Vary": {
                "description": "The opaque public API key selects the tenant-scoped response.",
                "schema": {
                  "type": "string",
                  "example": "X-LC8-Api-Key"
                }
              }
            }
          },
          "404": {
            "description": "Sponsor campaign not eligible for this tenant/slot",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "headers": {
              "Cache-Control": {
                "description": "Public API-key responses must not be stored or shared across tenants.",
                "schema": {
                  "type": "string",
                  "example": "private, no-store, max-age=0"
                }
              },
              "Vary": {
                "description": "The opaque public API key selects the tenant-scoped response.",
                "schema": {
                  "type": "string",
                  "example": "X-LC8-Api-Key"
                }
              }
            }
          },
          "429": {
            "description": "Public beacon rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "headers": {
              "Cache-Control": {
                "description": "Public API-key responses must not be stored or shared across tenants.",
                "schema": {
                  "type": "string",
                  "example": "private, no-store, max-age=0"
                }
              },
              "Vary": {
                "description": "The opaque public API key selects the tenant-scoped response.",
                "schema": {
                  "type": "string",
                  "example": "X-LC8-Api-Key"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "headers": {
              "Cache-Control": {
                "description": "Public API-key responses must not be stored or shared across tenants.",
                "schema": {
                  "type": "string",
                  "example": "private, no-store, max-age=0"
                }
              },
              "Vary": {
                "description": "The opaque public API key selects the tenant-scoped response.",
                "schema": {
                  "type": "string",
                  "example": "X-LC8-Api-Key"
                }
              }
            }
          }
        },
        "x-tenant-scope": "public",
        "x-rate-limit-tier": "public_widget",
        "x-audit-required": true,
        "x-privacy-classification": "public"
      }
    },
    "/admin/feed": {
      "get": {
        "summary": "FC03 admin feed inventory (active + hidden) for moderation review",
        "tags": [
          "admin",
          "feed"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "FC03 AdminFeedPostList envelope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminFeedPostList"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks feed.manage",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "internal",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal"
      },
      "post": {
        "summary": "Generate a feed post (idempotent on kind + source_id)",
        "tags": [
          "admin",
          "feed"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "match.result",
                      "match.mvp",
                      "standings.update",
                      "fantasy.top",
                      "media.published",
                      "sponsor.campaign"
                    ]
                  },
                  "source_id": {
                    "type": "string",
                    "minLength": 1
                  },
                  "subject_match_id": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "subject_team_id": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "subject_player_id": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "body": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2000
                  },
                  "target_href": {
                    "oneOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 1000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "kind",
                  "source_id",
                  "subject_match_id",
                  "subject_team_id",
                  "subject_player_id",
                  "body"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Generated post",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeedPostRow"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "internal",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/feed/{feedPostId}/hide": {
      "post": {
        "summary": "Hide a feed post (reason required; history preserved)",
        "tags": [
          "admin",
          "feed"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "feedPostId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FeedHideRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Hidden post",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeedPostRow"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "internal",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/public/news": {
      "get": {
        "summary": "Public official news stream (published articles + operational feed, no sponsor cards), one cursor page",
        "tags": [
          "public",
          "news"
        ],
        "security": [
          {
            "ApiKey": [
              "read:public.media"
            ]
          }
        ],
        "parameters": [
          {
            "name": "tag",
            "in": "query",
            "required": false,
            "description": "Case-insensitive whole-term filter over public slug, title, body and category fields.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 80
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 30
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 400
            },
            "description": "Opaque cursor returned as next_cursor by the previous page."
          }
        ],
        "responses": {
          "200": {
            "description": "Public news stream",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicNewsList"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "public",
        "x-rate-limit-tier": "public_widget",
        "x-audit-required": false,
        "x-privacy-classification": "public"
      }
    },
    "/public/news/{slug}": {
      "get": {
        "summary": "Public official news article by slug (published only)",
        "tags": [
          "public",
          "news"
        ],
        "security": [
          {
            "ApiKey": [
              "read:public.media"
            ]
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 2,
              "maxLength": 64,
              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Public news article",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicNewsArticleRow"
                }
              }
            }
          },
          "404": {
            "description": "Draft, archived or missing news article",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "public",
        "x-rate-limit-tier": "public_widget",
        "x-audit-required": false,
        "x-privacy-classification": "public"
      }
    },
    "/admin/news": {
      "get": {
        "summary": "Admin news inventory (draft, published, archived)",
        "tags": [
          "admin",
          "news"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "News article list",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NewsArticleList"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks news.manage",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "internal",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal",
        "parameters": [
          {
            "name": "in_slideshow",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false",
                "1",
                "0"
              ]
            }
          },
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 120
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "draft",
                "published",
                "archived"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 100000,
              "default": 0
            }
          }
        ]
      },
      "post": {
        "summary": "Create a draft news article",
        "tags": [
          "admin",
          "news"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewsArticleCreateRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created draft news article",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NewsArticleRow"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "internal",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/news/{newsArticleId}": {
      "patch": {
        "summary": "Update a draft or published news article",
        "tags": [
          "admin",
          "news"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "newsArticleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewsArticleUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated news article",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NewsArticleRow"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "internal",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/news/{newsArticleId}/publish": {
      "post": {
        "summary": "Publish a draft news article; optional official_communication enqueue",
        "tags": [
          "admin",
          "news"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "newsArticleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewsArticlePublishRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Published news article",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NewsArticlePublishResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "internal",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/news/{newsArticleId}/archive": {
      "post": {
        "summary": "Archive a draft or published news article",
        "tags": [
          "admin",
          "news"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "newsArticleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Archived news article",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NewsArticleRow"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "internal",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/public/checkin/sessions/{matchId}": {
      "get": {
        "summary": "Read the public check-in state machine for a match",
        "tags": [
          "public",
          "checkin"
        ],
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Public check-in state",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "match_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "scheduled",
                        "open",
                        "closed"
                      ]
                    },
                    "qr_token": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "qr_text": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "expires_at": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "state": {
                      "type": "string",
                      "enum": [
                        "scheduled",
                        "scan_ready",
                        "closed",
                        "expired"
                      ]
                    },
                    "terminal": {
                      "type": "boolean"
                    },
                    "reason": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string"
                            },
                            "retryable": {
                              "type": "boolean"
                            },
                            "recovery_action": {
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message",
                            "retryable",
                            "recovery_action"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "match_id",
                    "status",
                    "qr_token",
                    "qr_text",
                    "expires_at",
                    "state",
                    "terminal",
                    "reason"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read:public.matches"
            ]
          }
        ],
        "x-tenant-scope": "public",
        "x-rate-limit-tier": "public_widget",
        "x-audit-required": false,
        "x-privacy-classification": "public"
      }
    },
    "/me/checkin": {
      "post": {
        "summary": "Record an idempotent check-in and evaluate catalog badge thresholds",
        "tags": [
          "self",
          "checkin",
          "badges"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "qr_token"
                ],
                "properties": {
                  "qr_token": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Check-in, badge catalog state and propagation receipt",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "state": {
                      "type": "string",
                      "const": "success"
                    },
                    "checkin": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "session_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "match_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "checked_in_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "geolocation_consent_granted": {
                          "type": "boolean"
                        },
                        "badge_awarded": {
                          "type": "boolean"
                        },
                        "fan_mvp_player_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "session_id",
                        "match_id",
                        "checked_in_at",
                        "geolocation_consent_granted",
                        "badge_awarded"
                      ],
                      "additionalProperties": false
                    },
                    "badge": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "badge_code": {
                              "type": "string"
                            },
                            "label": {
                              "type": "string"
                            },
                            "description": {
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "earned_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "source_match_id": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "id",
                            "badge_code",
                            "label",
                            "earned_at",
                            "source_match_id"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "badge_catalog": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "state": {
                              "type": "string",
                              "const": "mapped"
                            },
                            "definition_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "definition_version": {
                              "type": "number"
                            },
                            "badge_code": {
                              "type": "string"
                            },
                            "emblem": {
                              "type": "object",
                              "properties": {
                                "state": {
                                  "type": "string",
                                  "const": "unavailable"
                                },
                                "asset_url": {
                                  "type": "null"
                                },
                                "alt": {
                                  "type": "string"
                                },
                                "reason": {
                                  "type": "object",
                                  "properties": {
                                    "code": {
                                      "type": "string"
                                    },
                                    "message": {
                                      "type": "string"
                                    },
                                    "retryable": {
                                      "type": "boolean"
                                    },
                                    "recovery_action": {
                                      "oneOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "code",
                                    "message",
                                    "retryable",
                                    "recovery_action"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "required": [
                                "state",
                                "asset_url",
                                "alt",
                                "reason"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "state",
                            "definition_id",
                            "definition_version",
                            "badge_code",
                            "emblem"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "state": {
                              "type": "string",
                              "const": "unavailable"
                            },
                            "definition_id": {
                              "type": "null"
                            },
                            "definition_version": {
                              "type": "null"
                            },
                            "badge_code": {
                              "type": "null"
                            }
                          },
                          "required": [
                            "state",
                            "definition_id",
                            "definition_version",
                            "badge_code"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    "reason": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string"
                            },
                            "retryable": {
                              "type": "boolean"
                            },
                            "recovery_action": {
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message",
                            "retryable",
                            "recovery_action"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "propagation": {
                      "type": "object",
                      "properties": {
                        "schema_version": {
                          "type": "number",
                          "const": 1
                        },
                        "receipt_id": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "resource": {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "media",
                                "feed",
                                "news",
                                "content_page",
                                "sponsor",
                                "white_label",
                                "public_scope",
                                "follow",
                                "checkin",
                                "badge"
                              ]
                            },
                            "id": {
                              "type": "string"
                            },
                            "version": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "kind",
                            "id",
                            "version"
                          ],
                          "additionalProperties": false
                        },
                        "state": {
                          "type": "string",
                          "const": "accepted"
                        },
                        "events": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "consumer": {
                                "type": "string",
                                "enum": [
                                  "web",
                                  "mobile"
                                ]
                              },
                              "cache_tag": {
                                "type": "string"
                              },
                              "state": {
                                "type": "string",
                                "const": "queued"
                              },
                              "eta_seconds": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "consumer",
                              "cache_tag",
                              "state",
                              "eta_seconds"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "emitted_at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "schema_version",
                        "receipt_id",
                        "request_id",
                        "resource",
                        "state",
                        "events",
                        "emitted_at"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "state",
                    "checkin",
                    "badge",
                    "badge_catalog",
                    "reason",
                    "propagation"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "self",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": true,
        "x-privacy-classification": "pseudonymized"
      }
    },
    "/me/checkins": {
      "get": {
        "summary": "List the caller’s persisted check-in receipts, newest first",
        "tags": [
          "checkin",
          "self"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Caller-owned check-in receipts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeCheckinList"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "self",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": false,
        "x-privacy-classification": "pseudonymized"
      }
    },
    "/me/badges": {
      "get": {
        "summary": "List the caller’s earned fan badges",
        "tags": [
          "checkin",
          "self"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Fan badges",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FanBadgeList"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "self",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": false,
        "x-privacy-classification": "pseudonymized"
      }
    },
    "/me/badge-board": {
      "get": {
        "summary": "Read badge catalog state and governed emblems",
        "tags": [
          "self",
          "badges"
        ],
        "responses": {
          "200": {
            "description": "Badge board",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "tenant_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "state": {
                      "type": "string",
                      "enum": [
                        "ready",
                        "catalog_not_published",
                        "module_disabled"
                      ]
                    },
                    "catalog_version": {
                      "oneOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "reason": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string"
                            },
                            "retryable": {
                              "type": "boolean"
                            },
                            "recovery_action": {
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message",
                            "retryable",
                            "recovery_action"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "definition_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "badge_code": {
                            "type": "string"
                          },
                          "label": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          },
                          "rule_type": {
                            "type": "string",
                            "enum": [
                              "checkin_count",
                              "manual"
                            ]
                          },
                          "threshold": {
                            "type": "number"
                          },
                          "version": {
                            "type": "number"
                          },
                          "state": {
                            "type": "string",
                            "enum": [
                              "locked",
                              "unlocked"
                            ]
                          },
                          "current": {
                            "type": "number"
                          },
                          "progress_percent": {
                            "type": "number"
                          },
                          "earned_at": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "source_match_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "emblem": {
                            "type": "object",
                            "properties": {
                              "state": {
                                "type": "string",
                                "const": "unavailable"
                              },
                              "asset_url": {
                                "type": "null"
                              },
                              "alt": {
                                "type": "string"
                              },
                              "reason": {
                                "type": "object",
                                "properties": {
                                  "code": {
                                    "type": "string"
                                  },
                                  "message": {
                                    "type": "string"
                                  },
                                  "retryable": {
                                    "type": "boolean"
                                  },
                                  "recovery_action": {
                                    "oneOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "code",
                                  "message",
                                  "retryable",
                                  "recovery_action"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "state",
                              "asset_url",
                              "alt",
                              "reason"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "tenant_id",
                          "definition_id",
                          "badge_code",
                          "label",
                          "description",
                          "rule_type",
                          "threshold",
                          "version",
                          "state",
                          "current",
                          "progress_percent",
                          "earned_at",
                          "source_match_id",
                          "emblem"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "tenant_id",
                    "state",
                    "catalog_version",
                    "reason",
                    "items"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "self",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": false,
        "x-privacy-classification": "pseudonymized"
      }
    },
    "/me/feed": {
      "get": {
        "summary": "Read the caller’s consent-aware personalized feed",
        "tags": [
          "feed",
          "self"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Caller social feed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeedSocialSelfResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "self",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": false,
        "x-privacy-classification": "pseudonymized"
      }
    },
    "/me/feed/preferences": {
      "get": {
        "summary": "Read the caller’s feed preferences and follow capability",
        "tags": [
          "feed",
          "self"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Caller feed capabilities",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeedSocialCapabilitiesResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "self",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": false,
        "x-privacy-classification": "pseudonymized"
      },
      "put": {
        "summary": "Set the caller’s feed personalization and interaction preferences",
        "tags": [
          "feed",
          "self"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FeedSocialPreferenceRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated feed preferences",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeedSocialPreferenceRequest"
                }
              }
            }
          },
          "403": {
            "description": "Feed social action is not permitted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "self",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": true,
        "x-privacy-classification": "pseudonymized"
      }
    },
    "/me/follows/{subjectKind}/{subjectId}": {
      "put": {
        "summary": "Set a follow and return scoped propagation/freshness authority",
        "tags": [
          "self",
          "follow"
        ],
        "parameters": [
          {
            "name": "subjectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "subjectKind",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "team",
                "player",
                "tournament"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "followed"
                ],
                "properties": {
                  "followed": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Follow state and propagation receipt",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "followed": {
                      "type": "boolean"
                    },
                    "resource_version": {
                      "type": "string"
                    },
                    "organization_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "propagation": {
                      "type": "object",
                      "properties": {
                        "schema_version": {
                          "type": "number",
                          "const": 1
                        },
                        "receipt_id": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "resource": {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "media",
                                "feed",
                                "news",
                                "content_page",
                                "sponsor",
                                "white_label",
                                "public_scope",
                                "follow",
                                "checkin",
                                "badge"
                              ]
                            },
                            "id": {
                              "type": "string"
                            },
                            "version": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "kind",
                            "id",
                            "version"
                          ],
                          "additionalProperties": false
                        },
                        "state": {
                          "type": "string",
                          "const": "accepted"
                        },
                        "events": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "consumer": {
                                "type": "string",
                                "enum": [
                                  "web",
                                  "mobile"
                                ]
                              },
                              "cache_tag": {
                                "type": "string"
                              },
                              "state": {
                                "type": "string",
                                "const": "queued"
                              },
                              "eta_seconds": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "consumer",
                              "cache_tag",
                              "state",
                              "eta_seconds"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "emitted_at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "schema_version",
                        "receipt_id",
                        "request_id",
                        "resource",
                        "state",
                        "events",
                        "emitted_at"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "followed",
                    "resource_version",
                    "organization_id",
                    "propagation"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "self",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": true,
        "x-privacy-classification": "pseudonymized"
      }
    },
    "/me/follows": {
      "get": {
        "summary": "List the caller’s active followed subjects",
        "tags": [
          "feed",
          "self"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Caller active follows",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeedFollowSelfListResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "self",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": false,
        "x-privacy-classification": "pseudonymized"
      }
    },
    "/me/feed/{feedPostId}/reactions/{reaction}": {
      "put": {
        "summary": "Set one caller reaction on a visible feed post",
        "tags": [
          "feed",
          "self"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "feedPostId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "reaction",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "like",
                "celebrate",
                "support"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FeedReactionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated reaction and aggregate counts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeedReactionResponse"
                }
              }
            }
          },
          "403": {
            "description": "Feed social action is not permitted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Feed social target is unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "self",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": true,
        "x-privacy-classification": "pseudonymized"
      }
    },
    "/me/checkin/{sessionId}/fan-mvp": {
      "post": {
        "summary": "Cast the caller’s fan-MVP vote for a checked-in match; player must be in lineup",
        "tags": [
          "checkin",
          "self"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MeFanMvpVoteRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Fan MVP vote",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FanMvpVoteSelfResponse"
                }
              }
            }
          },
          "403": {
            "description": "Check-in geolocation consent is required to vote",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Caller already voted for a different player",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "self",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": true,
        "x-privacy-classification": "pseudonymized"
      }
    },
    "/admin/checkin/sessions": {
      "get": {
        "summary": "List tenant check-in sessions for the admin cockpit",
        "tags": [
          "admin",
          "checkin"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Check-in sessions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckinSessionList"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "internal",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal"
      },
      "post": {
        "summary": "Open or re-open the check-in session for a match",
        "tags": [
          "admin",
          "checkin"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminCheckinSessionOpenRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Opened check-in session",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckinSessionRow"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "internal",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/badges/catalog": {
      "get": {
        "summary": "List the tenant badge catalog, including unpublished definitions",
        "tags": [
          "admin",
          "checkin",
          "badges"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Badge catalog",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminBadgeDefinitionList"
                }
              }
            }
          },
          "403": {
            "description": "Tenant-wide checkin.manage authority is required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal"
      },
      "post": {
        "summary": "Create one immutable versioned badge definition",
        "tags": [
          "admin",
          "checkin",
          "badges"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminBadgeDefinitionSaveRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Saved badge definition",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminBadgeDefinitionRow"
                }
              }
            }
          },
          "403": {
            "description": "Tenant-wide checkin.manage authority is required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Definition conflict or published catalog version",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/badges/catalog/publish": {
      "post": {
        "summary": "Publish one complete badge catalog version",
        "tags": [
          "admin",
          "checkin",
          "badges"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminBadgeCatalogPublishRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Published badge catalog",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminBadgeDefinitionList"
                }
              }
            }
          },
          "403": {
            "description": "Tenant-wide checkin.manage authority is required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Badge catalog version is unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Badge catalog snapshot is incomplete or inconsistent",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/checkin/sessions/{sessionId}/close": {
      "post": {
        "summary": "Close a check-in session; the public QR token becomes undiscoverable",
        "tags": [
          "admin",
          "checkin"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Closed check-in session",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckinSessionRow"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "internal",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/checkin/sessions/{sessionId}/rotate": {
      "post": {
        "summary": "Rotate an open check-in QR token",
        "tags": [
          "admin",
          "checkin"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Rotated check-in session",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckinSessionRow"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "internal",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/sponsors/campaigns": {
      "get": {
        "summary": "List campaigns",
        "tags": [
          "admin",
          "sponsors"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Campaigns",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CampaignList"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "internal",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal"
      },
      "post": {
        "summary": "Create a campaign (status starts as draft)",
        "tags": [
          "admin",
          "sponsors"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CampaignCreateRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created campaign",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CampaignRow"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "internal",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/sponsors/campaigns/{campaignId}/status": {
      "post": {
        "summary": "Change sponsor campaign status through the campaign FSM. paused_reason is required iff status=paused.",
        "tags": [
          "admin",
          "sponsors"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "campaignId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CampaignStatusRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated campaign",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CampaignRow"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks sponsor.manage",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Campaign not found in tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Illegal campaign status transition or missing pause reason",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "internal",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/sponsor-analytics": {
      "get": {
        "summary": "Aggregate sponsor analytics (no per-user trace)",
        "tags": [
          "admin",
          "sponsors"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Inclusive lower bound (ISO 8601). The route rejects missing values with 400."
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Inclusive upper bound (ISO 8601). The route rejects missing values with 400."
          },
          {
            "name": "group_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "campaign_slot",
                "day"
              ]
            },
            "description": "Bucket granularity. `campaign_slot` (default) totals the window; `day` adds `date_bucket`, the dimension the approved tenant-admin CSV export needs."
          }
        ],
        "responses": {
          "200": {
            "description": "Aggregate buckets",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SponsorAnalyticsResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "internal",
        "x-audit-required": false,
        "x-privacy-classification": "pseudonymized"
      }
    },
    "/admin/entitlements": {
      "get": {
        "summary": "List tenant module entitlements and activation timeline",
        "tags": [
          "admin",
          "entitlements"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Entitlement grid and module activation timeline",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminEntitlementListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks tenant read/admin cockpit access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "internal",
        "x-audit-required": false,
        "x-privacy-classification": "pseudonymized"
      }
    },
    "/admin/entitlements/{module}/activate": {
      "post": {
        "summary": "Activate or renew a tenant module entitlement",
        "tags": [
          "admin",
          "entitlements"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "module",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "sport_core",
                "live_reporting",
                "fantasy",
                "media_feed",
                "sponsor_inventory",
                "api_widgets",
                "white_label",
                "certification"
              ]
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminEntitlementActivateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated entitlement row",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminEntitlementRow"
                }
              }
            }
          },
          "400": {
            "description": "Invalid module or request body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks tenant administration access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "internal",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/entitlements/{module}/deactivate": {
      "post": {
        "summary": "Deactivate a tenant module entitlement",
        "tags": [
          "admin",
          "entitlements"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "module",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "sport_core",
                "live_reporting",
                "fantasy",
                "media_feed",
                "sponsor_inventory",
                "api_widgets",
                "white_label",
                "certification"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Updated entitlement row",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminEntitlementRow"
                }
              }
            }
          },
          "400": {
            "description": "Invalid module",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks tenant administration access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "internal",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/tenants": {
      "get": {
        "summary": "List tenants and available plan catalog entries (platform_admin only)",
        "tags": [
          "admin",
          "tenants"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Tenant list and plan catalog",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminTenantListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks platform_admin",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "cross_tenant_platform",
        "x-rate-limit-tier": "internal",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal"
      },
      "post": {
        "summary": "Provision a tenant and activate the selected plan modules (platform_admin only)",
        "tags": [
          "admin",
          "tenants"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminTenantCreateRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Provisioned tenant with per-module activation results",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminTenantProvisionResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks platform_admin",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Unknown plan id",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Tenant slug already exists",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "cross_tenant_platform",
        "x-rate-limit-tier": "internal",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/me/notifications": {
      "get": {
        "summary": "List the caller’s queued + delivered notifications",
        "tags": [
          "notifications",
          "self"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 400
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Messages",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationMessageList"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "self",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/me/notifications/read-all": {
      "post": {
        "summary": "Mark all caller-visible notifications as read",
        "tags": [
          "notifications",
          "self"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Read-all summary",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationMarkAllReadResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "self",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/me/notifications/{notificationId}/read": {
      "post": {
        "summary": "Mark one caller-owned notification as read",
        "tags": [
          "notifications",
          "self"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "notificationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Updated notification",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationMessageRow"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "self",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/me/notifications/dismiss-read": {
      "post": {
        "summary": "Remove every already-read notification from the caller’s inbox",
        "tags": [
          "notifications",
          "self"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Dismiss-read receipt",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationDismissReadResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "self",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/me/notifications/{notificationId}/dismiss": {
      "post": {
        "summary": "Remove one caller-owned notification from the caller’s inbox",
        "tags": [
          "notifications",
          "self"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "notificationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Dismiss receipt",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationDismissReceipt"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "self",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/me/notification-preferences": {
      "get": {
        "summary": "Read the caller’s notification preferences",
        "tags": [
          "notifications",
          "self"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Preferences",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationPreferenceList"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "self",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal"
      },
      "patch": {
        "summary": "Update a notification preference (one channel × category)",
        "tags": [
          "notifications",
          "self"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NotificationPreferenceUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated preference",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationPreferenceRow"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "self",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/me/push-devices": {
      "get": {
        "summary": "List the caller’s active push devices (tokens redacted)",
        "tags": [
          "notifications",
          "self"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Active caller-owned push devices",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PushDeviceSelfListResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "self",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal"
      },
      "post": {
        "summary": "Register a consent-verified push device for the caller",
        "tags": [
          "notifications",
          "self"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PushDeviceRegisterRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Registered push device (token redacted)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PushDeviceSelfResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "self",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/me/push-devices/{deviceId}": {
      "delete": {
        "summary": "Revoke one caller-owned push device",
        "tags": [
          "notifications",
          "self"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "deviceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Revoked push device (token redacted)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PushDeviceSelfResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "self",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/notifications/templates": {
      "get": {
        "summary": "FC03 admin notification template registry (PII-checked title/body)",
        "tags": [
          "admin",
          "notifications"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "FC03 AdminNotificationTemplateList envelope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminNotificationTemplateList"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks notification.send",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "internal",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal"
      },
      "post": {
        "summary": "W22 create a notification template (PII-checked, code-unique)",
        "tags": [
          "admin",
          "notifications"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NotificationTemplateCreateRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created template",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationTemplate"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks notification.send",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Template code already used in tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Template title/body contains PII",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "internal",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/notifications/template-specs": {
      "get": {
        "summary": "W5-N system notification template codes, categories and variables",
        "tags": [
          "admin",
          "notifications"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "The platform-constant system template specs",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SystemNotificationTemplateSpecList"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks notification.send",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "internal",
        "x-audit-required": false,
        "x-privacy-classification": "public"
      }
    },
    "/admin/notifications/templates/{templateId}": {
      "patch": {
        "summary": "W22 update a notification template (code immutable, PII re-checked)",
        "tags": [
          "admin",
          "notifications"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "templateId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NotificationTemplateUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated template",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationTemplate"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks notification.send",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Template not found in tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Template title/body contains PII",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "internal",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/notifications/templates/{templateId}/deactivate": {
      "post": {
        "summary": "W22 deactivate a notification template (idempotent)",
        "tags": [
          "admin",
          "notifications"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "templateId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Deactivated template",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationTemplate"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks notification.send",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Template not found in tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "internal",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/notifications/queue": {
      "get": {
        "summary": "FC03 admin notification queue snapshot (status distribution)",
        "tags": [
          "admin",
          "notifications"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "FC03 AdminNotificationQueueList envelope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminNotificationQueueList"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks notification.send",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "internal",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/notifications/queue/{notificationId}/retry": {
      "post": {
        "summary": "Idempotently retry a dead-lettered notification; replay returns the same canonical child, which may have advanced",
        "tags": [
          "admin",
          "notifications"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "notificationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Canonical retry notification (same child on replay)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminNotificationRetryResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks notification.send",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Notification not found in tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Notification is not retryable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Retry cannot be admitted under current template or recipient policy",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "internal",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/notifications/channel-health": {
      "get": {
        "summary": "Per-channel delivery health (live vs degraded provider posture)",
        "tags": [
          "admin",
          "notifications"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Channel delivery health",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationChannelHealth"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "internal",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/notifications/campaigns": {
      "post": {
        "summary": "Operator segment fan-out (idempotent per namespace, consent-gated)",
        "tags": [
          "admin",
          "notifications"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NotificationCampaignEnqueueRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Fan-out result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationCampaignEnqueueResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "internal",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/notifications/operational-notices": {
      "post": {
        "summary": "Operational notice fan-out — forced official_communication, never downgradable",
        "tags": [
          "admin",
          "notifications"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OperationalNoticeFanoutRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Operational notice fan-out result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OperationalNoticeFanoutResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "internal",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/corrections": {
      "post": {
        "summary": "Submit a correction request (requester reason stays tenant-internal)",
        "tags": [
          "corrections",
          "self"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CorrectionSubmitRequest"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Submitted correction acknowledgement",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CorrectionSubmitResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "self",
        "x-rate-limit-tier": "internal",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/me/corrections": {
      "get": {
        "summary": "List the authenticated requester’s own correction lifecycle history",
        "tags": [
          "corrections",
          "self"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Requester-private correction history",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MyCorrectionList"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "self",
        "x-rate-limit-tier": "internal",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/corrections/{correctionId}/triage": {
      "post": {
        "summary": "Triage (or reject) a submitted correction",
        "tags": [
          "admin",
          "corrections"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "correctionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CorrectionTriageRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Triaged correction",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CorrectionTriageResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "internal",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/corrections/{correctionId}": {
      "patch": {
        "summary": "Decide (approve | reject) a triaged correction",
        "tags": [
          "admin",
          "corrections"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "correctionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CorrectionDecideRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Decided correction",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CorrectionDecideResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "internal",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/corrections/{correctionId}/apply": {
      "post": {
        "summary": "Finalize an accepted correction without an amendment",
        "tags": [
          "admin",
          "corrections"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "correctionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Applied correction",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CorrectionApplyResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "internal",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/reports/{reportId}/certify": {
      "post": {
        "summary": "Request certification of an OFFICIAL report version (idempotent)",
        "tags": [
          "admin",
          "certifications"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CertifyReportRequest"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Certification request enqueued (admin-safe projection — never carries `idempotency_key`)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminCertificationRequestRow"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "internal",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/public/certifications/{certificationId}": {
      "get": {
        "summary": "Public certification payload + hash (no personal data; superseded → 404)",
        "tags": [
          "public",
          "certifications"
        ],
        "security": [
          {
            "ApiKey": [
              "read:public.matches"
            ]
          }
        ],
        "parameters": [
          {
            "name": "certificationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Public certification payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicCertificationResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "public",
        "x-rate-limit-tier": "public_widget",
        "x-audit-required": false,
        "x-privacy-classification": "public"
      }
    },
    "/me/session": {
      "get": {
        "summary": "Verified-session metadata for any authenticated bearer (operator display).",
        "tags": [
          "self"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Verified session",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeSessionResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "self",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/me/admin-session": {
      "get": {
        "summary": "Admin-RBAC-scoped session verifier (web admin guard). Requires an admin cockpit role; non-admin bearers receive 403.",
        "tags": [
          "self",
          "admin"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Verified admin session",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeSessionResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but not an admin cockpit role",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "self",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/me/console/task-counts": {
      "get": {
        "summary": "Role-filtered urgent web-console counts for a verified mobile handoff; unauthorized fields are omitted.",
        "tags": [
          "self",
          "admin"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Authorized urgent console counts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeConsoleTaskCountsResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but has no verified web-managed role",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "self",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/me/mobile-console-handoff": {
      "post": {
        "summary": "Mint a short-lived, single-use native-to-browser console code after fresh exact-role capability admission.",
        "tags": [
          "self",
          "admin",
          "auth"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MeMobileConsoleHandoffRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Opaque handoff code; deliver only in a URL fragment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MobileConsoleHandoffMintResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Exact role or capability is no longer admitted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Handoff service is not configured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "self",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/auth/mobile-console-handoff/redeem": {
      "post": {
        "summary": "Same-origin web-server redemption for a one-time mobile console code. Rechecks current capability before returning a browser bearer.",
        "tags": [
          "auth"
        ],
        "security": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MobileConsoleHandoffRedeemRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Browser bearer for immediate HttpOnly cookie issuance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MobileConsoleHandoffRedeemResponse"
                }
              }
            }
          },
          "400": {
            "description": "Malformed handoff code",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Invalid, expired, consumed, or no-longer-admitted handoff",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Current capability check refused the handoff",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Handoff service is not configured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "public",
        "x-rate-limit-tier": "public_widget",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/impersonation/start": {
      "post": {
        "summary": "Start a short-lived admin impersonation session. Platform admins only; reason is mandatory and audited.",
        "tags": [
          "admin",
          "identity"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminImpersonationStartRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Short-lived impersonation bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminImpersonationStartResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or missing reason",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but not platform_admin",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Nested impersonation is not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/impersonation/stop": {
      "post": {
        "summary": "Stop the current impersonation bearer and audit the transition back to the operator.",
        "tags": [
          "admin",
          "identity"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Impersonation stopped",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminImpersonationStopResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Current bearer is not impersonating",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/corrections/{correctionId}/statistical-addition/amendment": {
      "post": {
        "summary": "Apply a triaged evaluator statistic through an official report amendment; replay returns the existing result.",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "correctionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "base_report_version_id",
                  "base_manifest_hash",
                  "acknowledged"
                ],
                "properties": {
                  "base_report_version_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "base_manifest_hash": {
                    "type": "string",
                    "pattern": "^[0-9a-f]{64}$"
                  },
                  "acknowledged": {
                    "type": "boolean",
                    "enum": [
                      true
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Idempotent replay",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "report",
                    "replayed"
                  ],
                  "properties": {
                    "report": {
                      "$ref": "#/components/schemas/ReportVersionV2"
                    },
                    "replayed": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "Statistic incorporated in the amended official report",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "report",
                    "amendment_set",
                    "new_event",
                    "projection_revision",
                    "replayed"
                  ],
                  "properties": {
                    "report": {
                      "$ref": "#/components/schemas/ReportVersionV2"
                    },
                    "amendment_set": {
                      "$ref": "#/components/schemas/ReportAmendmentSet"
                    },
                    "new_event": {
                      "$ref": "#/components/schemas/MatchEvent"
                    },
                    "projection_revision": {
                      "$ref": "#/components/schemas/ProjectionRevision"
                    },
                    "replayed": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Correction decision and report approval authority required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Correction not found in authorized scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Duplicate statistic, stale report, or correction not ready",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Invalid proposal or amendment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/dashboard": {
      "get": {
        "summary": "Admin cockpit dashboard counters (tenant-scoped projection).",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "AdminDashboardResponse envelope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminDashboardResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required role/permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/approval-queue": {
      "get": {
        "summary": "Approval queue rows aggregated from report/rating/correction/player-claim/fantasy sources.",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "AdminApprovalQueueList envelope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminApprovalQueueList"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required role/permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "pseudonymized",
        "x-admin-cockpit-required": true,
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 80
            }
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 120
            }
          },
          {
            "name": "sla",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "due",
                "breached"
              ],
              "default": "all"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "oldest",
                "newest",
                "sla"
              ],
              "default": "sla"
            }
          }
        ]
      }
    },
    "/admin/system-health": {
      "get": {
        "summary": "System health snapshot (row counts, feature flags, fantasy module status).",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "AdminSystemHealthResponse envelope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminSystemHealthResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required role/permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/feature-flags": {
      "post": {
        "summary": "Toggle a tenant-scoped feature flag / kill switch. Requires feature_flag.toggle and emits admin.feature_flag_toggle.",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminFeatureFlagToggleRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated tenant feature flag",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminSystemHealthFlag"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks feature_flag.toggle",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/audit": {
      "get": {
        "summary": "Recent audit entries with HMAC pseudonymized actor (op:<hex>) — raw user id never on the wire.",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "action",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Exact audit action filter, for example privacy.request_submit."
          },
          {
            "name": "since",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Return audit entries at or after this ISO timestamp."
          },
          {
            "name": "user_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Server-side actor id filter. The response still returns only pseudonymized actor labels."
          },
          {
            "name": "user_email",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "email"
            },
            "description": "W2H — resolve an email to the account inside the tenant and filter by it. Needs `audit.read.identity` (403 otherwise); alternative to `user_id` (400 with both). The lookup itself is audited (`audit.identity_lookup`, never the email)."
          }
        ],
        "responses": {
          "200": {
            "description": "AdminAuditList envelope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminAuditList"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required role/permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "pseudonymized",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/ratings": {
      "get": {
        "summary": "Ratings pending admin validation. Match, player and evaluator are HMAC pseudonymized (kind:<hex>); raw uuids never on the wire.",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "AdminRatingsList envelope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminRatingsList"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required role/permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "pseudonymized",
        "x-admin-cockpit-required": true,
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 80
            }
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 120
            }
          },
          {
            "name": "sla",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "due",
                "breached"
              ],
              "default": "all"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "oldest",
                "newest",
                "sla"
              ],
              "default": "sla"
            }
          }
        ]
      }
    },
    "/admin/privacy-requests": {
      "get": {
        "summary": "Privacy DSR queue. Requires privacy.request.handle (DPO-equivalent role).",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "AdminPrivacyList envelope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminPrivacyList"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required role/permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "pseudonymized",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/corrections": {
      "get": {
        "summary": "Correction request queue, pseudonymized match label, decision metadata included.",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "AdminCorrectionsList envelope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminCorrectionsList"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required role/permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "pseudonymized",
        "x-admin-cockpit-required": true,
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 80
            }
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 120
            }
          },
          {
            "name": "sla",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "due",
                "breached"
              ],
              "default": "all"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "oldest",
                "newest",
                "sla"
              ],
              "default": "sla"
            }
          }
        ]
      }
    },
    "/admin/ratings/{ratingId}": {
      "patch": {
        "summary": "Decide a pending rating submission (approve, reject, request correction). Requires rating.finalize.",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ratingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminRatingDecideRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "AdminRatingDecideResponse envelope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminRatingDecideResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks rating.finalize",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Rating submission not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Reason required for rejected/corrected; illegal transition",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/privacy-requests/{requestId}/start": {
      "post": {
        "summary": "Start handling a submitted DSR (received → in_progress). Requires privacy.request.handle (DPO boundary).",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "requestId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "AdminPrivacyRow envelope (pseudonymized handled row)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminPrivacyRow"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks privacy.request.handle (DPO boundary)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Privacy request not found in tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Illegal status transition (or empty rejection reason)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "pseudonymized",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/privacy-requests/{requestId}/complete": {
      "post": {
        "summary": "Complete a DSR (in_progress → completed); optional export_artifact_ref carries the export/portability bundle. Requires privacy.request.handle.",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "requestId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "AdminPrivacyRow envelope (pseudonymized handled row)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminPrivacyRow"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks privacy.request.handle (DPO boundary)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Privacy request not found in tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Deletion remains in progress because one or more subject data stores have no approved erasure disposition",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Illegal status transition (or empty rejection reason)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "pseudonymized",
        "x-admin-cockpit-required": true,
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminPrivacyRequestCompleteRequest"
              }
            }
          }
        }
      }
    },
    "/admin/privacy-requests/{requestId}/export-download": {
      "post": {
        "summary": "Issue an opaque one-time export download grant in an authenticated JSON response. The grant is never a URL. Requires privacy.request.handle.",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "requestId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One-time export download grant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminPrivacyExportDownloadLink"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks privacy.request.handle (DPO boundary)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Privacy request or export artifact not found in tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Export is not completed or has no artifact",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "pii",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/privacy-requests/{requestId}/export-download/consume": {
      "post": {
        "summary": "Consume an opaque one-time export grant supplied only in the authenticated JSON request body. Requires privacy.request.handle.",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "requestId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminPrivacyExportDownloadConsumeRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "One-time JSON export bundle",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminPrivacyExportBundle"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks privacy.request.handle (DPO boundary)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Privacy request or export artifact not found in tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "410": {
            "description": "Export grant has expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Export grant is invalid or already consumed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "pii",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/privacy-requests/{requestId}/reject": {
      "post": {
        "summary": "Reject a DSR with a required reason (→ rejected). Requires privacy.request.handle.",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "requestId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "AdminPrivacyRow envelope (pseudonymized handled row)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminPrivacyRow"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks privacy.request.handle (DPO boundary)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Privacy request not found in tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Illegal status transition (or empty rejection reason)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "pseudonymized",
        "x-admin-cockpit-required": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminPrivacyRequestRejectRequest"
              }
            }
          }
        }
      }
    },
    "/admin/tournaments": {
      "get": {
        "summary": "Admin list — tournaments for the caller tenant.",
        "tags": [
          "admin",
          "admin",
          "sport"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Tenant-scoped list",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminTournamentList"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "tournament_ids",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma separated list of up to 100 tournament ids. Resolves the competition a page already references (a detail header, a fixture) without paging the whole directory. More than 100 ids, or any value that is not a UUID, is rejected with 400."
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Case-insensitive search over label and slug, for forms where an operator must find any competition. The response stays paged."
          },
          {
            "name": "format",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "pending"
              ]
            }
          }
        ]
      },
      "post": {
        "summary": "Admin create — new tournament in the caller tenant.",
        "tags": [
          "admin",
          "sport",
          "tournament"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Updated row (full domain shape)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminTournamentRow"
                }
              }
            }
          },
          "201": {
            "description": "Created row (full domain shape)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminTournamentRow"
                }
              }
            }
          },
          "400": {
            "description": "Validation failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Slug or invariant conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminTournamentCreate"
              }
            }
          }
        }
      }
    },
    "/admin/calendar": {
      "get": {
        "summary": "Admin list — fixtures for the caller tenant.",
        "tags": [
          "admin",
          "sport"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Admin list — fixtures for the caller tenant.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminFixtureList"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but not authorized for this resource",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "pseudonymized",
        "x-admin-cockpit-required": true,
        "parameters": [
          {
            "name": "match_ids",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma separated list of up to 100 match ids. Resolves exactly the fixtures a surface already references (a match console, a print sheet, a check-in session) instead of downloading the archive. More than 100 ids, or any value that is not a UUID, is rejected with 400."
          },
          {
            "name": "tournament_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Only the fixtures of one competition."
          },
          {
            "name": "team_ids",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma separated list of up to 100 team ids. Returns the fixtures those teams play home or away — the server-side form of a name search, so the selection happens before paging and the totals describe the same set."
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Only fixtures in this match state."
          },
          {
            "name": "competition_status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "open",
                "closed",
                "all"
              ]
            },
            "description": "open excludes completed and archived competitions. After the historical import a fixture whose result the league never published stays scheduled forever, so state alone no longer separates work from history."
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Operator search. An exact match id or team id selects that record; any other text searches the names of the teams the caller may see. Applied before counting and paging, and a text with no match returns zero rows rather than the unfiltered list."
          },
          {
            "name": "official_coverage",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "covered",
                "pending",
                "uncovered"
              ]
            },
            "description": "Referee coverage as a filter: covered means a confirmed referee, pending a designated one who has not confirmed, uncovered none. Resolved on the tenant active assignments before counting and paging. Requires match.assignment.manage: a caller without it gets 403, never a silently unfiltered or empty list."
          },
          {
            "name": "include_coverage",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Annotate the returned rows with referee coverage without filtering. The response coverage.availability says where the answer comes from (ready, not_permitted, unavailable, not_requested) so a caller that may not read assignments never receives a coverage claim."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500
            },
            "description": "Page size. Omitted means no truncation: the response carries every matching fixture, as it did before this parameter existed."
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            },
            "description": "Page offset. The response always carries the unpaged total of the query."
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ]
      }
    },
    "/admin/fantasy/market": {
      "get": {
        "summary": "Admin list — fantasy market orders queue; submitter/decider pseudonymized.",
        "tags": [
          "admin",
          "fantasy"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Admin list — fantasy market orders queue; submitter/decider pseudonymized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminFantasyMarketOrderList"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but not authorized for this resource",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "pseudonymized",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/fantasy/leagues": {
      "get": {
        "summary": "Admin list — fantasy leagues for cockpit pickers; no owner ids or join-code hashes.",
        "tags": [
          "admin",
          "fantasy"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Admin list — fantasy leagues for cockpit pickers; no owner ids or join-code hashes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminFantasyLeagueList"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but not authorized for this resource",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "pseudonymized",
        "x-admin-cockpit-required": true
      },
      "post": {
        "summary": "B1 — create the official (public, ownerless) fantasy league of a tournament from the console. Starts from the Standard v1 rules; the format stays bounded by the owner decision fanta.league_format; one live official league per tournament.",
        "tags": [
          "admin",
          "fantasy"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminCreateFantasyLeagueRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created league",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminFantasyLeagueRow"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks organization.administer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Tournament not found in the caller scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "An official league already exists for the tournament",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Format not allowed by the owner decision fanta.league_format",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/fantasy/leagues/{leagueId}/market-state": {
      "patch": {
        "summary": "FB-06 — the operator twin of the commissioner market-state override. The official league has no owner_user_id, so without this route its transfer window could only ever follow the round clock: no repair market, no freeze.",
        "tags": [
          "admin",
          "fantasy"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "leagueId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Fantasy league id scoped to the caller tenant."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetFantasyMarketStateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Resolved transfer window",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminSetFantasyMarketStateResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks organization.administer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "League not found in the caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/fantasy/leagues/{leagueId}/archive": {
      "post": {
        "summary": "W2B (#20, Q117/Q118) — archive a fantasy league: it stays readable and refuses every new write and scoring run. Requires the owner decision fanta.league_closure to include \"archive\" (409 owner_decision_pending while undecided).",
        "tags": [
          "admin",
          "fantasy"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "leagueId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Fantasy league id scoped to the caller tenant."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminArchiveFantasyLeagueRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Archived league",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminFantasyLeagueRow"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks organization.administer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "League not found in the caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Owner decision pending or closure not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/fantasy/leagues/{leagueId}": {
      "delete": {
        "summary": "W2B (#20, Q117/Q118) — delete a fantasy league nobody joined (no team). Requires the owner decision fanta.league_closure to include \"delete_empty\"; a league with teams is archived instead (409 fantasy_league_not_empty).",
        "tags": [
          "admin",
          "fantasy"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "leagueId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Fantasy league id scoped to the caller tenant."
          }
        ],
        "responses": {
          "204": {
            "description": "League deleted"
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks organization.administer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "League not found in the caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Owner decision pending, closure not allowed or league not empty",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/fantasy/leaderboard": {
      "get": {
        "summary": "Admin read — fantasy leaderboard for a league.",
        "tags": [
          "admin",
          "fantasy"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Admin read — fantasy leaderboard for a league.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminFantasyLeaderboardResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but not authorized for this resource",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "pseudonymized",
        "x-admin-cockpit-required": true,
        "parameters": [
          {
            "name": "league_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Fantasy league id to project the leaderboard for."
          }
        ]
      }
    },
    "/admin/fantasy/rules": {
      "get": {
        "summary": "Admin list — published fantasy rule sets across the caller tenant.",
        "tags": [
          "admin",
          "fantasy"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Admin list — published fantasy rule sets across the caller tenant.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminFantasyRuleSetList"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but not authorized for this resource",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "pseudonymized",
        "x-admin-cockpit-required": true
      },
      "post": {
        "summary": "Publish a new fantasy rule-set version for a league. Optional available formations and progressive locking are explicit capabilities; omission preserves the legacy single-formation/global-deadline policy.",
        "tags": [
          "admin",
          "fantasy"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminPublishFantasyRulesRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Published rule-set version",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminFantasyRuleSetRow"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks organization.administer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/fantasy/market/{orderId}/decision": {
      "post": {
        "summary": "Decide a pending fantasy market order. accepted runs the budget/roster/transaction mutation atomically; rejected requires a non-empty reason. Returns the same admin-safe pseudonymized row as the queue read.",
        "tags": [
          "admin",
          "fantasy"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Market order id to decide."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminFantasyMarketDecideRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Decided market order row",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminFantasyMarketOrderRow"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks fantasy.market.execute",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Refused state transition (not pending, or empty reject reason)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "pseudonymized",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/fantasy/trades": {
      "get": {
        "summary": "Admin list — manager-to-manager trade offers across the tenant, newest first. Optional `league_id` and `status` query filters; the review queue is `status=in_review`.",
        "tags": [
          "admin",
          "fantasy"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Admin list — manager-to-manager trade offers across the tenant, newest first. Optional `league_id` and `status` query filters; the review queue is `status=in_review`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminFantasyMarketOrderList"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but not authorized for this resource",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "pseudonymized",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/fantasy/trades/{orderId}/review": {
      "post": {
        "summary": "Operator decision on a trade parked in review. Approving executes the movement atomically (both rosters, both budgets, two linked transactions); rejecting requires a non-empty reason and mutates nothing but the offer row.",
        "tags": [
          "admin",
          "fantasy"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Trade offer awaiting review."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReviewFantasyTradeRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Decided trade row",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminFantasyMarketOrderRow"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks fantasy.market.execute",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The offer is no longer in review",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Refused state transition, or empty reject reason",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "pseudonymized",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/fantasy/transactions/{transactionId}/reverse": {
      "post": {
        "summary": "FB-14 — storn an executed market movement. Roster slots are restored and credits moved back; a trade’s TWO halves are undone together, because undoing one would leave a player in two rosters or in none. The original row is stamped reversed_at/reversal_reason and a compensating row is minted. Refused when the world has moved on (already reversed, or the player has since changed hands).",
        "tags": [
          "admin",
          "fantasy"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "transactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Executed market transaction to reverse."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminReverseFantasyTransactionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Compensating transaction rows",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminReverseFantasyTransactionResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks fantasy.market.execute",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No such transaction in the caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Already reversed, or the player has moved on",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/support/tickets": {
      "get": {
        "summary": "Admin list — support tickets; requester/assignee pseudonymized.",
        "tags": [
          "admin",
          "support"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Admin list — support tickets; requester/assignee pseudonymized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminSupportTicketList"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but not authorized for this resource",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "pseudonymized",
        "x-admin-cockpit-required": true
      },
      "post": {
        "summary": "Admin create — open a support ticket on behalf of a user.",
        "tags": [
          "admin",
          "support"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminSupportTicketOpenRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created support ticket",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminSupportTicketRow"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but not authorized for this resource",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "pseudonymized",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/support/incidents": {
      "get": {
        "summary": "Admin list — operational incidents log; owner pseudonymized.",
        "tags": [
          "admin",
          "support"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Admin list — operational incidents log; owner pseudonymized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminIncidentList"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but not authorized for this resource",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "pseudonymized",
        "x-admin-cockpit-required": true
      },
      "post": {
        "summary": "Admin create — declare an operational incident.",
        "tags": [
          "admin",
          "support"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminIncidentDeclareRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Declared incident",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminIncidentRow"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but not authorized for this resource",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "pseudonymized",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/certifications": {
      "get": {
        "summary": "Admin list — certification request queue for the caller tenant.",
        "tags": [
          "admin",
          "certification"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Admin list — certification request queue for the caller tenant.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminCertificationRequestList"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but not authorized for this resource",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "pseudonymized",
        "x-admin-cockpit-required": true,
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 80
            }
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 120
            }
          },
          {
            "name": "sla",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "due",
                "breached"
              ],
              "default": "all"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "oldest",
                "newest",
                "sla"
              ],
              "default": "sla"
            }
          }
        ]
      }
    },
    "/admin/certifications/{requestId}/attempt": {
      "post": {
        "summary": "Admin operation — attempt certification for a pending request.",
        "tags": [
          "admin",
          "certification"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "requestId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Updated certification request (admin-safe projection — never carries `idempotency_key`)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminCertificationRequestRow"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but not authorized for this resource",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Certification request not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/organizations": {
      "get": {
        "summary": "Admin list — organizations within the caller’s effective tenant/organization scope.",
        "tags": [
          "admin",
          "sport",
          "organization"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Tenant-scoped list",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminOrganizationList"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          }
        ]
      },
      "post": {
        "summary": "Admin create — new organization in the caller tenant; requires a tenant-wide verified session scope.",
        "tags": [
          "admin",
          "sport",
          "organization"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Updated row (full domain shape)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminOrganizationRow"
                }
              }
            }
          },
          "201": {
            "description": "Created row (full domain shape)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminOrganizationRow"
                }
              }
            }
          },
          "400": {
            "description": "Validation failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Slug or invariant conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminOrganizationCreate"
              }
            }
          }
        }
      }
    },
    "/admin/organizations/{organizationId}": {
      "patch": {
        "summary": "Admin update — patch an organization within the caller’s effective tenant/organization scope.",
        "tags": [
          "admin",
          "sport",
          "organization"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Updated row (full domain shape)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminOrganizationRow"
                }
              }
            }
          },
          "201": {
            "description": "Created row (full domain shape)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminOrganizationRow"
                }
              }
            }
          },
          "400": {
            "description": "Validation failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Slug or invariant conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminOrganizationUpdate"
              }
            }
          }
        }
      }
    },
    "/admin/seasons": {
      "get": {
        "summary": "Admin list — every season in the caller tenant.",
        "tags": [
          "admin",
          "sport",
          "season"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Tenant-scoped list",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminSeasonList"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          }
        ]
      },
      "post": {
        "summary": "Admin create — new sport season in the caller tenant.",
        "tags": [
          "admin",
          "sport",
          "season"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Updated row (full domain shape)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminSeasonRow"
                }
              }
            }
          },
          "201": {
            "description": "Created row (full domain shape)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminSeasonRow"
                }
              }
            }
          },
          "400": {
            "description": "Validation failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Slug or invariant conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminSeasonCreate"
              }
            }
          }
        }
      }
    },
    "/admin/seasons/{seasonId}": {
      "patch": {
        "summary": "Admin update — patch a season using optimistic concurrency.",
        "tags": [
          "admin",
          "sport",
          "season"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Updated row (full domain shape)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminSeasonRow"
                }
              }
            }
          },
          "201": {
            "description": "Created row (full domain shape)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminSeasonRow"
                }
              }
            }
          },
          "400": {
            "description": "Validation failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Slug or invariant conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "428": {
            "description": "If-Match or body expected_etag precondition is required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "parameters": [
          {
            "name": "seasonId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Opaque ETag returned by the latest admin projection. This header or body expected_etag is required."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminSeasonUpdate"
              }
            }
          }
        }
      }
    },
    "/admin/tournaments/{tournamentId}": {
      "patch": {
        "summary": "Admin update — patch tournament settings and advance its lifecycle state.",
        "tags": [
          "admin",
          "sport",
          "tournament"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Updated row (full domain shape)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminTournamentRow"
                }
              }
            }
          },
          "201": {
            "description": "Created row (full domain shape)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminTournamentRow"
                }
              }
            }
          },
          "400": {
            "description": "Validation failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Slug or invariant conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "428": {
            "description": "If-Match or body expected_etag precondition is required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Opaque ETag returned by the latest admin projection. This header or body expected_etag is required."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminTournamentUpdate"
              }
            }
          }
        }
      }
    },
    "/admin/tournaments/{tournamentId}/rule": {
      "get": {
        "summary": "Admin read — active calcio a 8 rule profile for one tournament.",
        "tags": [
          "admin",
          "sport",
          "tournament",
          "rules"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Tenant-scoped list",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminTournamentRuleRow"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "put": {
        "summary": "Admin publish — replace the calcio a 8 rule profile for one tournament.",
        "tags": [
          "admin",
          "sport",
          "tournament",
          "rules"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Updated row (full domain shape)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminTournamentRulePublishResponse"
                }
              }
            }
          },
          "201": {
            "description": "Created row (full domain shape)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminTournamentRulePublishResponse"
                }
              }
            }
          },
          "400": {
            "description": "Validation failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Slug or invariant conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminTournamentRuleUpdate"
              }
            }
          }
        }
      }
    },
    "/admin/tournaments/{tournamentId}/teams": {
      "get": {
        "summary": "Admin read — teams registered for one tournament.",
        "tags": [
          "admin",
          "sport",
          "tournament",
          "team"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Tenant-scoped list",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminTournamentTeamList"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "post": {
        "summary": "Admin register — add one or more teams to a tournament.",
        "tags": [
          "admin",
          "sport",
          "tournament",
          "team"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Updated row (full domain shape)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminTournamentTeamList"
                }
              }
            }
          },
          "201": {
            "description": "Created row (full domain shape)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminTournamentTeamList"
                }
              }
            }
          },
          "400": {
            "description": "Validation failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Slug or invariant conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminTournamentTeamRegister"
              }
            }
          }
        }
      }
    },
    "/admin/tournaments/{tournamentId}/seed": {
      "post": {
        "summary": "Admin seed — publish tournament team order or audited random draw.",
        "tags": [
          "admin",
          "sport",
          "tournament",
          "team"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Updated row (full domain shape)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminTournamentTeamList"
                }
              }
            }
          },
          "201": {
            "description": "Created row (full domain shape)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminTournamentTeamList"
                }
              }
            }
          },
          "400": {
            "description": "Validation failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Slug or invariant conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminTournamentSeedRequest"
              }
            }
          }
        }
      }
    },
    "/admin/tournaments/{tournamentId}/teams/{teamId}": {
      "delete": {
        "summary": "Admin unregister — remove a team before fixtures exist.",
        "tags": [
          "admin",
          "sport",
          "tournament",
          "team"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "201": {
            "description": "Created"
          },
          "400": {
            "description": "Validation failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Slug or invariant conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/admin/tournaments/{tournamentId}/calendar/preview": {
      "post": {
        "summary": "Admin preview — generate a pure tournament calendar proposal without writes.",
        "tags": [
          "admin",
          "sport",
          "tournament",
          "calendar"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Tenant-scoped list",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminTournamentCalendarPreviewResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminTournamentCalendarPreviewRequest"
              }
            }
          }
        }
      }
    },
    "/admin/tournaments/{tournamentId}/calendar/generate": {
      "post": {
        "summary": "Admin generate — persist tournament rounds and fixtures from the preview algorithm.",
        "tags": [
          "admin",
          "sport",
          "tournament",
          "calendar"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Updated row (full domain shape)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminTournamentCalendarGenerateResponse"
                }
              }
            }
          },
          "201": {
            "description": "Created row (full domain shape)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminTournamentCalendarGenerateResponse"
                }
              }
            }
          },
          "400": {
            "description": "Validation failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Slug or invariant conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminTournamentCalendarGenerateRequest"
              }
            }
          }
        }
      }
    },
    "/admin/teams": {
      "get": {
        "summary": "Admin list — teams in the caller tenant, filtered by soft active state.",
        "tags": [
          "admin",
          "sport",
          "team"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Tenant-scoped list",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminTeamList"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "inactive",
                "all"
              ],
              "default": "active"
            },
            "description": "Soft activity filter. Defaults to active for a directory page, and to all when team_ids is present, because a name lookup must also resolve teams that are no longer active."
          },
          {
            "name": "team_ids",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma separated list of up to 100 team ids. Resolves the names a caller already references (a fixture, a report, a transfer) without paging the whole directory. More than 100 ids, or any value that is not a UUID, is rejected with 400."
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Case-insensitive search over display name and short name, for forms where an operator must find any team. The response stays paged."
          }
        ]
      },
      "post": {
        "summary": "Admin create — new team in the caller tenant.",
        "tags": [
          "admin",
          "sport",
          "team"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Updated row (full domain shape)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminTeamRow"
                }
              }
            }
          },
          "201": {
            "description": "Created row (full domain shape)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminTeamRow"
                }
              }
            }
          },
          "400": {
            "description": "Validation failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Slug or invariant conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminTeamCreate"
              }
            }
          }
        }
      }
    },
    "/admin/teams/{teamId}": {
      "patch": {
        "summary": "Admin update — patch a team in the caller tenant.",
        "tags": [
          "admin",
          "sport",
          "team"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Updated row (full domain shape)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminTeamRow"
                }
              }
            }
          },
          "201": {
            "description": "Created row (full domain shape)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminTeamRow"
                }
              }
            }
          },
          "400": {
            "description": "Validation failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Slug or invariant conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "428": {
            "description": "If-Match or body expected_etag precondition is required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "parameters": [
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Opaque ETag returned by the latest admin projection. This header or body expected_etag is required."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminTeamUpdate"
              }
            }
          }
        }
      }
    },
    "/admin/players": {
      "get": {
        "summary": "Admin list — every player in the caller tenant; account ids pseudonymized.",
        "tags": [
          "admin",
          "sport",
          "player"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Tenant-scoped list",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminPlayerList"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "inactive",
                "all"
              ],
              "default": "all"
            },
            "description": "Soft activity filter. Defaults to every player."
          },
          {
            "name": "player_ids",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma separated list of up to 100 player ids. Resolves the names a caller already references (a roster, a transfer, a suspension, a report, a committee override) without paging the whole directory. More than 100 ids, or any value that is not a UUID, is rejected with 400."
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Case- and accent-insensitive search over the sporting name, for forms where an operator must find any player. The response stays paged."
          }
        ]
      },
      "post": {
        "summary": "Admin create — new player in the caller tenant.",
        "tags": [
          "admin",
          "sport",
          "player"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Updated row (full domain shape)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminPlayerRow"
                }
              }
            }
          },
          "201": {
            "description": "Created row (full domain shape)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminPlayerRow"
                }
              }
            }
          },
          "400": {
            "description": "Validation failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Slug or invariant conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminPlayerCreate"
              }
            }
          }
        }
      }
    },
    "/admin/players/{playerId}": {
      "patch": {
        "summary": "Admin update — patch a player in the caller tenant.",
        "tags": [
          "admin",
          "sport",
          "player"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Updated row (full domain shape)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminPlayerRow"
                }
              }
            }
          },
          "201": {
            "description": "Created row (full domain shape)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminPlayerRow"
                }
              }
            }
          },
          "400": {
            "description": "Validation failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Slug or invariant conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "428": {
            "description": "If-Match or body expected_etag precondition is required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "parameters": [
          {
            "name": "playerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Opaque ETag returned by the latest admin projection. This header or body expected_etag is required."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminPlayerUpdate"
              }
            }
          }
        }
      }
    },
    "/admin/fields": {
      "get": {
        "summary": "Admin list — every playing field in the caller tenant.",
        "tags": [
          "admin",
          "sport",
          "field"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Tenant-scoped list",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminFieldList"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      },
      "post": {
        "summary": "Admin create — new playing field in the caller tenant.",
        "tags": [
          "admin",
          "sport",
          "field"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Updated row (full domain shape)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminFieldRow"
                }
              }
            }
          },
          "201": {
            "description": "Created row (full domain shape)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminFieldRow"
                }
              }
            }
          },
          "400": {
            "description": "Validation failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Slug or invariant conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminFieldCreate"
              }
            }
          }
        }
      }
    },
    "/admin/fields/{fieldId}": {
      "patch": {
        "summary": "Admin update — patch a playing field in the caller tenant.",
        "tags": [
          "admin",
          "sport",
          "field"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Updated row (full domain shape)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminFieldRow"
                }
              }
            }
          },
          "201": {
            "description": "Created row (full domain shape)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminFieldRow"
                }
              }
            }
          },
          "400": {
            "description": "Validation failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Slug or invariant conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "parameters": [
          {
            "name": "fieldId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminFieldUpdate"
              }
            }
          }
        }
      }
    },
    "/admin/rosters/entries": {
      "get": {
        "summary": "Admin list — roster entries for one team and season in the caller tenant.",
        "tags": [
          "admin",
          "sport",
          "roster"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Tenant-scoped list",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminRosterEntryList"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "parameters": [
          {
            "name": "team_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "season_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          }
        ]
      },
      "post": {
        "summary": "Admin add — new roster entry binding a player to a team for a season.",
        "tags": [
          "admin",
          "sport",
          "roster"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Updated row (full domain shape)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminRosterEntryRow"
                }
              }
            }
          },
          "201": {
            "description": "Created row (full domain shape)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminRosterEntryRow"
                }
              }
            }
          },
          "400": {
            "description": "Validation failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Slug or invariant conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminRosterEntryAdd"
              }
            }
          }
        }
      }
    },
    "/admin/rosters/entries/{entryId}": {
      "patch": {
        "summary": "Admin end — terminate an active roster entry by stamping `to_date`.",
        "tags": [
          "admin",
          "sport",
          "roster"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Updated row (full domain shape)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminRosterEntryRow"
                }
              }
            }
          },
          "201": {
            "description": "Created row (full domain shape)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminRosterEntryRow"
                }
              }
            }
          },
          "400": {
            "description": "Validation failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Slug or invariant conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "428": {
            "description": "If-Match or body expected_etag precondition is required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "parameters": [
          {
            "name": "entryId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Opaque ETag returned by the latest admin projection. This header or body expected_etag is required."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminRosterEntryEnd"
              }
            }
          }
        }
      }
    },
    "/admin/rosters/entries/{entryId}/tournament": {
      "patch": {
        "summary": "Admin classify — assign tournament provenance to one historical unclassified roster row without changing its dates.",
        "tags": [
          "admin",
          "sport",
          "roster"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Updated row (full domain shape)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminRosterEntryRow"
                }
              }
            }
          },
          "201": {
            "description": "Created row (full domain shape)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminRosterEntryRow"
                }
              }
            }
          },
          "400": {
            "description": "Validation failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Slug or invariant conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "428": {
            "description": "If-Match or body expected_etag precondition is required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "parameters": [
          {
            "name": "entryId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Opaque ETag returned by the latest admin projection. This header or body expected_etag is required."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminRosterEntryClassifyTournament"
              }
            }
          }
        }
      }
    },
    "/admin/rosters/transfers": {
      "post": {
        "summary": "Admin transfer — move one player between sporting rosters with an effective-dated, idempotent event.",
        "tags": [
          "admin",
          "sport",
          "roster"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Updated row (full domain shape)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminRosterTransferResponse"
                }
              }
            }
          },
          "201": {
            "description": "Created row (full domain shape)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminRosterTransferResponse"
                }
              }
            }
          },
          "400": {
            "description": "Validation failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Slug or invariant conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "428": {
            "description": "If-Match or body expected_etag precondition is required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminRosterTransfer"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "If-Match",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Opaque ETag returned by the latest admin projection. This header or body expected_etag is required."
          }
        ]
      }
    },
    "/admin/fixtures": {
      "post": {
        "summary": "Admin schedule — create a match with the given fixture command.",
        "tags": [
          "admin",
          "sport",
          "fixture"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Updated row (full domain shape)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminFixtureRow"
                }
              }
            }
          },
          "201": {
            "description": "Created row (full domain shape)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminFixtureRow"
                }
              }
            }
          },
          "400": {
            "description": "Validation failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Slug or invariant conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminFixtureSchedule"
              }
            }
          }
        }
      }
    },
    "/admin/standings/recompute": {
      "post": {
        "summary": "Admin recompute — re-project the standings for a tournament/group.",
        "tags": [
          "admin",
          "sport",
          "standings"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Updated row (full domain shape)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminStandingsRecomputeResponse"
                }
              }
            }
          },
          "201": {
            "description": "Created row (full domain shape)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminStandingsRecomputeResponse"
                }
              }
            }
          },
          "400": {
            "description": "Validation failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Slug or invariant conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminStandingsRecompute"
              }
            }
          }
        }
      }
    },
    "/admin/standings/tie-resolutions": {
      "post": {
        "summary": "Admin tie resolution — record and apply an audited manual or draw order for one unresolved standings group.",
        "tags": [
          "admin",
          "sport",
          "standings"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Updated row (full domain shape)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminStandingsTieResolveResponse"
                }
              }
            }
          },
          "201": {
            "description": "Created row (full domain shape)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminStandingsTieResolveResponse"
                }
              }
            }
          },
          "400": {
            "description": "Validation failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Slug or invariant conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminStandingsTieResolve"
              }
            }
          }
        }
      }
    },
    "/admin/tournaments/{tournamentId}/phases": {
      "get": {
        "summary": "Admin read — fasi, gironi, squadre assegnate e classifica di girone.",
        "tags": [
          "admin",
          "sport",
          "tournament",
          "phase"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Struttura fasi/gironi del torneo",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminTournamentPhaseStructure"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      },
      "post": {
        "summary": "Admin create — nuova fase nominata (girone all’italiana o eliminazione diretta).",
        "tags": [
          "admin",
          "sport",
          "tournament",
          "phase"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Struttura fasi/gironi del torneo dopo la modifica",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminTournamentPhaseStructure"
                }
              }
            }
          },
          "400": {
            "description": "Validation failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Nome già usato, o struttura con partite collegate",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Invariante di fase o girone violato",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminTournamentPhaseCreate"
              }
            }
          }
        }
      }
    },
    "/admin/tournaments/{tournamentId}/phases/{phaseId}": {
      "patch": {
        "summary": "Admin update — rinomina, riordina o cambia stato di una fase.",
        "tags": [
          "admin",
          "sport",
          "tournament",
          "phase"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "phaseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Struttura fasi/gironi del torneo dopo la modifica",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminTournamentPhaseStructure"
                }
              }
            }
          },
          "400": {
            "description": "Validation failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Nome già usato, o struttura con partite collegate",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Invariante di fase o girone violato",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminTournamentPhaseUpdate"
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Admin delete — elimina una fase senza partite collegate.",
        "tags": [
          "admin",
          "sport",
          "tournament",
          "phase"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "phaseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Struttura fasi/gironi del torneo dopo la modifica",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminTournamentPhaseStructure"
                }
              }
            }
          },
          "400": {
            "description": "Validation failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Nome già usato, o struttura con partite collegate",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Invariante di fase o girone violato",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/tournaments/{tournamentId}/phases/{phaseId}/groups": {
      "post": {
        "summary": "Admin create — nuovo girone dentro una fase con classifica.",
        "tags": [
          "admin",
          "sport",
          "tournament",
          "phase"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "phaseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Struttura fasi/gironi del torneo dopo la modifica",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminTournamentPhaseStructure"
                }
              }
            }
          },
          "400": {
            "description": "Validation failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Nome già usato, o struttura con partite collegate",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Invariante di fase o girone violato",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminTournamentPhaseGroupCreate"
              }
            }
          }
        }
      }
    },
    "/admin/tournaments/{tournamentId}/phases/{phaseId}/groups/{groupId}": {
      "patch": {
        "summary": "Admin update — rinomina o riordina un girone.",
        "tags": [
          "admin",
          "sport",
          "tournament",
          "phase"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "phaseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "groupId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Struttura fasi/gironi del torneo dopo la modifica",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminTournamentPhaseStructure"
                }
              }
            }
          },
          "400": {
            "description": "Validation failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Nome già usato, o struttura con partite collegate",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Invariante di fase o girone violato",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminTournamentPhaseGroupUpdate"
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Admin delete — elimina un girone senza partite collegate.",
        "tags": [
          "admin",
          "sport",
          "tournament",
          "phase"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "phaseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "groupId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Struttura fasi/gironi del torneo dopo la modifica",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminTournamentPhaseStructure"
                }
              }
            }
          },
          "400": {
            "description": "Validation failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Nome già usato, o struttura con partite collegate",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Invariante di fase o girone violato",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/tournaments/{tournamentId}/phases/{phaseId}/groups/{groupId}/teams": {
      "post": {
        "summary": "Admin assign — aggiunge o rimuove una squadra iscritta dal girone.",
        "tags": [
          "admin",
          "sport",
          "tournament",
          "phase"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "phaseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "groupId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Struttura fasi/gironi del torneo dopo la modifica",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminTournamentPhaseStructure"
                }
              }
            }
          },
          "400": {
            "description": "Validation failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Nome già usato, o struttura con partite collegate",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Invariante di fase o girone violato",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminTournamentPhaseGroupTeamAssign"
              }
            }
          }
        }
      }
    },
    "/admin/matches/{matchId}/state": {
      "post": {
        "summary": "Admin/operator transition of a stuck match to live or ended. The domain match-state matrix remains authoritative.",
        "tags": [
          "match",
          "live"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminMatchStateTransitionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Row payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminFixtureRow"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/matches/{matchId}/assignments": {
      "get": {
        "summary": "Admin list — match assignments for the given match in the caller tenant.",
        "tags": [
          "match",
          "assignment"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List envelope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminMatchAssignmentList"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      },
      "post": {
        "summary": "Admin designate — create a new assignment for an operator role on this match.",
        "tags": [
          "match",
          "assignment"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminMatchAssignmentDesignate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Row payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminMatchAssignmentRow"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/match-assignments/{assignmentId}/revoke": {
      "post": {
        "summary": "Admin revoke — revoke a previously designated assignment with an operator reason.",
        "tags": [
          "match",
          "assignment"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "assignmentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminMatchAssignmentRevoke"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Row payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminMatchAssignmentRow"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/match-assignments/{assignmentId}/no-show": {
      "post": {
        "summary": "FC12 — mark a confirmed official as a no-show; the row stays visible but loses live/report authority.",
        "tags": [
          "match",
          "assignment"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "assignmentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminMatchAssignmentNoShow"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Row payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminMatchAssignmentRow"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/match-assignments/{assignmentId}/replace": {
      "post": {
        "summary": "FC12 — retire an official and designate a replacement, linked to its predecessor.",
        "tags": [
          "match",
          "assignment"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "assignmentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminMatchAssignmentReplace"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Row payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminMatchAssignmentRow"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/me/match-assignments": {
      "get": {
        "summary": "Calling actor view — every non-revoked assignment for the bearer that the operational area opens; `withheld` lists the other active ones with the reason (synthetic fixture, fixture not found).",
        "tags": [
          "match",
          "assignment"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "List envelope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeMatchAssignmentList"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "session",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/me/match-assignments/{assignmentId}/accept": {
      "post": {
        "summary": "The assigned actor accepts a pending designation.",
        "tags": [
          "match",
          "assignment"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "assignmentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Row payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminMatchAssignmentRow"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "session",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/me/match-assignments/{assignmentId}/decline": {
      "post": {
        "summary": "The assigned actor declines a pending designation.",
        "tags": [
          "match",
          "assignment"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "assignmentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MatchAssignmentDecline"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Row payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminMatchAssignmentRow"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "session",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/matches/{matchId}/events": {
      "get": {
        "summary": "Public-safe live event stream for spectators / widgets.",
        "tags": [
          "match",
          "live"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List envelope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicMatchEventList"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "session",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal"
      },
      "post": {
        "summary": "Assigned operator appends a live event. Idempotent on (match_id, idempotency_key). Response is the public-safe projection.",
        "tags": [
          "match",
          "live"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MatchEventAppendRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Row payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicMatchEventRow"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "session",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/matches/{matchId}/postmatch-entry": {
      "post": {
        "summary": "Confirmed referee starts post-match report compilation after scheduled time, without synthesizing live events or a score.",
        "tags": [
          "match",
          "report"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OfficialPostMatchStartRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Row payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OfficialPostMatchStartResponse"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "session",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/matches/{matchId}/fantasy-statistics-completeness": {
      "post": {
        "summary": "Assigned evaluator confirms the complete statistics for the current report, including verified zero values, within the delivery deadline.",
        "tags": [
          "match",
          "fantasy"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FantasyStatisticsCompletenessConfirmRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Row payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FantasyStatisticsCompletenessReceipt"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "session",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/matches/{matchId}/fantasy-statistics-completeness": {
      "post": {
        "summary": "Administrator confirms complete statistics for the current report, including verified zero values; administrative recovery remains available after the evaluator deadline.",
        "tags": [
          "match",
          "fantasy"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FantasyStatisticsCompletenessConfirmRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Row payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FantasyStatisticsCompletenessReceipt"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/matches/{matchId}/events": {
      "get": {
        "summary": "Admin/operator raw event read for one match.",
        "tags": [
          "match",
          "live"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List envelope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MatchEventList"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/matches/{matchId}/offline-commands": {
      "post": {
        "summary": "Assigned operator submits a queued offline command. Idempotent on (device, key).",
        "tags": [
          "match",
          "offline"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OfflineCommandSubmitRequest"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Row payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OfflineCommandRow"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "session",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/matches/{matchId}/offline-commands": {
      "get": {
        "summary": "Operator view of the offline command queue for one match.",
        "tags": [
          "match",
          "offline"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List envelope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OfflineCommandList"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/matches/{matchId}/offline-commands/{clientCommandId}/resolve": {
      "post": {
        "summary": "Admin resolves a manual-review offline event. Only accept applies the event.",
        "tags": [
          "match",
          "offline"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "clientCommandId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminOfflineCommandResolveRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Row payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OfflineCommandRow"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/matches/{matchId}/report-context": {
      "get": {
        "summary": "Assigned referee/scorer reads the current ReportVersion and authoritative draft context.",
        "tags": [
          "report"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List envelope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AssignedReportContext"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "session",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/matches/{matchId}/report-draft": {
      "post": {
        "summary": "Assigned scorer/referee creates the durable v1 ReportVersion draft for a match.",
        "tags": [
          "report"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReportDraftCreateRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Row payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportVersion"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "session",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/matches/{matchId}/report-draft/{versionId}/submit": {
      "post": {
        "summary": "Assigned scorer/referee signs and submits a ReportVersion draft.",
        "tags": [
          "report"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "versionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReportDraftSubmitRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Row payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportVersion"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "session",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/matches/{matchId}/report-submissions": {
      "post": {
        "summary": "Scorer submits or queues the official match report.",
        "tags": [
          "report"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReportSubmissionSubmitRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Row payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminReportSubmissionRow"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "session",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/matches/{matchId}/report-submissions/me": {
      "get": {
        "summary": "Assigned official reads only their own report submission generations and exact operation receipts.",
        "tags": [
          "report"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List envelope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AssignedReportSubmissionList"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "session",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/report-submissions": {
      "get": {
        "summary": "Admin queue — pending/queued report submissions awaiting review.",
        "tags": [
          "report"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "List envelope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminReportSubmissionList"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 80
            }
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 120
            }
          },
          {
            "name": "sla",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "due",
                "breached"
              ],
              "default": "all"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "oldest",
                "newest",
                "sla"
              ],
              "default": "sla"
            }
          }
        ]
      }
    },
    "/admin/matches/{matchId}/report-versions": {
      "get": {
        "summary": "Admin match report versions — durable ReportVersion rows for picker-based offline sync.",
        "tags": [
          "report"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List envelope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminReportVersionList"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/report-submissions/{submissionId}": {
      "patch": {
        "summary": "Admin decide — approve, return for correction or reject a report submission.",
        "tags": [
          "report"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "submissionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminReportSubmissionDecideRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Row payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminReportSubmissionRow"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/report-submissions/{submissionId}/sync": {
      "post": {
        "summary": "Admin guided V2 handoff — link a legacy submitted row with null report_version_id, or advance an offline queued row, using an existing submitted/official ReportVersion for the same tenant and match.",
        "tags": [
          "report"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "submissionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminReportSubmissionSyncRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Row payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminReportSubmissionRow"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/me/report-submissions/{submissionId}/sync": {
      "post": {
        "summary": "Actor sync — the original submitter advances a queued submission to submitted once the persisted ReportVersion id is known.",
        "tags": [
          "report"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "submissionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminReportSubmissionSyncRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Row payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminReportSubmissionRow"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "session",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/matches/{matchId}/ratings": {
      "get": {
        "summary": "Evaluator reads their own persisted rating submissions for the match.",
        "tags": [
          "rating"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List envelope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EvaluatorRatingSubmissionList"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "session",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal"
      },
      "post": {
        "summary": "Evaluator submits a player rating for the match.",
        "tags": [
          "rating"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RatingSubmissionSubmitRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Row payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminRatingSubmissionRow"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "session",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/matches/{matchId}/rating-batches": {
      "get": {
        "summary": "Evaluator reads their own durable batch receipts for the assigned match.",
        "tags": [
          "rating"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List envelope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EvaluatorRatingBatchReceiptList"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "session",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal"
      },
      "post": {
        "summary": "Evaluator atomically submits one complete versioned manifest with payload-bound idempotency and per-row receipts.",
        "tags": [
          "rating"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EvaluatorRatingBatchSubmitRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Row payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EvaluatorRatingBatchReceiptDto"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "session",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/matches/{matchId}/rating-batches/{receiptId}": {
      "get": {
        "summary": "Evaluator reads one own durable batch receipt after a retry or on another device.",
        "tags": [
          "rating"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "receiptId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List envelope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EvaluatorRatingBatchReceiptDto"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "session",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/matches/{matchId}/evaluator-context": {
      "get": {
        "summary": "Evaluator reads the exact submitted-lineup identity for the assigned match.",
        "tags": [
          "rating"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Row payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EvaluatorMatchContext"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "session",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/rating-submissions": {
      "get": {
        "summary": "Admin queue — rating submissions in pending_admin_validation status.",
        "tags": [
          "rating"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "List envelope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminRatingSubmissionList"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 80
            }
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 120
            }
          },
          {
            "name": "sla",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "due",
                "breached"
              ],
              "default": "all"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "oldest",
                "newest",
                "sla"
              ],
              "default": "sla"
            }
          }
        ]
      }
    },
    "/matches/{matchId}/mvp-proposals": {
      "get": {
        "summary": "List the current evaluator’s own MVP proposals for one assigned match.",
        "tags": [
          "mvp"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List envelope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EvaluatorMvpProposalList"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "session",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal"
      },
      "post": {
        "summary": "Evaluator proposes an MVP for the match.",
        "tags": [
          "mvp"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MvpProposeRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Row payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MvpProposalRow"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Idempotency key was already used for a different proposal",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "session",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/v2/matches/{matchId}/mvp-proposals": {
      "post": {
        "summary": "Evaluator proposes an MVP through the idempotent-only v2 contract.",
        "tags": [
          "mvp"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MvpProposeIdempotentV2Request"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Row payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MvpProposalRow"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Idempotency key was already used for a different proposal",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "session",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/mvp-proposals": {
      "get": {
        "summary": "Admin queue — pending MVP proposals across all matches for the tenant.",
        "tags": [
          "mvp"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "List envelope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MvpProposalList"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 80
            }
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 120
            }
          },
          {
            "name": "sla",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "due",
                "breached"
              ],
              "default": "all"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "oldest",
                "newest",
                "sla"
              ],
              "default": "sla"
            }
          }
        ]
      }
    },
    "/admin/mvp-proposals/{proposalId}": {
      "patch": {
        "summary": "Admin decide — accept or reject an MVP proposal. At most one accepted per match.",
        "tags": [
          "mvp"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "proposalId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminMvpDecideRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Row payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MvpProposalRow"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/fantasy/recompute": {
      "post": {
        "summary": "Operator-initiated fantasy recompute. Idempotent on (match_id, report_version_id, league_id). The linked ReportVersion must already be official for the same match in the caller tenant.",
        "tags": [
          "admin",
          "fantasy"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminFantasyRecomputeRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Row payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminFantasyFinalizationBatchRow"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity (RLS-hidden id or refused state transition)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/fantasy/batches": {
      "get": {
        "summary": "Admin queue — fantasy finalization batches for the caller tenant. Optional league_id / match_id filters.",
        "tags": [
          "admin",
          "fantasy"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "List envelope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminFantasyFinalizationBatchList"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity (RLS-hidden id or refused state transition)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "parameters": [
          {
            "name": "league_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "match_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/public/teams": {
      "get": {
        "summary": "FC05 public list of active teams for the tenant resolved from the API key",
        "tags": [
          "public",
          "fc05"
        ],
        "security": [
          {
            "ApiKey": [
              "read:public.teams"
            ]
          }
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 200
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 400
            },
            "description": "Opaque cursor returned as next_cursor by the previous page."
          }
        ],
        "responses": {
          "200": {
            "description": "Public team list (active teams only, no PII or audit metadata)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "next_cursor"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "maxItems": 200,
                      "items": {
                        "$ref": "#/components/schemas/PublicTeam"
                      }
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "maxLength": 400
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "public",
        "x-rate-limit-tier": "public_widget",
        "x-audit-required": false,
        "x-privacy-classification": "public"
      }
    },
    "/public/teams/by-slug/{slug}": {
      "get": {
        "summary": "FC05 public team profile by slug (unauthenticated web team detail)",
        "tags": [
          "public",
          "fc05"
        ],
        "security": [
          {
            "ApiKey": [
              "read:public.teams"
            ]
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Public team payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicTeam"
                }
              }
            }
          },
          "404": {
            "description": "No active team with this slug for the tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "public",
        "x-rate-limit-tier": "public_widget",
        "x-audit-required": false,
        "x-privacy-classification": "public"
      }
    },
    "/public/matches": {
      "get": {
        "summary": "FC05 public list of matches (current display state)",
        "tags": [
          "public",
          "fc05"
        ],
        "security": [
          {
            "ApiKey": [
              "read:public.matches"
            ]
          }
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 200
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 400
            },
            "description": "Opaque cursor returned as next_cursor by the previous page."
          },
          {
            "name": "tournament_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Public match list (current display state only; no draft/internal data)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "next_cursor"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "maxItems": 200,
                      "items": {
                        "$ref": "#/components/schemas/PublicMatch"
                      }
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "maxLength": 400
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "public",
        "x-rate-limit-tier": "public_widget",
        "x-audit-required": false,
        "x-privacy-classification": "public"
      }
    },
    "/public/players/by-slug/{slug}": {
      "get": {
        "summary": "FC05 public player profile by slug (no account refs, no minor flag)",
        "tags": [
          "public",
          "fc05"
        ],
        "security": [
          {
            "ApiKey": [
              "read:public.players"
            ]
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Public player payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicPlayer"
                }
              }
            }
          },
          "404": {
            "description": "No active player with this slug for the tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "public",
        "x-rate-limit-tier": "public_widget",
        "x-audit-required": false,
        "x-privacy-classification": "public"
      }
    },
    "/public/players/by-slug/{slug}/qr": {
      "get": {
        "summary": "FC25 PII-free player-profile QR reference (M25): slug + public path only",
        "tags": [
          "public",
          "fc25"
        ],
        "security": [
          {
            "ApiKey": [
              "read:public.players"
            ]
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "PII-free player-profile QR reference",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicPlayerQr"
                }
              }
            }
          },
          "404": {
            "description": "No active player with this slug for the tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "public",
        "x-rate-limit-tier": "public_widget",
        "x-audit-required": false,
        "x-privacy-classification": "public"
      }
    },
    "/public/tournaments": {
      "get": {
        "summary": "FC05 public tournaments index for the tenant",
        "tags": [
          "public",
          "fc05"
        ],
        "security": [
          {
            "ApiKey": [
              "read:public.matches"
            ]
          }
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 200
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 400
            },
            "description": "Opaque cursor returned as next_cursor by the previous page."
          }
        ],
        "responses": {
          "200": {
            "description": "Public tournament list",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicTournamentList"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "public",
        "x-rate-limit-tier": "public_widget",
        "x-audit-required": false,
        "x-privacy-classification": "public"
      }
    },
    "/public/tournaments/by-slug/{slug}": {
      "get": {
        "summary": "FC05 public tournament detail by slug",
        "tags": [
          "public",
          "fc05"
        ],
        "security": [
          {
            "ApiKey": [
              "read:public.matches"
            ]
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Public tournament payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicTournament"
                }
              }
            }
          },
          "404": {
            "description": "No tournament with this slug for the tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "public",
        "x-rate-limit-tier": "public_widget",
        "x-audit-required": false,
        "x-privacy-classification": "public"
      }
    },
    "/public/tournaments/{tournamentId}/standings": {
      "get": {
        "summary": "FC05 public standings for a tournament (derived from official results)",
        "tags": [
          "public",
          "fc05"
        ],
        "security": [
          {
            "ApiKey": [
              "read:public.standings"
            ]
          }
        ],
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Public standings list (optionally with the standings_banner sponsor)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/PublicStanding"
                      }
                    },
                    "sponsor": {
                      "$ref": "#/components/schemas/PublicSponsor"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "public",
        "x-rate-limit-tier": "public_widget",
        "x-audit-required": false,
        "x-privacy-classification": "public"
      }
    },
    "/public/tournaments/{tournamentId}/calendar": {
      "get": {
        "summary": "WP-M5-11 public tournament calendar grouped by round",
        "tags": [
          "public",
          "fc05",
          "tournaments"
        ],
        "security": [
          {
            "ApiKey": [
              "read:public.matches"
            ]
          }
        ],
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Public tournament calendar",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicTournamentCalendar"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "public",
        "x-rate-limit-tier": "public_widget",
        "x-audit-required": false,
        "x-privacy-classification": "public"
      }
    },
    "/public/tournaments/{tournamentId}/teams": {
      "get": {
        "summary": "WP-M5-11 public teams registered in a tournament",
        "tags": [
          "public",
          "fc05",
          "tournaments"
        ],
        "security": [
          {
            "ApiKey": [
              "read:public.teams"
            ]
          }
        ],
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Public tournament team list",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicTournamentTeams"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "public",
        "x-rate-limit-tier": "public_widget",
        "x-audit-required": false,
        "x-privacy-classification": "public"
      }
    },
    "/admin/users": {
      "get": {
        "summary": "Tenant-scoped user search. Optional `q` substring matches against email, display_name and id. Returns first `limit` (default 25, max 100).",
        "tags": [
          "admin",
          "identity"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "List envelope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminUserListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission or scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found within the caller tenant scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Conflict (duplicate email or invitation already resolved)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "role",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "include_suspended",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ]
      },
      "post": {
        "tags": [
          "admin",
          "user-admin"
        ],
        "summary": "Crea un’identità da reclamare su invito (nessuna password, nessuna email)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "email",
                  "display_name"
                ],
                "properties": {
                  "email": {
                    "type": "string",
                    "format": "email",
                    "maxLength": 254
                  },
                  "display_name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Identità creata, inattiva",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "user",
                    "claim"
                  ],
                  "properties": {
                    "user": {
                      "type": "object",
                      "required": [
                        "id",
                        "display_name",
                        "email",
                        "registered_at",
                        "status",
                        "roles"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "display_name": {
                          "type": "string"
                        },
                        "email": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "registered_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "active",
                            "suspended",
                            "unclaimed",
                            "invited"
                          ]
                        },
                        "roles": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "platform_admin",
                              "tenant_admin",
                              "org_admin",
                              "org_operator",
                              "manager",
                              "assistant",
                              "scorer",
                              "team_captain",
                              "team_coach",
                              "team_staff",
                              "team_member",
                              "coach",
                              "staff",
                              "referee",
                              "evaluator",
                              "fantasy_manager",
                              "media_editor",
                              "sponsor_manager",
                              "dpo",
                              "support",
                              "external_organizer",
                              "public_user",
                              "tournament_admin",
                              "group_admin",
                              "medical_officer",
                              "hostess",
                              "journalist",
                              "photographer",
                              "club_admin"
                            ]
                          }
                        }
                      }
                    },
                    "claim": {
                      "type": "object",
                      "required": [
                        "user_id",
                        "state",
                        "invited_at",
                        "expires_at",
                        "claimed_at",
                        "created_at"
                      ],
                      "properties": {
                        "user_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "unclaimed",
                            "invited",
                            "claimed"
                          ]
                        },
                        "invited_at": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "date-time"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "expires_at": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "date-time"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "claimed_at": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "date-time"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/users/{userId}": {
      "get": {
        "summary": "User detail + role-assignment list, both tenant-scoped.",
        "tags": [
          "admin",
          "identity"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Row payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminUserDetailResponse"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission or scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found within the caller tenant scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Conflict (duplicate email or invitation already resolved)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "patch": {
        "summary": "Correct the profile of a user account (display name, phone, date of birth). Fields allowed by the owner decision `tesseramento.admin_profile_edit`; 409 `owner_decision_pending` while undecided. Emits `user.profile_update` with the operator reason.",
        "tags": [
          "admin",
          "identity"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminUserProfileUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Row payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminUserRow"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission or scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found within the caller tenant scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Conflict (duplicate email or invitation already resolved)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/admin/users/{userId}/suspend": {
      "post": {
        "summary": "Suspend a user account. Emits a `user.suspend` audit event.",
        "tags": [
          "admin",
          "identity"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminUserSuspendRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Row payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminUserRow"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission or scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found within the caller tenant scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Conflict (duplicate email or invitation already resolved)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/admin/users/{userId}/unsuspend": {
      "post": {
        "summary": "Re-activate a suspended user account. Emits a `user.unsuspend` audit event.",
        "tags": [
          "admin",
          "identity"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Row payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminUserRow"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission or scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found within the caller tenant scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Conflict (duplicate email or invitation already resolved)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/admin/role-assignments": {
      "post": {
        "summary": "Grant a scoped role assignment. Refuses platform_admin escalation by non-platform actors, broader-than-actor grants, and out-of-scope organization targets.",
        "tags": [
          "admin",
          "identity"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminRoleGrantRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Row payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminRoleAssignmentRow"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission or scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found within the caller tenant scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Conflict (duplicate email or invitation already resolved)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/role-assignments/{assignmentId}": {
      "delete": {
        "summary": "Revoke a role assignment. Returns the soft-revoked row (the row stays in storage for audit history). Emits a `user.role_revoke` audit event.",
        "tags": [
          "admin",
          "identity"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Row payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminRoleAssignmentRow"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission or scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found within the caller tenant scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Conflict (duplicate email or invitation already resolved)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "parameters": [
          {
            "name": "assignmentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/admin/invitations": {
      "get": {
        "summary": "List tenant invitations. Org-scoped operators only see invitations they own.",
        "tags": [
          "admin",
          "identity"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "List envelope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminInvitationListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission or scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found within the caller tenant scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Conflict (duplicate email or invitation already resolved)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      },
      "post": {
        "summary": "Issue an invitation. The response carries the plaintext token EXACTLY ONCE; only the hash is stored. Subsequent reads expose the hash-free projection.",
        "tags": [
          "admin",
          "identity"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminInvitationCreateRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Row payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminInvitationCreateResponse"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission or scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found within the caller tenant scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Conflict (duplicate email or invitation already resolved)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/invitations/{invitationId}": {
      "delete": {
        "summary": "Revoke a pending invitation. Emits a `user.invite_revoke` audit event.",
        "tags": [
          "admin",
          "identity"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Row payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminInvitationRow"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission or scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found within the caller tenant scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Conflict (duplicate email or invitation already resolved)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "parameters": [
          {
            "name": "invitationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/invitations/accept": {
      "post": {
        "summary": "Accept an invitation with a verified bearer identity. The route runs under a by_system context so the user_account + role_assignment writes are audited as system-on-behalf-of-invitee. Requires an X-Tenant header, but does not disclose whether a tenant or invitation is available.",
        "tags": [
          "public",
          "identity"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InvitationAcceptRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acceptance payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvitationAcceptResponse"
                }
              }
            },
            "headers": {
              "Cache-Control": {
                "description": "Private invitation response; never store in browser or intermediary caches.",
                "schema": {
                  "type": "string",
                  "example": "private, no-store, max-age=0"
                }
              }
            }
          },
          "400": {
            "description": "Malformed request or unavailable invitation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "headers": {
              "Cache-Control": {
                "description": "Private invitation response; never store in browser or intermediary caches.",
                "schema": {
                  "type": "string",
                  "example": "private, no-store, max-age=0"
                }
              }
            }
          },
          "401": {
            "description": "Invitation acceptance identity is required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "headers": {
              "Cache-Control": {
                "description": "Private invitation response; never store in browser or intermediary caches.",
                "schema": {
                  "type": "string",
                  "example": "private, no-store, max-age=0"
                }
              }
            }
          },
          "429": {
            "description": "Verified-invitee-subject rate limit exceeded when a valid invitee bearer is present; otherwise the source-IP invitation acceptance rate limit was exceeded before request processing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "headers": {
              "Cache-Control": {
                "description": "Private invitation response; never store in browser or intermediary caches.",
                "schema": {
                  "type": "string",
                  "example": "private, no-store, max-age=0"
                }
              }
            }
          },
          "503": {
            "description": "Invitation acceptance is temporarily unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "headers": {
              "Cache-Control": {
                "description": "Private invitation response; never store in browser or intermediary caches.",
                "schema": {
                  "type": "string",
                  "example": "private, no-store, max-age=0"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "headers": {
              "Cache-Control": {
                "description": "Private invitation response; never store in browser or intermediary caches.",
                "schema": {
                  "type": "string",
                  "example": "private, no-store, max-age=0"
                }
              }
            }
          }
        },
        "x-tenant-scope": "public_bound",
        "x-rate-limit-tier": "invite_accept",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "parameters": [
          {
            "name": "X-Tenant",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Tenant slug scoping the invitation token lookup."
          }
        ]
      }
    },
    "/auth/register-self": {
      "post": {
        "summary": "Idempotently provision the authenticated Supabase subject as an LC8 public_user, record signup consents and policy acknowledgements, and upsert the tenant_memberships hook source row.",
        "tags": [
          "self",
          "privacy"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AuthRegisterSelfRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthRegisterSelfResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": true,
        "x-privacy-classification": "personal_data"
      }
    },
    "/public/policy-versions": {
      "get": {
        "summary": "List currently active public legal policy versions for the API-key tenant.",
        "tags": [
          "public",
          "privacy"
        ],
        "security": [
          {
            "ApiKey": [
              "read:public.legal"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicPolicyVersionList"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "public",
        "x-rate-limit-tier": "public_widget",
        "x-audit-required": false,
        "x-privacy-classification": "public"
      }
    },
    "/me/profile": {
      "get": {
        "summary": "Read the caller’s own profile. Subject-locked; tenant scoped by session.",
        "tags": [
          "self",
          "privacy"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeProfileResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": false,
        "x-privacy-classification": "personal_data"
      },
      "patch": {
        "summary": "Partial profile update (display_name, locale, phone_e164). Email and is_minor are NOT editable here. Refuses non-subject and suspended callers. Emits `user.profile_update` with a redacted diff (phone is recorded as boolean transition).",
        "tags": [
          "self",
          "privacy"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MeProfileUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeProfileResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": true,
        "x-privacy-classification": "personal_data"
      }
    },
    "/me/avatar": {
      "patch": {
        "summary": "Pick or clear the cartoon avatar head. Closed enum of shipped heads; `null` clears it (falls back to the seeded avatar). Deliberately NOT behind the minor guardian gate — the id is a pseudonymous cosmetic choice with no personal data, and is the privacy-safe alternative to a photo. Still subject-locked and refuses suspended callers. Emits `user.profile_update`.",
        "tags": [
          "self",
          "privacy"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MeAvatarUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeProfileResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": true,
        "x-privacy-classification": "personal_data"
      }
    },
    "/me/consents": {
      "get": {
        "summary": "Latest per-purpose consent snapshot for the caller. Missing purposes are absent (deny by default).",
        "tags": [
          "self",
          "privacy"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeConsentSnapshotResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": false,
        "x-privacy-classification": "personal_data"
      },
      "post": {
        "summary": "Record an explicit consent grant/revoke. Append-only; the latest event wins. Emits `user.consent_change`.",
        "tags": [
          "self",
          "privacy"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MeConsentRecordRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeConsentRow"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": true,
        "x-privacy-classification": "personal_data"
      }
    },
    "/me/guardian/consents": {
      "post": {
        "summary": "W18 — a guardian records (grants/revokes) an OPTIONAL consent purpose on behalf of their linked minor. A reused idempotency key returns the original redacted event; a changed intent returns 409. The winner writes a GuardianConsentRecord and one ConsentRecord(source:guardian) mirror, then emits `user.parental_consent_change`. Relationship identifiers remain internal.",
        "tags": [
          "self",
          "privacy"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MeGuardianConsentRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeGuardianConsentRow"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": true,
        "x-privacy-classification": "personal_data"
      }
    },
    "/me/guardian/minors": {
      "get": {
        "summary": "W5-G — list the minors the caller is the recorded guardian of. Subject-locked to the guardian themselves; returns the ward’s display name (a guardian cannot pick a child by uuid) and nothing else about them. Empty list when the caller has no wards.",
        "tags": [
          "self",
          "privacy"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeGuardianMinorList"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": false,
        "x-privacy-classification": "personal_data"
      }
    },
    "/me/guardian/minors/{minorId}/consents": {
      "get": {
        "summary": "W18 — read a minor’s parental-consent history. Subject-locked: the minor, the recorded guardian, or an operator with privacy.request.handle may read. Rows are redacted event projections and never expose relationship identifiers.",
        "tags": [
          "self",
          "privacy"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeGuardianConsentList"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": false,
        "x-privacy-classification": "personal_data",
        "parameters": [
          {
            "name": "minorId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/admin/users/{userId}/guardian": {
      "post": {
        "summary": "W18 — link a holder of parental responsibility to a minor. Refuses self-guardianship. Emits `user.guardian_link`.",
        "tags": [
          "admin",
          "privacy"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminGuardianLinkRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminGuardianLinkResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/me/privacy-requests": {
      "get": {
        "summary": "List the caller’s own GDPR privacy requests with status and SLA. The DPO admin queue lives at `/admin/privacy-requests`.",
        "tags": [
          "self",
          "privacy"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MePrivacyRequestList"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": false,
        "x-privacy-classification": "personal_data"
      },
      "post": {
        "summary": "Submit a new GDPR request (export/deletion/rectification/restriction/objection/portability). Emits `privacy.request_submit` and starts the 30-day SLA clock.",
        "tags": [
          "self",
          "privacy"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MePrivacyRequestSubmitRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MePrivacyRequestRow"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": true,
        "x-privacy-classification": "personal_data"
      }
    },
    "/me/privacy-requests/{requestId}/export-delivery": {
      "post": {
        "summary": "W5-G — the subject asks the controller to hand over their completed export bundle. This records the request and notifies the DPO queue; it does NOT return the bundle or a download link (the artifact stays behind the DPO’s one-time, CAS-consumed admin link). Idempotent: asking twice keeps the first timestamp. 409 when the request is not a completed export/portability request.",
        "tags": [
          "self",
          "privacy"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MePrivacyRequestRow"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": true,
        "x-privacy-classification": "personal_data",
        "parameters": [
          {
            "name": "requestId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/admin/policy-versions": {
      "get": {
        "summary": "W5-G — list the tenant’s legal policy versions, superseded rows included, for the publishing cockpit. The public read exposes only the live rows.",
        "tags": [
          "admin",
          "privacy"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminPolicyVersionList"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal"
      },
      "post": {
        "summary": "Publish a tenant-wide legal policy version and supersede the prior active version of the same kind. Emits `admin.policy_publish`.",
        "tags": [
          "admin",
          "privacy"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminPolicyVersionPublishRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminPolicyVersionPublishResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/me/support-tickets": {
      "post": {
        "summary": "Self-service create — open a support ticket for the authenticated user. Privacy/data-rights categories are routed to the DPO queue server-side.",
        "tags": [
          "me",
          "support"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MeSupportTicketOpenRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeSupportTicketRow"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      },
      "get": {
        "summary": "List the caller support ticket history with SLA and tenant/city context",
        "tags": [
          "support"
        ],
        "responses": {
          "200": {
            "description": "Support ticket history",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": false,
        "x-privacy-classification": "sensitive_pii"
      }
    },
    "/admin/fixtures/{matchId}/postpone": {
      "post": {
        "summary": "Postpone a scheduled fixture (FSM scheduled → postponed). Records the reason in the audit metadata and fans out the official-communication cascade to active assignment holders; the response carries the honest cascade summary. Emits `fixture.postponed`.",
        "tags": [
          "admin",
          "sport"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Match id from the fixture row."
          },
          {
            "name": "If-Match",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Opaque ETag returned by the latest admin fixture projection."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminFixturePostponeRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminFixtureChangeResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "428": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/fixtures/{matchId}/reschedule": {
      "post": {
        "summary": "Reschedule a scheduled/postponed fixture to a new datetime (and optionally field). Detects field/slot conflicts inside the 90-minute window: 409 unless `allow_conflict` is set, in which case the override is persisted, returned and audited. Emits `fixture.rescheduled`.",
        "tags": [
          "admin",
          "sport"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Match id from the fixture row."
          },
          {
            "name": "If-Match",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Opaque ETag returned by the latest admin fixture projection."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminFixtureRescheduleRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminFixtureChangeResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "428": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/fixtures/conflicts": {
      "get": {
        "summary": "List same-field fixture conflicts (kickoffs closer than the 90-minute slot window, scheduled/live states). Optional `tournament_id` query filter matches either side of the pair.",
        "tags": [
          "admin",
          "sport"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "tournament_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional tournament id; returns conflict pairs where either side belongs to this tournament."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminFixtureConflictList"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/assignments/planner": {
      "get": {
        "summary": "Referee/evaluator assignment planner: per scheduled/postponed fixture, confirmed and pending assignment counts plus a referee-centric coverage flag (covered/pending/uncovered). Requires `match.assignment.manage`.",
        "tags": [
          "admin",
          "sport"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminAssignmentPlannerList"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 80
            }
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 120
            }
          },
          {
            "name": "sla",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "due",
                "breached"
              ],
              "default": "all"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "oldest",
                "newest",
                "sla"
              ],
              "default": "sla"
            }
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}(T[\\d:.]+(Z|[+-]\\d{2}:?\\d{2})?)?$"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}(T[\\d:.]+(Z|[+-]\\d{2}:?\\d{2})?)?$"
            }
          },
          {
            "name": "tournament_id",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "round_id",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "coverage",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "covered",
                "pending",
                "uncovered"
              ]
            }
          }
        ]
      }
    },
    "/admin/imports": {
      "get": {
        "summary": "List durable import dossiers with server-side pagination",
        "tags": [
          "admin",
          "imports"
        ],
        "responses": {
          "200": {
            "description": "Import dossier page",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_bound",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "state",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "validated",
                "validation_failed",
                "committed",
                "partially_committed",
                "rolled_back",
                "rollback_failed"
              ]
            }
          }
        ]
      },
      "post": {
        "summary": "Run a backward-compatible audited import dossier",
        "tags": [
          "admin",
          "imports"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "teams",
                      "players",
                      "rosters",
                      "fields",
                      "fixtures",
                      "assignments",
                      "rounds",
                      "results"
                    ]
                  },
                  "rows": {
                    "type": "array",
                    "items": {},
                    "minItems": 1,
                    "maxItems": 200
                  }
                },
                "required": [
                  "kind",
                  "rows"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Committed import dossier",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_bound",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "sensitive_mutation",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/support/incidents/{incidentId}/own": {
      "post": {
        "summary": "Claim incident ownership (self-assignment; arbitrary targets are refused to prevent ghost owners). Requires `support.manage`. Emits `incident.owner_claimed`.",
        "tags": [
          "admin",
          "support"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "incidentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Incident id from the incident row."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminIncidentRow"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/support/incidents/{incidentId}/status": {
      "post": {
        "summary": "Transition incident status along the FSM (investigating/identified/monitoring/resolved; resolved can reopen to investigating). Requires `support.manage`. Emits `incident.status_changed`.",
        "tags": [
          "admin",
          "support"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "incidentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Incident id from the incident row."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminIncidentStatusUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminIncidentRow"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/support/incidents/{incidentId}/timeline": {
      "get": {
        "summary": "Incident timeline projected from the append-only audit log (pseudonymized rows). Requires the tenant-wide support workflow gate, not global audit.read.",
        "tags": [
          "admin",
          "support"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "incidentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Incident id from the incident row."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminAuditList"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/support/tickets/{ticketId}/claim": {
      "post": {
        "summary": "Claim a support ticket (self-assignment). dpo_only tickets are mutable only by the DPO authority. Requires `support.manage`. Emits `support.ticket_assigned`.",
        "tags": [
          "admin",
          "support"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ticketId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Support ticket id from the ticket row."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminSupportTicketRow"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/support/tickets/{ticketId}/status": {
      "post": {
        "summary": "Transition ticket status along the FSM (open → in_progress → awaiting_user/resolved → closed; resolved can reopen). Bumps last_activity_at. Requires `support.manage`. Emits `support.ticket_status_changed`.",
        "tags": [
          "admin",
          "support"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ticketId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Support ticket id from the ticket row."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminSupportTicketStatusUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminSupportTicketRow"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/support/tickets/{ticketId}/escalate": {
      "post": {
        "summary": "Escalate ticket priority (strictly upward: low < normal < high < urgent) with a recorded reason. Requires `support.manage`. Emits `support.ticket_escalated`.",
        "tags": [
          "admin",
          "support"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ticketId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Support ticket id from the ticket row."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminSupportTicketEscalateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminSupportTicketRow"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/support/tickets/{ticketId}/timeline": {
      "get": {
        "summary": "Support ticket timeline projected from the append-only audit log (pseudonymized rows). dpo_only tickets resolve as 404 for non-DPO callers. Requires the tenant-wide support workflow gate, not global audit.read.",
        "tags": [
          "admin",
          "support"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "ticketId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Support ticket id from the ticket row."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminAuditList"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/matches/{matchId}/pre-match": {
      "get": {
        "summary": "Admin read — submitted match sheets for a printable match document; absent sheets stay absent and roster rows are never substituted.",
        "tags": [
          "admin",
          "team-communications"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Match id."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OfficialPreMatchResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "pseudonymized"
      }
    },
    "/admin/player-claims": {
      "get": {
        "summary": "Admin list — player self-claim requests with claimant/operator identities pseudonymized.",
        "tags": [
          "admin",
          "team-communications"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminPlayerClaimListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "pseudonymized"
      }
    },
    "/admin/player-claims/{claimId}/request-evidence": {
      "post": {
        "summary": "Admin request-evidence — move a pending claim back to the evidence-needed workflow while keeping the public status pending.",
        "tags": [
          "admin",
          "team-communications"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "claimId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Player claim id."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminPlayerClaimRequestEvidenceRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminPlayerClaimRow"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "pseudonymized"
      }
    },
    "/admin/player-claims/{claimId}": {
      "patch": {
        "summary": "Admin decide — approve or reject a player self-claim. Reject requires a reason.",
        "tags": [
          "admin",
          "team-communications"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "claimId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Player claim id."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminPlayerClaimDecideRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminPlayerClaimRow"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "pseudonymized"
      }
    },
    "/admin/teams/{teamId}/communications": {
      "get": {
        "summary": "Admin list — official communications issued to one team, newest first, with operator identity pseudonymized.",
        "tags": [
          "admin",
          "team-communications"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Team id."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminTeamCommunicationList"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "pseudonymized"
      },
      "post": {
        "summary": "Admin publish — issue an official team communication, optionally requiring acknowledgement by the team secretariat.",
        "tags": [
          "admin",
          "team-communications"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Team id."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminTeamCommunicationIssue"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminTeamCommunicationRow"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "pseudonymized"
      }
    },
    "/admin/teams/{teamId}/communications/{communicationId}/acks": {
      "get": {
        "summary": "Admin receipts — list pseudonymized acknowledgement receipts for a communication belonging to the team in the path.",
        "tags": [
          "admin",
          "team-communications"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Team id."
          },
          {
            "name": "communicationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Team communication id."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamCommunicationAckList"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "pseudonymized"
      }
    },
    "/me/team-area/dashboard": {
      "get": {
        "summary": "Read a team dashboard under an explicit tournament scope",
        "tags": [
          "team-area"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "team_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "tournament_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Scoped team dashboard",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/me/team-area/teams": {
      "get": {
        "summary": "Team-area team picker: returns the teams visible to the authenticated captain/member/operator without exposing raw tenant or organization ids.",
        "tags": [
          "me",
          "team-area"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamAreaTeamListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": false,
        "x-privacy-classification": "pseudonymized"
      }
    },
    "/me/team-area/roster": {
      "get": {
        "summary": "Privacy-shaped roster with lineup eligibility state. Hides medical, account, guardian and document details while explaining blockers.",
        "tags": [
          "me",
          "team-area"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "team_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Team id scoped to the caller membership."
          },
          {
            "name": "match_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional match id for per-match roster state."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamAreaRosterResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": false,
        "x-privacy-classification": "pseudonymized"
      }
    },
    "/me/team-area/documents": {
      "get": {
        "summary": "Read team documents under explicit team, tournament and season scope",
        "tags": [
          "team-area"
        ],
        "responses": {
          "200": {
            "description": "Scoped team documents",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": false,
        "x-privacy-classification": "sensitive_pii",
        "parameters": [
          {
            "name": "team_id",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "name": "tournament_id",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "name": "season_id",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ]
      }
    },
    "/me/team-area/communications": {
      "get": {
        "summary": "List official team communications visible to the caller and mark whether the current user has acknowledged each row.",
        "tags": [
          "me",
          "team-area"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "team_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Team id scoped to the caller membership."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamAreaCommunicationList"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/me/team-area/communications/{communicationId}/ack": {
      "post": {
        "summary": "Acknowledge an official team communication. Emits `team.communication_ack` and refuses cross-team acknowledgements.",
        "tags": [
          "me",
          "team-area"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "communicationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Team communication id."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamAreaCommunicationRow"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/me/team-area/communications/{communicationId}/acks": {
      "get": {
        "summary": "List pseudonymized acknowledgement receipts for an official team communication visible to the caller team.",
        "tags": [
          "me",
          "team-area"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "communicationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Team communication id."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamCommunicationAckList"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": false,
        "x-privacy-classification": "pseudonymized"
      }
    },
    "/me/team-area/availability": {
      "post": {
        "summary": "Set player availability for a match. Players may self-declare approved claims; captains may set team rows through server-derived team membership.",
        "tags": [
          "me",
          "team-area"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TeamAreaSetAvailabilityRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamAreaRosterPlayer"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/me/team-area/callups": {
      "post": {
        "summary": "Set a player call-up for a match. Requires captain/team-manager lineup authority derived from team membership.",
        "tags": [
          "me",
          "team-area"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TeamAreaSetCallUpRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamAreaRosterPlayer"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/me/team-area/lineups": {
      "post": {
        "summary": "Submit a locked calcio-a-8 lineup. Server-side eligibility rejects wrong-team, suspended, transferred or expired roster rows (availability/call-up state is captain planning, not a lineup-submit gate).",
        "tags": [
          "me",
          "team-area"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TeamAreaSubmitLineupRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamAreaLineupResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/me/team-area/lineups/{matchId}/{side}": {
      "get": {
        "summary": "Read the submitted lineup for the caller team side, or an empty not-submitted response without leaking another team.",
        "tags": [
          "me",
          "team-area"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Match id."
          },
          {
            "name": "side",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Lineup side: home or away."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamAreaLineupResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/me/player-area/summary": {
      "get": {
        "summary": "Player self-service summary across approved claims, availability, call-ups, inbox and correction history. Subject-locked to the caller.",
        "tags": [
          "me",
          "team-area"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlayerAreaSummaryResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": false,
        "x-privacy-classification": "pseudonymized"
      }
    },
    "/me/player-claims": {
      "get": {
        "summary": "List the authenticated user’s player profile claims. Subject-locked and privacy-shaped for mobile self-service.",
        "tags": [
          "me",
          "team-area"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlayerClaimListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": false,
        "x-privacy-classification": "pseudonymized"
      },
      "post": {
        "summary": "Submit a player profile claim for operator review. The actor is derived from the bearer session.",
        "tags": [
          "me",
          "team-area"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlayerClaimSubmitRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlayerClaimSelfRow"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": true,
        "x-privacy-classification": "pseudonymized"
      }
    },
    "/me/team-area/player-claims": {
      "get": {
        "summary": "Captain: pending player-account link requests on the players of one team, with the owner rule on who confirms (Q017/Q018).",
        "tags": [
          "me",
          "team-area"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "team_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Team id scoped to the caller membership."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamAreaPlayerClaimListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": false,
        "x-privacy-classification": "pseudonymized"
      }
    },
    "/me/team-area/player-claims/{claimId}/decision": {
      "post": {
        "summary": "Captain of the player's current team: confirm or reject a link request. With «La squadra» a confirmation links the account; with «La squadra, con verifica della Lega» the League approves afterwards.",
        "tags": [
          "me",
          "team-area"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "claimId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Player claim id."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TeamAreaPlayerClaimDecisionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamAreaPlayerClaimDecisionResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": true,
        "x-privacy-classification": "pseudonymized"
      }
    },
    "/me/player-claims/candidates": {
      "get": {
        "summary": "List claimable player-profile candidates for the authenticated user, excluding linked/inactive/minor profiles and tenant/org metadata.",
        "tags": [
          "me",
          "team-area"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional candidate search by sport name, role or current team."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional page size capped by the server."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlayerClaimCandidateListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": false,
        "x-privacy-classification": "pseudonymized"
      }
    },
    "/me/player-claims/{claimId}": {
      "get": {
        "summary": "Read one of the authenticated user’s player claims; operators may also inspect through the same subject lock.",
        "tags": [
          "me",
          "team-area"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "claimId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Player claim id."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlayerClaimSelfRow"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": false,
        "x-privacy-classification": "pseudonymized"
      },
      "delete": {
        "summary": "Cancel/revoke one pending authenticated-user player claim. Emits player.claim_cancel.",
        "tags": [
          "me",
          "team-area"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "claimId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Player claim id."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlayerClaimSelfRow"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": true,
        "x-privacy-classification": "pseudonymized"
      }
    },
    "/me/officials/pre-match/{matchId}": {
      "get": {
        "summary": "Assigned official pre-match view of submitted lineups. Refuses unassigned officials and hides private eligibility details.",
        "tags": [
          "me",
          "team-area"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Match id."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OfficialPreMatchResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": false,
        "x-privacy-classification": "pseudonymized"
      }
    },
    "/me/officials/pre-match/{matchId}/participation": {
      "post": {
        "summary": "N4 — the assigned official confirms one person present or absent on the sporting check-in dossier. Same write the secretariat desk performs; authorized by the confirmed designation instead of `checkin.manage`, and it answers with a receipt rather than the whole dossier.",
        "tags": [
          "me",
          "team-area"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Match id."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OfficialPreMatchParticipationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OfficialPreMatchParticipationReceipt"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": true,
        "x-privacy-classification": "pseudonymized"
      }
    },
    "/me/officials/pre-match/{matchId}/checks/{checkId}": {
      "put": {
        "summary": "Assigned official appends one idempotent pre-match completion, override, or withdrawal event.",
        "tags": [
          "me",
          "team-area"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Match id."
          },
          {
            "name": "checkId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OfficialPreMatchCheckWriteRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OfficialPreMatchCheckRecord"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": true,
        "x-privacy-classification": "pseudonymized"
      }
    },
    "/admin/medical-eligibility": {
      "get": {
        "summary": "MED-01/03 — paginated medical eligibility register: tournament / team / state filters and name search. Operator-only (player.medical.manage); the operator note is never included in the list.",
        "tags": [
          "admin",
          "medical"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "tournament_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Restrict to players registered in this competition."
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Restrict to players registered with this team."
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "One of eligible | expiring | expired | blocked | declared_missing | not_recorded."
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Case-insensitive match on sport name or slug."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Medical registry projection",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminMedicalRegistryList"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks player.medical.manage",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Player not found in caller scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/medical-eligibility/{playerId}": {
      "get": {
        "summary": "MED-02 — medical register detail for one player. Answers 200 with state not_recorded when nothing was ever recorded, instead of 404.",
        "tags": [
          "admin",
          "medical"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "playerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Player id scoped to the caller tenant/organization."
          }
        ],
        "responses": {
          "200": {
            "description": "Medical registry projection",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminMedicalRegistryDetail"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks player.medical.manage",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Player not found in caller scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/players/{playerId}/medical-eligibility": {
      "get": {
        "summary": "FC12 — operator read of a player medical eligibility (idoneità) record. Operator-only; never exposed to captains/officials/public.",
        "tags": [
          "admin",
          "medical"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "playerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Player id scoped to the caller tenant/organization."
          }
        ],
        "responses": {
          "200": {
            "description": "Operator medical row",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminMedicalEligibilityRow"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks player.medical.manage",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Player not found in caller scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      },
      "put": {
        "summary": "FC12 — operator records/updates a player medical eligibility. Audited (status only); downstream sees the derived non-schierabile state.",
        "tags": [
          "admin",
          "medical"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "playerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Player id scoped to the caller tenant/organization."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminMedicalEligibilitySet"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Operator medical row",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminMedicalEligibilityRow"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks player.medical.manage",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Player not found in caller scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/public/tournaments/{tournamentId}/stats": {
      "get": {
        "summary": "FC13 public statistics for a tournament: top scorers, player/team records, ranking explanation and data freshness (homologated results only)",
        "tags": [
          "public",
          "fc13"
        ],
        "security": [
          {
            "ApiKey": [
              "read:public.players"
            ]
          }
        ],
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Tournament id scoped to the tenant resolved from the credential."
          }
        ],
        "responses": {
          "200": {
            "description": "Public tournament statistics envelope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicTournamentStats"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "public",
        "x-rate-limit-tier": "public_widget",
        "x-audit-required": false,
        "x-privacy-classification": "public"
      }
    },
    "/admin/tournaments/{tournamentId}/official-analytics": {
      "get": {
        "summary": "FC13 admin official/evaluator analytics: report submit/homologation latency, correction rate, coverage and consistency. Admin cockpit + match.report.read.official; never public.",
        "tags": [
          "admin",
          "fc13"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Tournament id scoped to the tenant resolved from the credential."
          }
        ],
        "responses": {
          "200": {
            "description": "Admin official/evaluator analytics",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminOfficialAnalytics"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks admin cockpit role / official-report read",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/public/matches/{matchId}/center": {
      "get": {
        "summary": "FC14 public match center: officiality, public-safe event timeline, scorers, cards and MVP. Minors are unnamed; draft/live events are provisional, never shown as official.",
        "tags": [
          "public",
          "fc14"
        ],
        "security": [
          {
            "ApiKey": [
              "read:public.matches"
            ]
          }
        ],
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Match id scoped to the tenant resolved from the credential."
          }
        ],
        "responses": {
          "200": {
            "description": "Public match center",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicMatchCenter"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "public",
        "x-rate-limit-tier": "public_widget",
        "x-audit-required": false,
        "x-privacy-classification": "public"
      }
    },
    "/public/players/{slug}/stats": {
      "get": {
        "summary": "FC14 public per-player season statistics aggregated from homologated results. A minor returns the profile with is_minor_excluded and empty figures.",
        "tags": [
          "public",
          "fc14"
        ],
        "security": [
          {
            "ApiKey": [
              "read:public.players"
            ]
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Public player slug scoped to the tenant resolved from the credential."
          }
        ],
        "responses": {
          "200": {
            "description": "Public player statistics",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicPlayerStats"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "public",
        "x-rate-limit-tier": "public_widget",
        "x-audit-required": false,
        "x-privacy-classification": "public"
      }
    },
    "/public/media": {
      "get": {
        "summary": "FC14 public media catalog: approved + ready assets with consent-safe, non-minor subjects. Optional match_id/team_id narrows to a tagged subject.",
        "tags": [
          "public",
          "fc14"
        ],
        "security": [
          {
            "ApiKey": [
              "read:public.media"
            ]
          }
        ],
        "parameters": [
          {
            "name": "match_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Only assets tagged to this match."
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Only assets tagged to this team."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 100
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Opaque cursor returned as next_cursor by the previous page."
          }
        ],
        "responses": {
          "200": {
            "description": "Public media list",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicMediaList"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "public",
        "x-rate-limit-tier": "public_widget",
        "x-audit-required": false,
        "x-privacy-classification": "public"
      }
    },
    "/public/media/{mediaId}": {
      "get": {
        "summary": "FC14 public single media asset. 404 when missing or not publicly visible (pending/rejected/taken_down/not-ready).",
        "tags": [
          "public",
          "fc14"
        ],
        "security": [
          {
            "ApiKey": [
              "read:public.media"
            ]
          }
        ],
        "parameters": [
          {
            "name": "mediaId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Media asset id scoped to the tenant resolved from the credential."
          }
        ],
        "responses": {
          "200": {
            "description": "Public media asset",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicMediaAsset"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "public",
        "x-rate-limit-tier": "public_widget",
        "x-audit-required": false,
        "x-privacy-classification": "public"
      }
    },
    "/me/fantasy/capabilities": {
      "get": {
        "summary": "Server-derived fantasy feature capabilities. Join-by-code remains available before can_play; after a successful join the same read reflects league membership immediately. H2H and incomplete global/live features default off.",
        "tags": [
          "self",
          "fc15"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FantasyFeatureCapabilitiesView"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": false,
        "x-privacy-classification": "personal_data"
      }
    },
    "/me/fantasy/home": {
      "get": {
        "summary": "Fantasy home: the caller’s visible leagues (public + private member) with their team per league. Gameplay is available to active adult accounts regardless of sports role; `can_play` remains false for minors or unavailable accounts/modules.",
        "tags": [
          "self",
          "fc15"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FantasyHomeResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": false,
        "x-privacy-classification": "personal_data"
      }
    },
    "/me/fantasy/auctions": {
      "post": {
        "summary": "Create a server-authoritative live auction for a fantasy league. The league must exist in the caller’s tenant; a private league is opened only by its owner and the official (owner-less) league only by an operator. A league may have at most one open room (422 `auction_already_open`, naming the live one). Requires current fantasy-profiling consent.",
        "tags": [
          "self",
          "fc15"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateFantasyAuctionRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateFantasyAuctionResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": true,
        "x-privacy-classification": "personal_data"
      }
    },
    "/me/fantasy/auctions/{auctionId}": {
      "get": {
        "summary": "Read the current auction snapshot. Participant-only; resolves expired lots using server time before returning the GDPR-minimized state.",
        "tags": [
          "self",
          "fc15"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "auctionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Fantasy auction id scoped to the caller’s tenant."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FantasyAuctionActionResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": false,
        "x-privacy-classification": "personal_data"
      }
    },
    "/me/fantasy/auctions/{auctionId}/join": {
      "post": {
        "summary": "Join an auction lobby with a fantasy team owned by the caller. Rejoining the same team is idempotent.",
        "tags": [
          "self",
          "fc15"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "auctionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Fantasy auction id scoped to the caller’s tenant."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/JoinFantasyAuctionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FantasyAuctionActionResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": true,
        "x-privacy-classification": "personal_data"
      }
    },
    "/me/fantasy/auctions/{auctionId}/nominate": {
      "post": {
        "summary": "Nominate a player when the caller owns the current turn seat. Opening price and role/budget constraints are enforced server-side.",
        "tags": [
          "self",
          "fc15"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "auctionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Fantasy auction id scoped to the caller’s tenant."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NominateFantasyAuctionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FantasyAuctionActionResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": true,
        "x-privacy-classification": "personal_data"
      }
    },
    "/me/fantasy/auctions/{auctionId}/bid": {
      "post": {
        "summary": "Place a server-authoritative auction bid. The idempotency key is bound to team, lot and amount; retries never double-apply.",
        "tags": [
          "self",
          "fc15"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "auctionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Fantasy auction id scoped to the caller’s tenant."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlaceFantasyAuctionBidRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FantasyAuctionActionResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "sensitive_mutation",
        "x-audit-required": true,
        "x-privacy-classification": "personal_data"
      }
    },
    "/me/fantasy/auctions/{auctionId}/pass": {
      "post": {
        "summary": "Pass on the live lot for a team owned by the caller. Duplicate passes are idempotent and cannot revive or double-close a lot.",
        "tags": [
          "self",
          "fc15"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "auctionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Fantasy auction id scoped to the caller’s tenant."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PassFantasyAuctionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FantasyAuctionActionResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": true,
        "x-privacy-classification": "personal_data"
      }
    },
    "/me/fantasy/auctions/{auctionId}/cancel": {
      "post": {
        "summary": "AU-01 — close the room for good. Authority is the league’s own (its owner, or an operator on the ownerless official league): whoever may open a room may cancel it. The live lot is abandoned unsold — nobody is debited and no roster slot is appended — so the league can open a replacement room.",
        "tags": [
          "self",
          "fc15"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "auctionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Fantasy auction id scoped to the caller’s tenant."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CancelFantasyAuctionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FantasyAuctionActionResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": true,
        "x-privacy-classification": "personal_data"
      }
    },
    "/me/fantasy/auctions/{auctionId}/skip-turn": {
      "post": {
        "summary": "AU-01 — move the nomination turn on when the seat will not call. Same authority as cancel. Takes no team: the skipped seat is whichever holds the turn. The turn also expires on its own via `nomination_deadline_at`, so this is the impatient path, not the only one.",
        "tags": [
          "self",
          "fc15"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "auctionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Fantasy auction id scoped to the caller’s tenant."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SkipFantasyAuctionTurnRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FantasyAuctionActionResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": true,
        "x-privacy-classification": "personal_data"
      }
    },
    "/me/fantasy/leagues": {
      "post": {
        "summary": "Create a public or private community fantasy league owned by an active adult caller, independent of sports role. Visibility defaults to private. A compatibility join code is returned; public leagues are discoverable and joined without a code.",
        "tags": [
          "self",
          "fc15"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePrivateLeagueRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatePrivateLeagueResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": true,
        "x-privacy-classification": "personal_data"
      }
    },
    "/me/fantasy/leagues/join": {
      "post": {
        "summary": "Join a private league by code. The league is resolved server-side from the code hash; a missing/wrong code is an opaque 403. Creates the caller’s team.",
        "tags": [
          "self",
          "fc15"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/JoinFantasyLeagueRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Idempotent replay",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JoinFantasyLeagueResponse"
                }
              }
            }
          },
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JoinFantasyLeagueResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": true,
        "x-privacy-classification": "personal_data"
      }
    },
    "/me/fantasy/leagues/{leagueId}": {
      "get": {
        "summary": "League detail: leaderboard rows + display state (empty/provisional/stale/superseded/final) and the caller’s team. Private leagues are members-only (403 otherwise).",
        "tags": [
          "self",
          "fc15"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "leagueId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Fantasy league id scoped to the caller’s tenant."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FantasyLeagueDetailResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": false,
        "x-privacy-classification": "personal_data"
      }
    },
    "/me/fantasy/leagues/{leagueId}/join-code": {
      "post": {
        "summary": "W3D (Q117/Q118) — a new invite code for a private league; the previous code stops working at once and teams already in the league stay. Allowed to the creator only while the owner decision `fanta.private_league.owner_powers` includes `rotate_code` (409 `owner_decision_pending` while undecided, 403 `league_owner_power_not_granted` when not granted), and to the Lega. The plaintext code is returned once.",
        "tags": [
          "self",
          "fc15"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "leagueId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Fantasy league id scoped to the caller’s tenant."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatePrivateLeagueResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": true,
        "x-privacy-classification": "personal_data"
      }
    },
    "/me/fantasy/leagues/{leagueId}/players": {
      "get": {
        "summary": "League player catalog: public-safe active roster members from the teams registered in the fantasy league tournament. Private leagues are members-only; minors and inactive players are withheld.",
        "tags": [
          "self",
          "fc15"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "leagueId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Fantasy league id scoped to the caller’s tenant."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FantasyLeaguePlayersResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": false,
        "x-privacy-classification": "personal_data"
      }
    },
    "/me/fantasy/leagues/{leagueId}/players/{playerId}": {
      "get": {
        "summary": "One player’s card in this league: the same catalog row (price, ownership, season stats) plus how the value moved, one point per scored giornata, oldest first. Replaces downloading the whole listino to render a single player. Resolves any player OWNED by a team in this league too, not only the league’s tournament rosters: a player bought and then dropped from the public rosters is still on the rival card that links here, and used to 404. A player owned in another league, or not owned here at all, is still 404 — the catalog is not a tenant-wide player-existence oracle — and a minor or deactivated player stays 404 because identity passes the same public filter as the rival card.",
        "tags": [
          "self",
          "fc15"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "leagueId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Fantasy league visible to the caller."
          },
          {
            "name": "playerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Player of the league’s tournament, or one owned by a team in this league."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FantasyLeaguePlayerDetailResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": false,
        "x-privacy-classification": "personal_data"
      }
    },
    "/me/fantasy/leagues/{leagueId}/rounds": {
      "get": {
        "summary": "Upcoming/past giornate usable as a lineup round_id, with the server-derived deadline (earliest kickoff) and a fixture count. Carries no team identities or fixtures (GDPR). Private leagues are members-only.",
        "tags": [
          "self",
          "fc15"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "leagueId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Fantasy league id scoped to the caller’s tenant."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FantasyUpcomingRoundsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": false,
        "x-privacy-classification": "personal_data"
      }
    },
    "/me/fantasy/leagues/{leagueId}/calendar": {
      "get": {
        "summary": "N3 — the fantasy calendar: every giornata of the bound tournament with its real fixtures (kickoff, teams, display score), its phase against the server clock, and the caller’s own line (lineup state, fantapunti, cumulative points and the position the standings had AFTER that giornata). Head-to-head leagues additionally carry the round’s opponent and outcome. Numbers are passed through from the SAME score/leaderboard projections the classifica reads, so the two screens can never disagree; a giornata with no score row reports null, never 0. Private leagues are members-only.",
        "tags": [
          "self",
          "fc15"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "leagueId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Fantasy league id scoped to the caller’s tenant."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FantasyCalendarResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": false,
        "x-privacy-classification": "personal_data"
      }
    },
    "/me/fantasy/leagues/{leagueId}/rounds/{roundId}": {
      "get": {
        "summary": "N3 — one giornata in full: its real fixtures, the caller’s own line, and the lineup the caller actually fielded with the per-player voto and fantapunti breakdown. Owner-scoped: only the caller’s own lineup is returned (a rival’s giornata lineup is not published). Private leagues are members-only.",
        "tags": [
          "self",
          "fc15"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "leagueId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Fantasy league id scoped to the caller’s tenant."
          },
          {
            "name": "roundId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Round id of the tournament the league is bound to."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FantasyRoundDetailResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": false,
        "x-privacy-classification": "personal_data"
      }
    },
    "/me/fantasy/leagues/{leagueId}/rounds/{roundId}/teams/{teamId}/lineup": {
      "get": {
        "summary": "M2 — lo SCONTRO DIRETTO di una giornata: la formazione che quella squadra ha schierato, con voto e fantapunti per giocatore, il punteggio di squadra e (in una lega head_to_head) lo stesso blocco per l’avversario. E’ l’unica lettura che pubblica la formazione di una squadra che non e’ del chiamante, e la pubblica solo a giornata CHIUSA: prima della chiusura risponde 409 fantasy_round_not_locked, perche’ la formazione di un rivale prima del fischio e’ la sua strategia. Membership: il chiamante deve avere una squadra nella lega, oppure la lega deve essere pubblica (stessa autorita’ di /teams/{teamId}). Leghe private solo ai membri.",
        "tags": [
          "self",
          "fc15"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "leagueId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Fantasy league id scoped to the caller’s tenant."
          },
          {
            "name": "roundId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Round id of the tournament the league is bound to."
          },
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Fantasy team id belonging to that league."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FantasyTeamRoundLineupResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": false,
        "x-privacy-classification": "personal_data"
      }
    },
    "/me/fantasy/leagues/{leagueId}/rules": {
      "get": {
        "summary": "Member-safe active rule set (R-13): weights, captain mode and multiplier, rating weight, MVP bonus, budget, the server-owned locked composition and transfer window. Drives the regolamento/onboarding so the tutorial == the real thing. No audit columns or ids.",
        "tags": [
          "self",
          "fc15"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "leagueId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Fantasy league id scoped to the caller’s tenant."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FantasyRuleSetView"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": false,
        "x-privacy-classification": "personal_data"
      },
      "post": {
        "summary": "FB-06 — the league OWNER publishes their own regolamento. Before this, a user who created a league with friends inherited Standard v1 forever: the only publish route required organization.administer, which no member holds. Whitelisted fields only (budget, weights, captain multiplier, rating weight, MVP bonus, lineup lock policy, available formations, transfer window); an omitted field keeps its current value. Refused once the league has a scored giornata (rules_locked_after_kickoff) — those rules are history, not configuration. role_quota, squad_size and captain_mode stay platform-locked because the scoring engine, the lineup validator and the auction read them.",
        "tags": [
          "self",
          "fc15"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "leagueId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Fantasy league id owned by the caller."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublishOwnedLeagueRulesRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublishOwnedLeagueRulesResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "sensitive_mutation",
        "x-audit-required": true,
        "x-privacy-classification": "personal_data"
      }
    },
    "/me/fantasy/leagues/{leagueId}/market-state": {
      "patch": {
        "summary": "FB-06 — set the league’s transfer-window override: `auto` follows the round clock, `open` runs a mercato di riparazione, `closed` freezes trading. `windowFor` resolves `open = override ?? clock` and still reports the clock’s opened_at/closes_at, so the countdown beside the button keeps telling the truth. Season bounds are not overridable. League owner only (an operator uses the /admin twin).",
        "tags": [
          "self",
          "fc15"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "leagueId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Fantasy league id owned by the caller."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetFantasyMarketStateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SetFantasyMarketStateResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "sensitive_mutation",
        "x-audit-required": true,
        "x-privacy-classification": "personal_data"
      }
    },
    "/me/fantasy/leagues/{leagueId}/standings": {
      "get": {
        "summary": "B4 head-to-head standings (scontri diretti): a round-robin fixture calendar + 3-1-0 W/D/L table, with each round’s fantavoto sum converted to goals via the rescaled 8-a-side formula (first-goal threshold = the league’s own median round score, NOT the Serie-A 66 anchor). GDPR-safe: team name + record only. Returns an honest empty/upcoming calendar for total_points leagues. Private leagues are members-only.",
        "tags": [
          "self",
          "fc15"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "leagueId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Fantasy league id scoped to the caller’s tenant."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FantasyH2HStandingsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": false,
        "x-privacy-classification": "personal_data"
      }
    },
    "/me/fantasy/leagues/{leagueId}/auctions": {
      "get": {
        "summary": "W1-G — the league’s live auctions (newest first) so the sala d’asta is reachable from the product instead of a deep link. Members-only for private leagues; GDPR-safe (seat COUNT only, never the seated managers). `can_create` mirrors the server authorization for opening a new room.",
        "tags": [
          "self",
          "fc15"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "leagueId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Fantasy league id scoped to the caller’s tenant."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FantasyAuctionListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": false,
        "x-privacy-classification": "personal_data"
      }
    },
    "/me/fantasy/leagues/{leagueId}/teams": {
      "get": {
        "summary": "N2 — every team in the league with its authoritative standings numbers, so the fantasy area can show WHO ELSE is playing instead of a leaderboard of anonymous rows. N4/OG-24: `manager_display_name` carries the manager DISPLAY NAME to members of the same league (never email or phone), and `manager_identity` declares that this is the platform default with the fields it exposes. Private leagues are members-only.",
        "tags": [
          "self",
          "fc15"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "leagueId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Fantasy league id scoped to the caller’s tenant."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FantasyLeagueTeamsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": false,
        "x-privacy-classification": "personal_data"
      }
    },
    "/me/fantasy/leagues/{leagueId}/teams/{teamId}": {
      "get": {
        "summary": "N2 — a rival team’s active roster as another manager in the same league may see it: the same roster shape as the owner view minus the owner-only economy (no budget, orders, drafts or lineup) and with no owner identity. Private leagues are members-only.",
        "tags": [
          "self",
          "fc15"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "leagueId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Fantasy league id scoped to the caller’s tenant."
          },
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Fantasy team id belonging to that league."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FantasyLeagueTeamDetailResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": false,
        "x-privacy-classification": "personal_data"
      }
    },
    "/me/fantasy/leagues/{leagueId}/teams/{teamId}/auto-pick": {
      "post": {
        "summary": "Propose a valid 2/4/3/3 squad within budget (master §4.4). Does NOT auto-submit — returns a reviewable proposal the manager then buys/fields. Owner-only; the team must belong to the caller and the league.",
        "tags": [
          "self",
          "fc15"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "leagueId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Fantasy league id scoped to the caller’s tenant."
          },
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Fantasy team id owned by the caller."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FantasyAutoPickResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": false,
        "x-privacy-classification": "personal_data"
      }
    },
    "/me/fantasy/teams": {
      "post": {
        "summary": "Create the caller’s team in a PUBLIC league. One team per user per league (409 on duplicate).",
        "tags": [
          "self",
          "fc15"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateFantasyTeamRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateFantasyTeamResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": true,
        "x-privacy-classification": "personal_data"
      }
    },
    "/me/fantasy/teams/{teamId}": {
      "get": {
        "summary": "Team detail (owner-only): budget, active roster, score history with supersession flags (scoring transparency), market orders and latest lineup.",
        "tags": [
          "self",
          "fc15"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Fantasy team id owned by the caller."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FantasyTeamDetailResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": false,
        "x-privacy-classification": "personal_data"
      }
    },
    "/me/fantasy/teams/{teamId}/lineup": {
      "post": {
        "summary": "Autosave or submit a versioned lineup; draft CAS and submit operation id are server-authoritative.",
        "tags": [
          "self",
          "fc15"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Fantasy team id owned by the caller."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "intent": {
                    "type": "string",
                    "enum": [
                      "draft",
                      "submit"
                    ],
                    "default": "submit"
                  },
                  "round_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "starting_player_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "minItems": 1
                  },
                  "bench_player_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "captain_player_id": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "vice_player_id": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "formation_string": {
                    "type": "string",
                    "minLength": 1
                  },
                  "operation_id": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 200
                  },
                  "expected_draft_revision": {
                    "oneOf": [
                      {
                        "type": "integer",
                        "minimum": 0
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "round_id",
                  "starting_player_ids",
                  "bench_player_ids"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Draft saved with its server revision and explicit scope."
          },
          "201": {
            "description": "Lineup accepted idempotently with explicit league/team/round scope."
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Draft revision, operation payload, or ruleset capability conflict."
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": true,
        "x-privacy-classification": "personal_data"
      }
    },
    "/me/fantasy/teams/{teamId}/market/orders": {
      "post": {
        "summary": "Submit a market order (buy/sell/swap). Budget and kind/price invariants enforced; pending orders per team are capped (anti-churn). Idempotent on idempotency_key. Operator decides accept/reject.",
        "tags": [
          "self",
          "fc15"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Fantasy team id owned by the caller."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubmitFantasyMarketOrderRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FantasyMarketOrderResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": true,
        "x-privacy-classification": "personal_data"
      }
    },
    "/me/fantasy/teams/{teamId}/market/orders/{orderId}/cancel": {
      "post": {
        "summary": "Payload-bound idempotent cancellation of a still-pending market order owned by the caller. Replaying the same key for the same team/order returns the canonical cancellation; reusing it for a different order conflicts.",
        "tags": [
          "self",
          "fc15"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Fantasy team id owned by the caller."
          },
          {
            "name": "orderId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Pending market order id owned by the caller."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CancelFantasyMarketOrderRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FantasyMarketOrderResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": true,
        "x-privacy-classification": "personal_data"
      }
    },
    "/me/fantasy/teams/{teamId}/market/trades": {
      "post": {
        "summary": "Propose a manager-to-manager trade. `players_out` is what the caller gives up, `players_in` what they receive, and `credits_delta` is signed toward the counterparty. Feasibility (ownership, both post-trade rosters, both budgets, reservations, cooldown, pair limit, transfer cap, submitted lineups) is checked here AND again at execution, against freshly locked rows. Max 3 live offers per team; the offer lapses at min(window close, +72h). No free text: the message is one of a closed preset set.",
        "tags": [
          "self",
          "fc15"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Fantasy team id owned by the caller."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProposeFantasyTradeRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FantasyTradeResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "sensitive_mutation",
        "x-audit-required": true,
        "x-privacy-classification": "personal_data"
      }
    },
    "/me/fantasy/teams/{teamId}/market/trades/{orderId}/counter": {
      "post": {
        "summary": "Answer a received offer with a modified one. The counter is a NEW offer with the roles swapped (the countering team becomes the proposer, linked by `counter_of_order_id`); the original becomes `countered` — not `cancelled`: nobody withdrew it, it was answered — and names its successor.",
        "tags": [
          "self",
          "fc15"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The COUNTERPARTY team, owned by the caller."
          },
          {
            "name": "orderId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The received trade offer being answered."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CounterFantasyTradeRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FantasyTradeResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "sensitive_mutation",
        "x-audit-required": true,
        "x-privacy-classification": "personal_data"
      }
    },
    "/me/fantasy/teams/{teamId}/market/trades/{orderId}/accept": {
      "post": {
        "summary": "Accept a received offer. Under the day-one rule `trade_review: none` the trade EXECUTES immediately inside this call — both rosters and both budgets move, two linked transactions are minted and the offer becomes `accepted`. Under `commissioner` it becomes `in_review` and waits for the league owner (or an operator on the ownerless official league). Two concurrent accepts: exactly one executes.",
        "tags": [
          "self",
          "fc15"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The COUNTERPARTY team, owned by the caller."
          },
          {
            "name": "orderId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The received trade offer."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DecideFantasyTradeRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FantasyTradeResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "sensitive_mutation",
        "x-audit-required": true,
        "x-privacy-classification": "personal_data"
      }
    },
    "/me/fantasy/teams/{teamId}/market/trades/{orderId}/reject": {
      "post": {
        "summary": "Refuse a received offer. Terminal, mutates nothing but the offer row, and idempotent on the supplied key.",
        "tags": [
          "self",
          "fc15"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The COUNTERPARTY team, owned by the caller."
          },
          {
            "name": "orderId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The received trade offer."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DecideFantasyTradeRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FantasyTradeResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": true,
        "x-privacy-classification": "personal_data"
      }
    },
    "/me/fantasy/teams/{teamId}/market/trades/{orderId}/cancel": {
      "post": {
        "summary": "Withdraw an offer the caller proposed, while it is still `pending`. Once the counterparty has accepted, withdrawing is no longer the proposer’s to do: an `in_review` offer belongs to the commissioner.",
        "tags": [
          "self",
          "fc15"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The PROPOSER team, owned by the caller."
          },
          {
            "name": "orderId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The proposed trade offer."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DecideFantasyTradeRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FantasyTradeResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": true,
        "x-privacy-classification": "personal_data"
      }
    },
    "/me/fantasy/leagues/{leagueId}/market": {
      "get": {
        "summary": "The league’s market screen in one read: offers received by the caller’s team, offers it sent, the resolved trade rules, and the league’s executed movements labelled by TEAM name (never by manager). League members only.",
        "tags": [
          "self",
          "fc15"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "leagueId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Fantasy league the caller belongs to."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FantasyLeagueMarketResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": false,
        "x-privacy-classification": "personal_data"
      }
    },
    "/me/fantasy/leagues/{leagueId}/trades/{orderId}/review": {
      "post": {
        "summary": "Commissioner decision on an offer parked `in_review` by the league rule `trade_review: commissioner`. Authority is the league’s own — its owner, or an operator on the ownerless official league — the same rule the regolamento and the market-state override use. Approving EXECUTES the trade; rejecting requires a reason.",
        "tags": [
          "self",
          "fc15"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "leagueId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Fantasy league the caller commissions."
          },
          {
            "name": "orderId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Trade offer awaiting review."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReviewFantasyTradeRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FantasyTradeResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "sensitive_mutation",
        "x-audit-required": true,
        "x-privacy-classification": "personal_data"
      }
    },
    "/public/teams/{teamId}/roster": {
      "get": {
        "summary": "FC16 public-safe season roster (tesseramento projection): active, non-minor tesserati named with shirt number + role. Minors are counted in withheld_for_protection, never named or numbered. 404 when the team is missing or inactive.",
        "tags": [
          "public",
          "fc16"
        ],
        "security": [
          {
            "ApiKey": [
              "read:public.teams"
            ]
          }
        ],
        "parameters": [
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Team id scoped to the tenant resolved from the credential."
          }
        ],
        "responses": {
          "200": {
            "description": "Public team roster",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicTeamRoster"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "public",
        "x-rate-limit-tier": "public_widget",
        "x-audit-required": false,
        "x-privacy-classification": "public"
      }
    },
    "/me/communications": {
      "get": {
        "summary": "FC16 official communication history: the caller's operational + official league communications ordered operational-first then most-recent. Marketing/optional categories are excluded so a campaign can never bury a sanction, fixture change or deadline.",
        "tags": [
          "me",
          "fc16"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Communication history",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommunicationHistoryResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/tournaments/{tournamentId}/discipline": {
      "get": {
        "summary": "W16 discipline desk — per-player accumulated yellows, diffida, pending/served suspensions plus committee point adjustments for a tournament, and (Q090) the send-offs on fixtures not yet homologated with the owner decision on when a ban takes effect.",
        "tags": [
          "admin",
          "discipline"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Tournament id scoped to the caller tenant."
          }
        ],
        "responses": {
          "200": {
            "description": "Discipline state",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminDisciplineResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Tournament not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/matches/{matchId}/eligibility": {
      "get": {
        "summary": "W16 per-fixture eligibility — per-side verdicts (suspended / not-rostered / medical / deadline) and the ineligible call-ups for the forfeit decision. With Q090 decided «immediately», a send-off on an earlier fixture not yet homologated counts as suspended.",
        "tags": [
          "admin",
          "discipline"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Match id scoped to the caller tenant."
          }
        ],
        "responses": {
          "200": {
            "description": "Fixture eligibility",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminFixtureEligibilityResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks the required permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Match not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/discipline/overrides": {
      "post": {
        "summary": "W16 committee override — append-only add/clear suspension, pardon card, manual diffida or point deduction. Gated on discipline.manage; audited.",
        "tags": [
          "admin",
          "discipline"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminDisciplineOverrideRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Persisted override row",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminDisciplineOverrideResponse"
                }
              }
            }
          },
          "400": {
            "description": "Validation failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks discipline.manage",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/matches/{matchId}/forfeit": {
      "post": {
        "summary": "W16 operator forfeit (sconfitta a tavolino) — creates a forfeit report draft (result_origin=forfeit, forfeit_trigger=ineligible_player) routed through the report path. Gated on match.report.approve.",
        "tags": [
          "admin",
          "discipline"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Match id scoped to the caller tenant."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminForfeitRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Forfeit report draft (full domain shape)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminForfeitResponse"
                }
              }
            }
          },
          "400": {
            "description": "Validation failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks match.report.approve",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Match not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/tournaments/{tournamentId}/forfeit-proposals": {
      "get": {
        "summary": "List late-confirmation forfeit proposals for an operator.",
        "tags": [
          "admin",
          "discipline"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Tournament id scoped to the caller tenant."
          }
        ],
        "responses": {
          "200": {
            "description": "Forfeit proposal list",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminForfeitProposalList"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks discipline.manage",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/tournaments/{tournamentId}/forfeit-proposals/generate": {
      "post": {
        "summary": "Generate review-only late-confirmation proposals. Idempotent and never writes a sporting result.",
        "tags": [
          "admin",
          "discipline"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Tournament id scoped to the caller tenant."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminForfeitProposalGenerateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Generated rows plus canonical proposal list",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminForfeitProposalGenerateResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks discipline.manage",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/discipline/forfeit-proposals/{proposalId}/confirm": {
      "post": {
        "summary": "Confirm exactly one late-confirmation forfeit and return the canonical report on retry.",
        "tags": [
          "admin",
          "discipline"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "proposalId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Proposal id scoped to the caller tenant."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminForfeitProposalConfirmRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Confirmed proposal and official report",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminForfeitProposalConfirmResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid transition or conflicting idempotency key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks operator permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Proposal not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/discipline/forfeit-proposals/{proposalId}/reject": {
      "post": {
        "summary": "Reject a pending late-confirmation forfeit proposal; idempotent on retry.",
        "tags": [
          "admin",
          "discipline"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "proposalId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Proposal id scoped to the caller tenant."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminForfeitProposalRejectRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Dismissed proposal",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminForfeitProposalRejectResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid transition or conflicting idempotency key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks discipline.manage",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Proposal not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/public/organizations": {
      "get": {
        "summary": "List public city/organization summaries for tenant navigation",
        "tags": [
          "public",
          "organizations"
        ],
        "security": [
          {
            "ApiKey": [
              "read:public.teams"
            ]
          }
        ],
        "parameters": [
          {
            "name": "city_slug",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "city_status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "live",
                "coming_soon"
              ]
            }
          },
          {
            "name": "is_national",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Public city/organization list",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicOrganizationList"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "public",
        "x-rate-limit-tier": "public_widget",
        "x-audit-required": false,
        "x-privacy-classification": "public"
      }
    },
    "/public/tournaments/{tournamentId}/bracket": {
      "get": {
        "summary": "Read the public knockout bracket projection",
        "tags": [
          "public",
          "tournaments",
          "bracket"
        ],
        "security": [
          {
            "ApiKey": [
              "read:public.matches"
            ]
          }
        ],
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Public tournament bracket",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicTournamentBracket"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "public",
        "x-rate-limit-tier": "public_widget",
        "x-audit-required": false,
        "x-privacy-classification": "public"
      }
    },
    "/public/avatar-catalog": {
      "get": {
        "summary": "List active backend-configured avatar choices",
        "tags": [
          "public",
          "identity"
        ],
        "security": [
          {
            "ApiKey": [
              "read:public.players"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Public avatar catalog",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AvatarCatalog"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "public",
        "x-rate-limit-tier": "public_widget",
        "x-audit-required": false,
        "x-privacy-classification": "public"
      }
    },
    "/public/players/{slug}/career": {
      "get": {
        "summary": "Read a public-safe player career timeline and discipline summary",
        "tags": [
          "public",
          "players"
        ],
        "security": [
          {
            "ApiKey": [
              "read:public.players"
            ]
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Public player career",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicPlayerCareer"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "public",
        "x-rate-limit-tier": "public_widget",
        "x-audit-required": false,
        "x-privacy-classification": "public"
      }
    },
    "/public/tournaments/{tournamentId}/suspensions": {
      "get": {
        "summary": "List active tournament suspensions with minors withheld",
        "tags": [
          "public",
          "tournaments",
          "discipline"
        ],
        "security": [
          {
            "ApiKey": [
              "read:public.players"
            ]
          }
        ],
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Public active suspensions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicTournamentSuspensions"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "public",
        "x-rate-limit-tier": "public_widget",
        "x-audit-required": false,
        "x-privacy-classification": "public"
      }
    },
    "/me/preferences": {
      "get": {
        "summary": "Read the caller’s resolved platform preferences",
        "tags": [
          "self",
          "preferences"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Resolved user preferences",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserPreferences"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "self",
        "x-rate-limit-tier": "authenticated",
        "x-privacy-classification": "tenant_internal",
        "x-audit-required": false
      },
      "put": {
        "summary": "Fully upsert or explicitly clear the caller’s platform preferences",
        "tags": [
          "self",
          "preferences"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserPreferencesUpsert"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Resolved updated user preferences",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserPreferences"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "self",
        "x-rate-limit-tier": "authenticated",
        "x-privacy-classification": "tenant_internal",
        "x-audit-required": true
      }
    },
    "/admin/tournaments/{tournamentId}/bracket": {
      "get": {
        "summary": "Read the editable tournament bracket",
        "tags": [
          "admin",
          "tournaments",
          "bracket"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tournament bracket",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicTournamentBracket"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-audit-required": false
      }
    },
    "/admin/tournaments/{tournamentId}/bracket/generate": {
      "post": {
        "summary": "Generate a tournament bracket from configured seeding",
        "tags": [
          "admin",
          "tournaments",
          "bracket"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminBracketGenerateRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Generated tournament bracket",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicTournamentBracket"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-audit-required": true
      }
    },
    "/admin/tournaments/{tournamentId}/bracket/rounds/{roundId}": {
      "put": {
        "summary": "Override an unstarted knockout round configuration and pairings",
        "tags": [
          "admin",
          "tournaments",
          "bracket"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "roundId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminBracketRoundUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated tournament bracket",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicTournamentBracket"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-audit-required": true
      }
    },
    "/public/matches/{matchId}/stream": {
      "get": {
        "summary": "Replay and follow public match events over SSE",
        "tags": [
          "public",
          "matches",
          "realtime"
        ],
        "security": [
          {
            "ApiKey": [
              "read:public.matches"
            ]
          }
        ],
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0
            },
            "description": "Last processed per-match sequence; replay starts strictly after it."
          },
          {
            "name": "Last-Event-ID",
            "in": "header",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0
            },
            "description": "Standard SSE resume cursor; query cursor takes precedence when both exist."
          }
        ],
        "responses": {
          "200": {
            "description": "Server-sent RealtimeEvent frames with heartbeat comments",
            "content": {
              "text/event-stream": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/RealtimeEvent"
                    },
                    {
                      "$ref": "#/components/schemas/RealtimeResyncRequired"
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "public",
        "x-rate-limit-tier": "public_widget",
        "x-audit-required": false,
        "x-privacy-classification": "public",
        "x-required-modules": [
          "api_widgets",
          "live_reporting"
        ]
      }
    },
    "/matches/{matchId}/report-versions/v2": {
      "post": {
        "summary": "Create an append-only V2 match-report draft",
        "tags": [
          "matches",
          "reports",
          "truth-chain"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "idempotency_key": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 200
                  },
                  "score_home": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "score_away": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "ended_after": {
                    "type": "string",
                    "enum": [
                      "regulation",
                      "extra_time",
                      "penalties"
                    ]
                  },
                  "penalty_shootout": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "home": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "away": {
                            "type": "integer",
                            "minimum": 0
                          }
                        },
                        "required": [
                          "home",
                          "away"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "result_origin": {
                    "type": "string",
                    "enum": [
                      "played",
                      "forfeit"
                    ]
                  },
                  "forfeit_trigger": {
                    "oneOf": [
                      {
                        "type": "string",
                        "enum": [
                          "no_show",
                          "ineligible_player",
                          "roster_below_minimum",
                          "late_result_confirmation_both_secretariats"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "event_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "lineup_snapshot_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "minItems": 2
                  },
                  "attachment_hashes": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "pattern": "^[0-9a-f]{64}$"
                    }
                  },
                  "ruleset_revision_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "ruleset_content_hash": {
                    "type": "string",
                    "pattern": "^[0-9a-f]{64}$"
                  },
                  "source_event_sequence": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "is_sub_iudice": {
                    "type": "boolean",
                    "default": false
                  },
                  "sub_iudice_case": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "opened_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "reason": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 1000
                          },
                          "proceeding_id": {
                            "type": "string",
                            "format": "uuid"
                          }
                        },
                        "required": [
                          "opened_at",
                          "reason",
                          "proceeding_id"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "notes": {
                    "oneOf": [
                      {
                        "type": "string",
                        "maxLength": 4000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "idempotency_key",
                  "score_home",
                  "score_away",
                  "ended_after",
                  "penalty_shootout",
                  "result_origin",
                  "forfeit_trigger",
                  "event_ids",
                  "lineup_snapshot_ids",
                  "attachment_hashes",
                  "ruleset_revision_id",
                  "ruleset_content_hash",
                  "source_event_sequence",
                  "notes"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created report version",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ReportVersionV2"
                    },
                    {
                      "type": "object",
                      "required": [
                        "officiality",
                        "freshness",
                        "receipt"
                      ],
                      "properties": {
                        "officiality": {
                          "$ref": "#/components/schemas/TruthOfficialityV1"
                        },
                        "freshness": {
                          "$ref": "#/components/schemas/TruthFreshnessV1"
                        },
                        "receipt": {
                          "$ref": "#/components/schemas/TruthReceiptV1"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "sensitive_mutation",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/matches/{matchId}/report-versions/v2/prepare": {
      "post": {
        "summary": "Prepare (or return) the server-built V2 draft the designated referee reviews and signs",
        "tags": [
          "matches",
          "reports",
          "truth-chain"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "notes": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 2000
                  },
                  "declared_score": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "additionalProperties": false,
                    "required": [
                      "home",
                      "away"
                    ],
                    "properties": {
                      "home": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 99
                      },
                      "away": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 99
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Current V2 report version",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ReportVersionV2"
                    },
                    {
                      "type": "object",
                      "required": [
                        "officiality",
                        "freshness",
                        "receipt"
                      ],
                      "properties": {
                        "officiality": {
                          "$ref": "#/components/schemas/TruthOfficialityV1"
                        },
                        "freshness": {
                          "$ref": "#/components/schemas/TruthFreshnessV1"
                        },
                        "receipt": {
                          "$ref": "#/components/schemas/TruthReceiptV1"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "sensitive_mutation",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/matches/{matchId}/report-presence": {
      "get": {
        "summary": "Presence of the team-sheet players (everybody present until the referee removes the absent ones)",
        "tags": [
          "matches",
          "reports"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Presence",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "match_id",
                    "recorded_at",
                    "sides"
                  ],
                  "properties": {
                    "match_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "recorded_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "sides": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "side",
                          "lineup_available",
                          "players"
                        ],
                        "properties": {
                          "side": {
                            "type": "string",
                            "enum": [
                              "home",
                              "away"
                            ]
                          },
                          "lineup_available": {
                            "type": "boolean"
                          },
                          "players": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "player_id",
                                "shirt_number",
                                "present"
                              ],
                              "properties": {
                                "player_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "shirt_number": {
                                  "type": "integer"
                                },
                                "present": {
                                  "type": "boolean"
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "sensitive_mutation",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      },
      "put": {
        "summary": "Record who did not show up (designated referee, or the secretariat in his place)",
        "tags": [
          "matches",
          "reports"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "absent_player_ids"
                ],
                "properties": {
                  "absent_player_ids": {
                    "type": "array",
                    "maxItems": 60,
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Presence",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "match_id",
                    "recorded_at",
                    "sides"
                  ],
                  "properties": {
                    "match_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "recorded_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "sides": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "side",
                          "lineup_available",
                          "players"
                        ],
                        "properties": {
                          "side": {
                            "type": "string",
                            "enum": [
                              "home",
                              "away"
                            ]
                          },
                          "lineup_available": {
                            "type": "boolean"
                          },
                          "players": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "player_id",
                                "shirt_number",
                                "present"
                              ],
                              "properties": {
                                "player_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "shirt_number": {
                                  "type": "integer"
                                },
                                "present": {
                                  "type": "boolean"
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "sensitive_mutation",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/matches/{matchId}/report-photos": {
      "get": {
        "summary": "Photos of the signed paper report (short signed links)",
        "tags": [
          "matches",
          "reports"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Photos",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "photos"
                  ],
                  "properties": {
                    "photos": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "content_type",
                          "byte_size",
                          "uploaded_at",
                          "url",
                          "url_expires_at"
                        ],
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "content_type": {
                            "type": "string"
                          },
                          "byte_size": {
                            "type": "integer"
                          },
                          "uploaded_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "url": {
                            "type": "string"
                          },
                          "url_expires_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "sensitive_mutation",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      },
      "post": {
        "summary": "Attach a photo of the signed paper report (JPEG, PNG or PDF, max 5 MB, max 3)",
        "tags": [
          "matches",
          "reports"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "content_base64"
                ],
                "properties": {
                  "content_base64": {
                    "type": "string"
                  },
                  "filename": {
                    "type": "string",
                    "maxLength": 120
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Photo",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "content_type",
                    "byte_size",
                    "uploaded_at",
                    "url",
                    "url_expires_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "content_type": {
                      "type": "string"
                    },
                    "byte_size": {
                      "type": "integer"
                    },
                    "uploaded_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "url": {
                      "type": "string"
                    },
                    "url_expires_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "sensitive_mutation",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/matches/{matchId}/report-photos/{photoId}": {
      "delete": {
        "summary": "Remove a photo of the paper report before the report is sent",
        "tags": [
          "matches",
          "reports"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "photoId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Removed"
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "sensitive_mutation",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/matches/{matchId}/report-versions/v2/{versionId}/transitions": {
      "post": {
        "summary": "Advance one legal V2 report lifecycle transition",
        "tags": [
          "matches",
          "reports",
          "truth-chain"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "versionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "from",
                  "to"
                ],
                "properties": {
                  "from": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      null,
                      "draft",
                      "submitted",
                      "approved"
                    ]
                  },
                  "to": {
                    "type": "string",
                    "enum": [
                      "draft",
                      "submitted",
                      "approved",
                      "homologated"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Transition result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "report",
                    "projection_revision"
                  ],
                  "properties": {
                    "report": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/ReportVersionV2"
                        },
                        {
                          "type": "object",
                          "required": [
                            "officiality",
                            "freshness",
                            "receipt"
                          ],
                          "properties": {
                            "officiality": {
                              "$ref": "#/components/schemas/TruthOfficialityV1"
                            },
                            "freshness": {
                              "$ref": "#/components/schemas/TruthFreshnessV1"
                            },
                            "receipt": {
                              "$ref": "#/components/schemas/TruthReceiptV1"
                            }
                          }
                        }
                      ]
                    },
                    "projection_revision": {
                      "oneOf": [
                        {
                          "$ref": "#/components/schemas/ProjectionRevision"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "sensitive_mutation",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/matches/{matchId}/report-versions/v2/amendments": {
      "post": {
        "summary": "Append and homologate an explicit V2 report amendment",
        "tags": [
          "admin",
          "matches",
          "reports",
          "truth-chain"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "base_report_version_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "base_manifest_hash": {
                    "type": "string",
                    "pattern": "^[0-9a-f]{64}$"
                  },
                  "operations": {
                    "type": "array",
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "op": {
                              "type": "string",
                              "enum": [
                                "add"
                              ]
                            },
                            "event_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "event": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "tenant_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "match_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "sequence": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "goal",
                                    "own_goal",
                                    "assist",
                                    "yellow_card",
                                    "red_card",
                                    "second_yellow",
                                    "substitution_in",
                                    "substitution_out",
                                    "penalty_scored",
                                    "penalty_missed",
                                    "penalty_saved",
                                    "goal_conceded",
                                    "period_start",
                                    "period_end",
                                    "match_start",
                                    "match_end",
                                    "injury_pause",
                                    "note"
                                  ]
                                },
                                "occurred_at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "minute": {
                                  "oneOf": [
                                    {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 120
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "side": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "enum": [
                                        "home",
                                        "away"
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "primary_player_id": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "secondary_player_id": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "note": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "maxLength": 280
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "author_user_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "idempotency_key": {
                                  "type": "string",
                                  "minLength": 8
                                },
                                "created_at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "updated_at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "created_by": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "updated_by": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "id",
                                "tenant_id",
                                "match_id",
                                "sequence",
                                "type",
                                "occurred_at",
                                "minute",
                                "side",
                                "primary_player_id",
                                "secondary_player_id",
                                "note",
                                "author_user_id",
                                "idempotency_key",
                                "created_at",
                                "updated_at",
                                "created_by",
                                "updated_by"
                              ]
                            },
                            "reason": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 1000
                            }
                          },
                          "required": [
                            "op",
                            "event_id",
                            "event",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "op": {
                              "type": "string",
                              "enum": [
                                "replace"
                              ]
                            },
                            "target_event_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "replacement_event_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "event": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "tenant_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "match_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "sequence": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "goal",
                                    "own_goal",
                                    "assist",
                                    "yellow_card",
                                    "red_card",
                                    "second_yellow",
                                    "substitution_in",
                                    "substitution_out",
                                    "penalty_scored",
                                    "penalty_missed",
                                    "penalty_saved",
                                    "goal_conceded",
                                    "period_start",
                                    "period_end",
                                    "match_start",
                                    "match_end",
                                    "injury_pause",
                                    "note"
                                  ]
                                },
                                "occurred_at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "minute": {
                                  "oneOf": [
                                    {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 120
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "side": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "enum": [
                                        "home",
                                        "away"
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "primary_player_id": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "secondary_player_id": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "note": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "maxLength": 280
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "author_user_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "idempotency_key": {
                                  "type": "string",
                                  "minLength": 8
                                },
                                "created_at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "updated_at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "created_by": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "updated_by": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "id",
                                "tenant_id",
                                "match_id",
                                "sequence",
                                "type",
                                "occurred_at",
                                "minute",
                                "side",
                                "primary_player_id",
                                "secondary_player_id",
                                "note",
                                "author_user_id",
                                "idempotency_key",
                                "created_at",
                                "updated_at",
                                "created_by",
                                "updated_by"
                              ]
                            },
                            "reason": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 1000
                            }
                          },
                          "required": [
                            "op",
                            "target_event_id",
                            "replacement_event_id",
                            "event",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "op": {
                              "type": "string",
                              "enum": [
                                "void"
                              ]
                            },
                            "target_event_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "reason": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 1000
                            }
                          },
                          "required": [
                            "op",
                            "target_event_id",
                            "reason"
                          ]
                        }
                      ]
                    },
                    "minItems": 1
                  },
                  "is_sub_iudice": {
                    "type": "boolean"
                  },
                  "idempotency_key": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 200
                  },
                  "score_home": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "score_away": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "ended_after": {
                    "type": "string",
                    "enum": [
                      "regulation",
                      "extra_time",
                      "penalties"
                    ]
                  },
                  "penalty_shootout": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "home": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "away": {
                            "type": "integer",
                            "minimum": 0
                          }
                        },
                        "required": [
                          "home",
                          "away"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "result_origin": {
                    "type": "string",
                    "enum": [
                      "played",
                      "forfeit"
                    ]
                  },
                  "forfeit_trigger": {
                    "oneOf": [
                      {
                        "type": "string",
                        "enum": [
                          "no_show",
                          "ineligible_player",
                          "roster_below_minimum",
                          "late_result_confirmation_both_secretariats"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "lineup_snapshot_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "minItems": 2
                  },
                  "attachment_hashes": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "pattern": "^[0-9a-f]{64}$"
                    }
                  },
                  "ruleset_revision_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "ruleset_content_hash": {
                    "type": "string",
                    "pattern": "^[0-9a-f]{64}$"
                  },
                  "source_event_sequence": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "sub_iudice_case": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "opened_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "reason": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 1000
                          },
                          "proceeding_id": {
                            "type": "string",
                            "format": "uuid"
                          }
                        },
                        "required": [
                          "opened_at",
                          "reason",
                          "proceeding_id"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "notes": {
                    "oneOf": [
                      {
                        "type": "string",
                        "maxLength": 4000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "base_report_version_id",
                  "base_manifest_hash",
                  "operations",
                  "is_sub_iudice",
                  "idempotency_key",
                  "score_home",
                  "score_away",
                  "source_event_sequence",
                  "sub_iudice_case",
                  "notes"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Amended report and projection revision",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "report",
                    "amendment_set",
                    "projection_revision"
                  ],
                  "properties": {
                    "report": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/ReportVersionV2"
                        },
                        {
                          "type": "object",
                          "required": [
                            "officiality",
                            "freshness",
                            "receipt"
                          ],
                          "properties": {
                            "officiality": {
                              "$ref": "#/components/schemas/TruthOfficialityV1"
                            },
                            "freshness": {
                              "$ref": "#/components/schemas/TruthFreshnessV1"
                            },
                            "receipt": {
                              "$ref": "#/components/schemas/TruthReceiptV1"
                            }
                          }
                        }
                      ]
                    },
                    "amendment_set": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/ReportAmendmentSet"
                        },
                        {
                          "type": "object",
                          "required": [
                            "scope",
                            "receipt"
                          ],
                          "properties": {
                            "scope": {
                              "$ref": "#/components/schemas/TruthScopeV1"
                            },
                            "receipt": {
                              "$ref": "#/components/schemas/TruthReceiptV1"
                            }
                          }
                        }
                      ]
                    },
                    "projection_revision": {
                      "$ref": "#/components/schemas/ProjectionRevision"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "sensitive_mutation",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/matches/{matchId}/report-versions/v2": {
      "get": {
        "summary": "List the append-only V2 report history for a match",
        "tags": [
          "admin",
          "matches",
          "reports",
          "truth-chain"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Report version history",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "allOf": [
                          {
                            "$ref": "#/components/schemas/ReportVersionV2"
                          },
                          {
                            "type": "object",
                            "required": [
                              "officiality",
                              "freshness"
                            ],
                            "properties": {
                              "officiality": {
                                "$ref": "#/components/schemas/TruthOfficialityV1"
                              },
                              "freshness": {
                                "$ref": "#/components/schemas/TruthFreshnessV1"
                              }
                            }
                          }
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/matches/{matchId}/forfeit-proposals/v2": {
      "post": {
        "summary": "Submit a scoreless V2 forfeit proposal",
        "tags": [
          "admin",
          "matches",
          "discipline",
          "truth-chain"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "trigger",
                  "proposed_against_team_id",
                  "evidence_refs",
                  "idempotency_key"
                ],
                "properties": {
                  "trigger": {
                    "type": "string",
                    "enum": [
                      "no_show",
                      "ineligible_player",
                      "roster_below_minimum",
                      "late_result_confirmation_both_secretariats"
                    ]
                  },
                  "proposed_against_team_id": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "evidence_refs": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "idempotency_key": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 200
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Submitted scoreless proposal",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForfeitProposalV2"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "sensitive_mutation",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/forfeit-proposals/v2/{proposalId}/decisions": {
      "post": {
        "summary": "Dismiss or award a V2 forfeit proposal",
        "tags": [
          "admin",
          "matches",
          "discipline",
          "truth-chain"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "proposalId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "object",
                    "required": [
                      "decision",
                      "reason",
                      "idempotency_key"
                    ],
                    "properties": {
                      "decision": {
                        "type": "string",
                        "enum": [
                          "dismissed"
                        ]
                      },
                      "reason": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 1000
                      },
                      "idempotency_key": {
                        "type": "string",
                        "minLength": 8,
                        "maxLength": 200
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "decision",
                      "against_team_id",
                      "reason",
                      "idempotency_key"
                    ],
                    "properties": {
                      "decision": {
                        "type": "string",
                        "enum": [
                          "awarded"
                        ]
                      },
                      "against_team_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "reason": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 1000
                      },
                      "idempotency_key": {
                        "type": "string",
                        "minLength": 8,
                        "maxLength": 200
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Forfeit decision and optional homologation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "proposal",
                    "decision",
                    "homologation",
                    "sanction"
                  ],
                  "properties": {
                    "proposal": {
                      "$ref": "#/components/schemas/ForfeitProposalV2"
                    },
                    "decision": {
                      "$ref": "#/components/schemas/ForfeitDecision"
                    },
                    "homologation": {
                      "type": [
                        "object",
                        "null"
                      ]
                    },
                    "sanction": {
                      "oneOf": [
                        {
                          "$ref": "#/components/schemas/DisciplinarySanction"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "sensitive_mutation",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/truth-model/capabilities": {
      "get": {
        "summary": "Read the explicit W1 truth-model capability registry",
        "tags": [
          "admin",
          "truth-chain"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Truth-model capabilities",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TruthModelCapabilities"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/public/news-categories": {
      "get": {
        "summary": "List active public news categories",
        "tags": [
          "public",
          "news-categories"
        ],
        "security": [
          {
            "ApiKey": [
              "read:public.media"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Active public news category list",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicNewsCategoryList"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "public",
        "x-rate-limit-tier": "public_widget",
        "x-audit-required": false,
        "x-privacy-classification": "public"
      }
    },
    "/public/content-pages": {
      "get": {
        "summary": "List published CMS pages, optionally scoped to a city organization",
        "tags": [
          "public",
          "content-pages"
        ],
        "security": [
          {
            "ApiKey": [
              "read:public.media"
            ]
          }
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Published CMS page list",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicContentPageList"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "public",
        "x-rate-limit-tier": "public_widget",
        "x-audit-required": false,
        "x-privacy-classification": "public"
      }
    },
    "/public/content-pages/{slug}": {
      "get": {
        "summary": "Read a published CMS page by tenant-unique slug",
        "tags": [
          "public",
          "content-pages"
        ],
        "security": [
          {
            "ApiKey": [
              "read:public.media"
            ]
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Published CMS page",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicContentPage"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "public",
        "x-rate-limit-tier": "public_widget",
        "x-audit-required": false,
        "x-privacy-classification": "public"
      }
    },
    "/admin/content-pages": {
      "get": {
        "summary": "List CMS pages including drafts and archives",
        "tags": [
          "admin",
          "content-pages"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "CMS page list",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContentPageList"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "internal",
        "x-privacy-classification": "tenant_internal",
        "x-audit-required": false
      },
      "post": {
        "summary": "Create a CMS page draft",
        "tags": [
          "admin",
          "content-pages"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContentPageCreateRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created CMS page",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContentPage"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "internal",
        "x-privacy-classification": "tenant_internal",
        "x-audit-required": true
      }
    },
    "/admin/content-pages/{contentPageId}": {
      "patch": {
        "summary": "Update a CMS page",
        "tags": [
          "admin",
          "content-pages"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "contentPageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContentPageUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated CMS page",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContentPage"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "internal",
        "x-privacy-classification": "tenant_internal",
        "x-audit-required": true
      }
    },
    "/admin/content-pages/{contentPageId}/publish": {
      "post": {
        "summary": "Publish a CMS page draft",
        "tags": [
          "admin",
          "content-pages"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "contentPageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContentPagePublishRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Published CMS page",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContentPage"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "internal",
        "x-privacy-classification": "tenant_internal",
        "x-audit-required": true
      }
    },
    "/admin/content-pages/{contentPageId}/unpublish": {
      "post": {
        "summary": "Return a published CMS page to draft",
        "tags": [
          "admin",
          "content-pages"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "contentPageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Unpublished CMS page draft",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContentPage"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "internal",
        "x-privacy-classification": "tenant_internal",
        "x-audit-required": true
      }
    },
    "/admin/content-pages/{contentPageId}/archive": {
      "post": {
        "summary": "Archive a CMS page",
        "tags": [
          "admin",
          "content-pages"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "contentPageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Archived CMS page",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContentPage"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "internal",
        "x-privacy-classification": "tenant_internal",
        "x-audit-required": true
      }
    },
    "/admin/content-pages/{contentPageId}/restore": {
      "post": {
        "summary": "Restore an archived CMS page to draft",
        "tags": [
          "admin",
          "content-pages"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "contentPageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Restored CMS page draft",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContentPage"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "internal",
        "x-privacy-classification": "tenant_internal",
        "x-audit-required": true
      }
    },
    "/admin/news-categories": {
      "get": {
        "summary": "List configurable news categories",
        "tags": [
          "admin",
          "news-categories"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "News category list",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NewsCategoryList"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "internal",
        "x-privacy-classification": "tenant_internal",
        "x-audit-required": false
      },
      "post": {
        "summary": "Create a configurable news category",
        "tags": [
          "admin",
          "news-categories"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewsCategoryCreateRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created news category",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NewsCategory"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "internal",
        "x-privacy-classification": "tenant_internal",
        "x-audit-required": true
      }
    },
    "/admin/news-categories/{newsCategoryId}": {
      "patch": {
        "summary": "Update a configurable news category",
        "tags": [
          "admin",
          "news-categories"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "newsCategoryId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewsCategoryUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated news category",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NewsCategory"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "internal",
        "x-privacy-classification": "tenant_internal",
        "x-audit-required": true
      },
      "delete": {
        "summary": "Delete a configurable news category",
        "tags": [
          "admin",
          "news-categories"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "newsCategoryId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "internal",
        "x-privacy-classification": "tenant_internal",
        "x-audit-required": true
      }
    },
    "/admin/tournaments/{tournamentId}/bracket/ties/{tieId}/matches": {
      "put": {
        "summary": "Link scheduled tournament fixtures to a knockout tie in leg order",
        "tags": [
          "admin",
          "tournaments",
          "bracket"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "tieId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminBracketTieMatchesLinkRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Tournament bracket with the linked fixtures",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicTournamentBracket"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-audit-required": true
      }
    },
    "/me/transfer-requests/options": {
      "get": {
        "summary": "Player: server-authoritative destinations, tournaments, transfer window, blockers and consent policy for one explicitly selected approved profile.",
        "tags": [
          "me",
          "transfers"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "player_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Explicit approved player profile whose server-authoritative transfer options are requested."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SelfTransferOptionsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": false,
        "x-privacy-classification": "pseudonymized"
      }
    },
    "/me/transfer-requests/submissions": {
      "post": {
        "summary": "Player: create a self-transfer from an authoritative options snapshot. Payload-bound idempotency returns the same durable receipt on replay.",
        "tags": [
          "me",
          "transfers"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SelfTransferSubmissionRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SelfTransferReceipt"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": true,
        "x-privacy-classification": "pseudonymized"
      }
    },
    "/me/transfer-requests/receipts/{requestId}": {
      "get": {
        "summary": "Player: read the durable receipt and current application/consent status for their own transfer request.",
        "tags": [
          "me",
          "transfers"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "requestId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Transfer request id."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SelfTransferReceipt"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": false,
        "x-privacy-classification": "pseudonymized"
      }
    },
    "/me/transfer-requests": {
      "get": {
        "summary": "Player: transfer requests concerning the profiles this user has claimed, newest first.",
        "tags": [
          "me",
          "transfers"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransferRequestListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": false,
        "x-privacy-classification": "pseudonymized"
      },
      "post": {
        "summary": "Player: ask to move to another club. Refused outside the market window and when a request is already open for this season.",
        "tags": [
          "me",
          "transfers"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlayerTransferRequestCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransferRequestRow"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": true,
        "x-privacy-classification": "pseudonymized"
      }
    },
    "/me/release-requests": {
      "post": {
        "summary": "Player: request release in an open tournament window; the current team confirmation makes the release effective.",
        "tags": [
          "me",
          "transfers"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlayerReleaseRequestCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransferRequestRow"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": true,
        "x-privacy-classification": "pseudonymized"
      }
    },
    "/me/transfer-requests/{requestId}/consent": {
      "post": {
        "summary": "Player: consent to a transfer someone else initiated. Idempotent — a replay returns the stored request.",
        "tags": [
          "me",
          "transfers"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "requestId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Transfer request id."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransferRequestRow"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": true,
        "x-privacy-classification": "pseudonymized"
      }
    },
    "/me/transfer-requests/{requestId}/cancel": {
      "post": {
        "summary": "Player: withdraw their own still-open transfer request.",
        "tags": [
          "me",
          "transfers"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "requestId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Transfer request id."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransferRequestRow"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": true,
        "x-privacy-classification": "pseudonymized"
      }
    },
    "/me/team-area/transfers": {
      "get": {
        "summary": "Captain: incoming and outgoing transfer requests for one team, plus the market window state per competition.",
        "tags": [
          "me",
          "transfers"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "team_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Team the caller captains."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamTransferRequestListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": false,
        "x-privacy-classification": "pseudonymized"
      },
      "post": {
        "summary": "Captain of the receiving club: invite a player. Acceptance is implicit; the releasing club and the player must still consent.",
        "tags": [
          "me",
          "transfers"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CaptainTransferRequestCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransferRequestRow"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": true,
        "x-privacy-classification": "pseudonymized"
      }
    },
    "/me/team-area/free-agents": {
      "get": {
        "summary": "Captain: list players currently free in one tournament.",
        "tags": [
          "me",
          "transfers"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "team_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Team the caller captains."
          },
          {
            "name": "tournament_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Tournament that scopes registration and free-agent availability."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TournamentFreeAgentListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": false,
        "x-privacy-classification": "pseudonymized"
      },
      "post": {
        "summary": "Captain: register an already-free player in this tournament, including outside release windows and without further approval.",
        "tags": [
          "me",
          "transfers"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TournamentFreeAgentSignRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminRosterEntryRow"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": true,
        "x-privacy-classification": "pseudonymized"
      }
    },
    "/me/team-area/release-requests": {
      "post": {
        "summary": "Captain: request release of one registered player in an open window; an admin decision is required and player consent is not.",
        "tags": [
          "me",
          "transfers"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CaptainReleaseRequestCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransferRequestRow"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": true,
        "x-privacy-classification": "pseudonymized"
      }
    },
    "/me/team-area/transfers/{requestId}/release": {
      "post": {
        "summary": "Captain of the releasing club: grant the nulla-osta. Idempotent — a replay returns the stored request.",
        "tags": [
          "me",
          "transfers"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "requestId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Transfer request id."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransferRequestRow"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": true,
        "x-privacy-classification": "pseudonymized"
      }
    },
    "/me/team-area/transfers/{requestId}/accept": {
      "post": {
        "summary": "Captain of the receiving club: accept the player. Idempotent.",
        "tags": [
          "me",
          "transfers"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "requestId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Transfer request id."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransferRequestRow"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": true,
        "x-privacy-classification": "pseudonymized"
      }
    },
    "/me/team-area/transfers/{requestId}/reject": {
      "post": {
        "summary": "Captain of either club: refuse the transfer. A reason is mandatory.",
        "tags": [
          "me",
          "transfers"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "requestId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Transfer request id."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TransferRequestRejectRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransferRequestRow"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": true,
        "x-privacy-classification": "pseudonymized"
      }
    },
    "/admin/transfer-requests": {
      "get": {
        "summary": "Admin queue — every transfer request in the tenant, optionally filtered by status.",
        "tags": [
          "admin",
          "transfers"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional transfer-request status filter."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            },
            "description": "Page size (default 25, maximum 100)."
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            },
            "description": "Zero-based result offset."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransferRequestListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "pseudonymized"
      },
      "post": {
        "summary": "Admin: open a transfer request d’ufficio. A reason is required to work outside the market window.",
        "tags": [
          "admin",
          "transfers"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminTransferRequestCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransferRequestRow"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "pseudonymized"
      }
    },
    "/admin/release-requests/direct": {
      "post": {
        "summary": "Admin: directly release a player in an open tournament window, with an audited reason and no external approval.",
        "tags": [
          "admin",
          "transfers"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminDirectReleaseRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransferRequestRow"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "pseudonymized"
      }
    },
    "/admin/release-requests/{requestId}/revoke": {
      "post": {
        "summary": "Admin: revoke a release registered by mistake (owner answer tesseramento.release_revocation); the registration resumes from the release day.",
        "tags": [
          "admin",
          "transfers"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "requestId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Transfer request id."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminReleaseRevocationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransferRequestRow"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "pseudonymized"
      }
    },
    "/admin/release-windows": {
      "get": {
        "summary": "Admin: list explicit tournament release windows.",
        "tags": [
          "admin",
          "transfers"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminTournamentReleaseWindowList"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "pseudonymized"
      },
      "put": {
        "summary": "Admin: activate or deactivate one tournament release window and declare its kind.",
        "tags": [
          "admin",
          "transfers"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminTournamentReleaseWindowSet"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TournamentReleaseWindow"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "pseudonymized"
      }
    },
    "/admin/transfer-requests/{requestId}": {
      "patch": {
        "summary": "Admin: nulla-osta d’ufficio, consent recorded on the player’s behalf, or refusal. A reason is always mandatory and audited.",
        "tags": [
          "admin",
          "transfers"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "requestId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Transfer request id."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminTransferRequestDecision"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransferRequestRow"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "pseudonymized"
      }
    },
    "/admin/transfer-requests/{requestId}/apply": {
      "post": {
        "summary": "Admin: perfect the transfer — calls the existing roster transfer engine with a deterministic idempotency key and reports any residual suspension.",
        "tags": [
          "admin",
          "transfers"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "requestId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Transfer request id."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminTransferRequestApply"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminTransferRequestApplyResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "pseudonymized"
      }
    },
    "/me/player-area/career": {
      "get": {
        "summary": "Player self-view of their own record: season totals, per-competition and per-club breakdown, career timeline and residual suspensions.",
        "tags": [
          "me",
          "transfers"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlayerAreaCareerResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": false,
        "x-privacy-classification": "pseudonymized"
      }
    },
    "/me/player-area/matches": {
      "get": {
        "summary": "Player self-view \"Le mie partite\": one row per homologated fixture with the club of that fixture, the result and the personal contributions, plus the next fixture.",
        "tags": [
          "me",
          "transfers"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 50
            },
            "description": "Global page size for the approved personal match log (default 50, maximum 50)."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Opaque cursor for the next global page of approved personal matches."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlayerAreaMatchLogResponse"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": false,
        "x-privacy-classification": "pseudonymized"
      }
    },
    "/me/next-actions": {
      "get": {
        "summary": "Agenda dell'attore: le azioni dovute, in attesa, bloccate e appena chiuse per ogni ruolo verificato, già ordinate e con l'unica azione primaria scelta dal server.",
        "tags": [
          "me",
          "next-actions"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "tournament_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Restringe l’agenda a una competizione."
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Restringe l’agenda a una squadra dell’attore."
          },
          {
            "name": "role",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Restringe l’agenda a uno o più ruoli fra quelli verificati per l’attore. Ripetibile."
          },
          {
            "name": "object_kind",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Restringe l’agenda a un tipo di oggetto (per esempio `match`)."
          },
          {
            "name": "object_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Restringe l’agenda a un singolo oggetto; richiede object_kind."
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Solo diagnostica: `all` include anche le azioni non applicabili. Mai in produzione lato UI."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NextActionsResponseV1"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/next-actions": {
      "get": {
        "summary": "Cockpit della Lega: le azioni della segreteria già ordinate, più l'aggregato delle attese — quante azioni di altri sono ferme in attesa di una decisione della Lega, per azione e per oggetto, con l'attesa più vecchia.",
        "tags": [
          "admin",
          "next-actions"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "tournament_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Restringe il cockpit a una competizione."
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Solo diagnostica: `all` include anche le azioni non applicabili. Mai in produzione lato UI."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminNextActionsResponseV1"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/historical-registry": {
      "get": {
        "summary": "Anagrafica storica — paginated private archive registry. Search is a prefix match on the accent-folded name, or an exact source person id. Gated on historical_registry.read.",
        "tags": [
          "admin",
          "historical-registry"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Narrow to one organization. A session already scoped to an organization cannot widen itself with this parameter."
          },
          {
            "name": "source_system",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Narrow to one source archive."
          },
          {
            "name": "person_kind",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "player",
                "staff",
                "unknown"
              ]
            },
            "description": "`unknown` is the normal case: the archive printed a name and no role for most rows."
          },
          {
            "name": "link",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "linked",
                "unlinked"
              ]
            },
            "description": "Filter by operator-verified linkage to an operational player."
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 120
            },
            "description": "Prefix of the folded display name, or an exact source person id. Not a substring search — see the index rationale in migration 0035."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Archive registry page",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminHistoricalRegistryList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid query",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks historical_registry.read",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "personal_data",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/historical-registry/summary": {
      "get": {
        "summary": "Anagrafica storica — counts by person kind, stated source role, linkage and source archive. Gated on historical_registry.read.",
        "tags": [
          "admin",
          "historical-registry"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Archive registry counts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminHistoricalRegistrySummary"
                }
              }
            }
          },
          "400": {
            "description": "Invalid query",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks historical_registry.read",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/historical-registry/import": {
      "post": {
        "summary": "Anagrafica storica — import one bounded archive batch (max 500 rows). Idempotent: a replayed batch writes nothing and never touches an operator-verified link. Gated on historical_registry.manage; audited with counts only.",
        "tags": [
          "admin",
          "historical-registry"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminHistoricalRegistryImportRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Counts-only import summary (no personal data)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminHistoricalRegistryImportResponse"
                }
              }
            }
          },
          "400": {
            "description": "Validation failure or duplicate source id in batch",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks historical_registry.manage",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Organization not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "personal_data",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/historical-registry/{recordId}/link": {
      "patch": {
        "summary": "Anagrafica storica — verify or clear the link between an archive row and an operational player. The only writer of that link; an import never sets or clears it. Gated on historical_registry.manage; audited.",
        "tags": [
          "admin",
          "historical-registry"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "recordId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Registry row id scoped to the caller tenant."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminHistoricalRegistryLinkRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated registry row",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminHistoricalRegistryRow"
                }
              }
            }
          },
          "400": {
            "description": "Validation failure or missing link note",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks historical_registry.manage",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Record or target player not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Stale ETag",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "personal_data",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/archive/public-registrations": {
      "get": {
        "summary": "Archivio pubblico — paginated registrations read from the league public site. Search is a PREFIX match on the accent-folded name, or an exact source registration id. Gated on archive_public.read.",
        "tags": [
          "admin",
          "archive-public"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Narrow to one organization. A session already scoped to an organization cannot widen itself with this parameter."
          },
          {
            "name": "source_system",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tournament_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Destination competition, when the import resolved one."
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "source_tournament_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Legacy competition id, usable before a destination is resolved."
          },
          {
            "name": "source_team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "season",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Season label exactly as the source writes it, e.g. `2019/2020`."
          },
          {
            "name": "person_kind",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "player",
                "staff",
                "unknown"
              ]
            }
          },
          {
            "name": "publication",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "published",
                "withheld"
              ]
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Prefix of the accent-folded name, or an exact source registration id. A substring search over 96 423 rows is not indexable without pg_trgm and is deliberately not offered."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Registrations page",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminArchivePublicRegistrationList"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks archive_public.read",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "personal_data",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/archive/public-registrations/summary": {
      "get": {
        "summary": "Archivio pubblico — counters by person kind, source role, name coverage and publication state. Counts only: no name, no source id. Gated on archive_public.read.",
        "tags": [
          "admin",
          "archive-public"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Narrow to one organization. A session already scoped to an organization cannot widen itself with this parameter."
          }
        ],
        "responses": {
          "200": {
            "description": "Counters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminArchivePublicRegistrationSummaryResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks archive_public.read",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/archive/public-registrations/import": {
      "post": {
        "summary": "Archivio pubblico — import one bounded batch (max 500 registrations). Idempotent by deterministic row id and source digest; an older capture is reported as stale and NOT applied; a same-instant contradictory capture is a 409. A row may carry expected_source_revision (0 = create only, positive = the stored source_revision exactly): it is compared under the row lock before any write and a mismatch is skipped and counted as conflicted, never applied. Gated on archive_public.manage.",
        "tags": [
          "admin",
          "archive-public"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminArchivePublicRegistrationImportRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Import summary",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminArchivePublicRegistrationImportResponse"
                }
              }
            }
          },
          "400": {
            "description": "Validation failure or duplicate source id in batch",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks archive_public.manage",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Organization, competition or team not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Same-instant capture with contradictory facts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "personal_data",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/archive/public-registrations/{registrationId}/publication": {
      "patch": {
        "summary": "Archivio pubblico — publish or withhold one registration. Withholding requires a reason; the decision survives every later import. Gated on archive_public.manage.",
        "tags": [
          "admin",
          "archive-public"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "registrationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The deterministic registration id."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminArchivePublicationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated registration",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminArchivePublicRegistrationRow"
                }
              }
            }
          },
          "400": {
            "description": "Validation failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks archive_public.manage",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Registration not found in caller tenant/organization",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Stale ETag",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "personal_data",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/archive/public-registrations/publication": {
      "post": {
        "summary": "Archivio pubblico — one bounded publication decision over a SCOPE (max 1000 rows). The scope must name a competition or a team; `expected_rows` fails the operation if the scope drifted since it was reviewed; `only_undecided` (default true) skips rows a human already ruled on. Publishing still requires a captured name and proof the source publishes it. Gated on archive_public.manage.",
        "tags": [
          "admin",
          "archive-public"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminArchiveBulkPublicationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "What the scope matched, changed and refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminArchiveBulkPublicationResponse"
                }
              }
            }
          },
          "400": {
            "description": "Validation failure, or an unscoped request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks archive_public.manage",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Organization not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The scope no longer holds `expected_rows` rows",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "personal_data",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/archive/standings": {
      "get": {
        "summary": "Archivio pubblico — original league tables as the source orders them. Gated on archive_public.read.",
        "tags": [
          "admin",
          "archive-public"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Narrow to one organization. A session already scoped to an organization cannot widen itself with this parameter."
          },
          {
            "name": "tournament_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "source_tournament_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "publication",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "published",
                "withheld"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Snapshots page",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminArchiveStandingsList"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks archive_public.read",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/archive/standings/import": {
      "post": {
        "summary": "Archivio pubblico — import one bounded batch (max 100 tables). Same idempotency, watermark and conflict rules as the registration import, including the optional per-snapshot expected_source_revision precondition counted as conflicted. Gated on archive_public.manage.",
        "tags": [
          "admin",
          "archive-public"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminArchiveStandingsImportRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Import summary",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminArchiveStandingsImportResponse"
                }
              }
            }
          },
          "400": {
            "description": "Validation failure or duplicate source group in batch",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks archive_public.manage",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Organization, competition or team not found in caller tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Same-instant capture with contradictory facts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "personal_data",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/archive/standings/{snapshotId}/publication": {
      "patch": {
        "summary": "Archivio pubblico — publish or withhold one original table. Gated on archive_public.manage.",
        "tags": [
          "admin",
          "archive-public"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "snapshotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminArchivePublicationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated snapshot",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminArchiveStandingsRow"
                }
              }
            }
          },
          "400": {
            "description": "Validation failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks archive_public.manage",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Snapshot not found in caller tenant/organization",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Stale ETag",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "personal_data",
        "x-admin-cockpit-required": true
      }
    },
    "/public/archive/tournaments/{tournamentId}/standings": {
      "get": {
        "summary": "Archivio pubblico — original league tables of a PUBLISHED competition. Served only for rows that are published AND carry proof the source publishes them; a table captured from the back office is absent here until its public page is read and proved.",
        "tags": [
          "public",
          "archive-public"
        ],
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "group_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Narrow to one destination group."
          }
        ],
        "responses": {
          "200": {
            "description": "Original tables",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicArchiveStandingsList"
                }
              }
            }
          },
          "404": {
            "description": "Competition not found or not published",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "public_scoped",
        "x-rate-limit-tier": "public",
        "x-audit-required": false,
        "x-privacy-classification": "public"
      }
    },
    "/public/archive/tournaments/{tournamentId}/registrations": {
      "get": {
        "summary": "Archivio pubblico — original registrations of a PUBLISHED competition, as the league publishes them on its own site. Names and roles appear exactly as the source prints them; an uncaptured name is null and must be rendered as unavailable, never reconstructed from the profile URL.",
        "tags": [
          "public",
          "archive-public"
        ],
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Prefix of the accent-folded name, or an exact source registration id."
          },
          {
            "name": "people",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "players",
                "staff"
              ]
            },
            "description": "`players`: every registration the source did not list as staff (a player with no printed role included); `staff`: staff only."
          },
          {
            "name": "role",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "GK",
                "DEF",
                "MID",
                "FWD"
              ]
            },
            "description": "The role the source printed; a registration with no printed role never matches."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Original registrations",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicArchiveRegistrationList"
                }
              }
            }
          },
          "404": {
            "description": "Competition not found or not published",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "public_scoped",
        "x-rate-limit-tier": "public",
        "x-audit-required": false,
        "x-privacy-classification": "personal_data"
      }
    },
    "/public/archive/registrations/{registrationId}": {
      "get": {
        "summary": "Archivio pubblico — one original registration by its deterministic id. 404 when the row is withheld, unproved, or belongs to a competition that is not published.",
        "tags": [
          "public",
          "archive-public"
        ],
        "parameters": [
          {
            "name": "registrationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Original registration",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicArchiveRegistration"
                }
              }
            }
          },
          "404": {
            "description": "Not found, withheld, unproved or not published",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "public_scoped",
        "x-rate-limit-tier": "public",
        "x-audit-required": false,
        "x-privacy-classification": "personal_data"
      }
    },
    "/admin/archive/brackets": {
      "get": {
        "summary": "Tabelloni storici — paginated bracket snapshots captured from the source, one per source group. Gated on archive_public.read plus the sport_core module.",
        "tags": [
          "admin",
          "archive-public"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Narrow to one organization. A session already scoped to an organization cannot widen itself with this parameter."
          },
          {
            "name": "source_system",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tournament_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Destination competition, when the import resolved one."
          },
          {
            "name": "phase_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "source_tournament_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Legacy competition id, usable before a destination is resolved."
          },
          {
            "name": "source_group_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Legacy group id: one bracket page is one group."
          },
          {
            "name": "publication",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "published",
                "withheld"
              ]
            }
          },
          {
            "name": "topology",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "declared_edges",
                "rounds_only",
                "no_bracket_declared"
              ]
            },
            "description": "How much topology the SOURCE declared. rounds_only means the page declared rounds and matches but no predecessor for any slot; no_bracket_declared means the page carries no bracket at all."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Bracket snapshots page",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminHistoricalBracketList"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks archive_public.read",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/archive/brackets/{snapshotId}": {
      "get": {
        "summary": "Tabelloni storici — one snapshot with its rounds, declared edges, champion declarations and the back-office capture it was read from.",
        "tags": [
          "admin",
          "archive-public"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "snapshotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Bracket snapshot",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminHistoricalBracketRow"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks archive_public.read",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Unknown snapshot, or outside the caller scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/archive/brackets/import": {
      "post": {
        "summary": "Tabelloni storici — import up to 25 bracket pages in one idempotent batch. Replaying an identical capture is \"unchanged\"; an older capture is \"stale\" and never overwrites newer facts; expected_source_revision makes a concurrent operator edit a counted conflict instead of a silent overwrite. The import writes no Match, Round or KnockoutTie and advances nothing. Gated on archive_public.manage plus the sport_core module.",
        "tags": [
          "admin",
          "archive-public"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminHistoricalBracketImportRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Import summary (counts only)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminHistoricalBracketImportResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks archive_public.manage",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "A destination reference does not resolve in the caller tenant/organization. Send the fact with state \"unavailable\" and its source id instead.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/archive/brackets/{snapshotId}/publication": {
      "patch": {
        "summary": "Tabelloni storici — the ONLY writer of a snapshot publication state. An import never publishes and never republishes what an operator withheld. Publishing is refused when the snapshot has no resolved destination competition.",
        "tags": [
          "admin",
          "archive-public"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "snapshotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Entity etag; may also travel as expected_etag in the body."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "publication": {
                    "type": "string",
                    "enum": [
                      "published",
                      "withheld"
                    ]
                  },
                  "withheld_reason": {
                    "oneOf": [
                      {
                        "type": "string",
                        "enum": [
                          "awaiting_operator_decision",
                          "operator_decision",
                          "destination_tournament_unresolved"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "note": {
                    "oneOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "expected_etag": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "publication"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated snapshot",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminHistoricalBracketRow"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated but lacks archive_public.manage",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Unknown snapshot, or outside the caller scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The snapshot changed since the caller read it",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "428": {
            "description": "An etag is required for this mutation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "internal",
        "x-admin-cockpit-required": true
      }
    },
    "/public/archive/tournaments/{tournamentId}/brackets": {
      "get": {
        "summary": "Tabelloni storici — the published brackets of one published competition: declared rounds, the two sides of each match, the edges the source proved, the declared champion, and the count of slots the source never explained. Carries no back-office capture.",
        "tags": [
          "public",
          "archive-public"
        ],
        "security": [
          {
            "ApiKey": [
              "read:public.matches"
            ]
          }
        ],
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "phase_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Published brackets",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicHistoricalBracketList"
                }
              }
            }
          },
          "404": {
            "description": "Unknown or unpublished competition",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "public_scoped",
        "x-rate-limit-tier": "public",
        "x-audit-required": false,
        "x-privacy-classification": "public"
      }
    },
    "/admin/facilities": {
      "get": {
        "tags": [
          "admin",
          "facilities"
        ],
        "summary": "Strutture sportive con i loro campi (paginate a cursore, per nome)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 400
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "archived"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Pagina di strutture",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "next_cursor"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "slug",
                          "organization_id",
                          "name",
                          "city",
                          "address",
                          "status",
                          "fields",
                          "version",
                          "updated_at"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "slug": {
                            "type": "string",
                            "minLength": 2,
                            "maxLength": 64,
                            "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
                          },
                          "organization_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "name": {
                            "type": "string"
                          },
                          "city": {
                            "type": "string"
                          },
                          "address": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "active",
                              "archived"
                            ]
                          },
                          "fields": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "field_id",
                                "label"
                              ],
                              "properties": {
                                "field_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "label": {
                                  "type": "string"
                                }
                              }
                            }
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "updated_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "admin",
          "facilities"
        ],
        "summary": "Crea una struttura sportiva (città obbligatoria; ripetibile con request_id)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "organization_id",
                  "name",
                  "city",
                  "address",
                  "geo_lat",
                  "geo_lng",
                  "phone",
                  "mobile",
                  "fax",
                  "email",
                  "website",
                  "services"
                ],
                "properties": {
                  "organization_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 120
                  },
                  "city": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "address": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "geo_lat": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "minimum": -90,
                    "maximum": 90
                  },
                  "geo_lng": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "minimum": -180,
                    "maximum": 180
                  },
                  "phone": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "minLength": 1,
                    "maxLength": 40
                  },
                  "mobile": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "minLength": 1,
                    "maxLength": 40
                  },
                  "fax": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "minLength": 1,
                    "maxLength": 40
                  },
                  "email": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "email",
                    "maxLength": 160
                  },
                  "website": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uri",
                    "pattern": "^https?:\\/\\/"
                  },
                  "services": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 60
                    },
                    "maxItems": 30
                  },
                  "request_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Stessa richiesta già eseguita",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "slug",
                    "organization_id",
                    "name",
                    "city",
                    "address",
                    "status",
                    "version",
                    "updated_at",
                    "geo_lat",
                    "geo_lng",
                    "phone",
                    "mobile",
                    "fax",
                    "email",
                    "website",
                    "services",
                    "photos",
                    "administrator",
                    "manager",
                    "source_ref",
                    "fields",
                    "dayoffs"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "slug": {
                      "type": "string",
                      "minLength": 2,
                      "maxLength": 64,
                      "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
                    },
                    "organization_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "name": {
                      "type": "string"
                    },
                    "city": {
                      "type": "string"
                    },
                    "address": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "active",
                        "archived"
                      ]
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "geo_lat": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "geo_lng": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "phone": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "mobile": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "fax": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "email": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "website": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "services": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "photos": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "url",
                          "caption"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "url": {
                            "type": "string",
                            "format": "uri",
                            "pattern": "^https?:\\/\\/"
                          },
                          "caption": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "maxLength": 200
                          }
                        }
                      }
                    },
                    "administrator": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "required": [
                        "id",
                        "display_name"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "display_name": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    },
                    "manager": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "required": [
                        "id",
                        "display_name"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "display_name": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    },
                    "source_ref": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "field_id",
                          "label",
                          "address",
                          "surface",
                          "opening_hours",
                          "opening_hours_version",
                          "fares",
                          "fares_version"
                        ],
                        "properties": {
                          "field_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "label": {
                            "type": "string"
                          },
                          "address": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "surface": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "enum": [
                              "grass",
                              "synthetic",
                              "mixed",
                              "indoor"
                            ]
                          },
                          "opening_hours": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "weekday",
                                "opens",
                                "closes"
                              ],
                              "properties": {
                                "weekday": {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 7
                                },
                                "opens": {
                                  "type": "string",
                                  "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$|^24:00$"
                                },
                                "closes": {
                                  "type": "string",
                                  "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$|^24:00$"
                                }
                              },
                              "additionalProperties": false
                            }
                          },
                          "opening_hours_version": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "fares": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "label",
                                "amount_cents"
                              ],
                              "properties": {
                                "label": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "amount_cents": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 10000000
                                }
                              },
                              "additionalProperties": false
                            }
                          },
                          "fares_version": {
                            "type": "integer",
                            "minimum": 0
                          }
                        }
                      }
                    },
                    "dayoffs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "from",
                          "to",
                          "reason",
                          "created_at"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "from": {
                            "type": "string",
                            "format": "date"
                          },
                          "to": {
                            "type": "string",
                            "format": "date"
                          },
                          "reason": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "Struttura creata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "slug",
                    "organization_id",
                    "name",
                    "city",
                    "address",
                    "status",
                    "version",
                    "updated_at",
                    "geo_lat",
                    "geo_lng",
                    "phone",
                    "mobile",
                    "fax",
                    "email",
                    "website",
                    "services",
                    "photos",
                    "administrator",
                    "manager",
                    "source_ref",
                    "fields",
                    "dayoffs"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "slug": {
                      "type": "string",
                      "minLength": 2,
                      "maxLength": 64,
                      "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
                    },
                    "organization_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "name": {
                      "type": "string"
                    },
                    "city": {
                      "type": "string"
                    },
                    "address": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "active",
                        "archived"
                      ]
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "geo_lat": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "geo_lng": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "phone": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "mobile": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "fax": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "email": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "website": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "services": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "photos": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "url",
                          "caption"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "url": {
                            "type": "string",
                            "format": "uri",
                            "pattern": "^https?:\\/\\/"
                          },
                          "caption": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "maxLength": 200
                          }
                        }
                      }
                    },
                    "administrator": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "required": [
                        "id",
                        "display_name"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "display_name": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    },
                    "manager": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "required": [
                        "id",
                        "display_name"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "display_name": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    },
                    "source_ref": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "field_id",
                          "label",
                          "address",
                          "surface",
                          "opening_hours",
                          "opening_hours_version",
                          "fares",
                          "fares_version"
                        ],
                        "properties": {
                          "field_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "label": {
                            "type": "string"
                          },
                          "address": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "surface": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "enum": [
                              "grass",
                              "synthetic",
                              "mixed",
                              "indoor"
                            ]
                          },
                          "opening_hours": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "weekday",
                                "opens",
                                "closes"
                              ],
                              "properties": {
                                "weekday": {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 7
                                },
                                "opens": {
                                  "type": "string",
                                  "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$|^24:00$"
                                },
                                "closes": {
                                  "type": "string",
                                  "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$|^24:00$"
                                }
                              },
                              "additionalProperties": false
                            }
                          },
                          "opening_hours_version": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "fares": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "label",
                                "amount_cents"
                              ],
                              "properties": {
                                "label": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "amount_cents": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 10000000
                                }
                              },
                              "additionalProperties": false
                            }
                          },
                          "fares_version": {
                            "type": "integer",
                            "minimum": 0
                          }
                        }
                      }
                    },
                    "dayoffs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "from",
                          "to",
                          "reason",
                          "created_at"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "from": {
                            "type": "string",
                            "format": "date"
                          },
                          "to": {
                            "type": "string",
                            "format": "date"
                          },
                          "reason": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/facilities/unassigned-fields": {
      "get": {
        "tags": [
          "admin",
          "facilities"
        ],
        "summary": "Campi che non appartengono a nessuna struttura (struttura non disponibile)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "responses": {
          "200": {
            "description": "Campi senza struttura",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "field_id",
                          "organization_id",
                          "label",
                          "address"
                        ],
                        "properties": {
                          "field_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "organization_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "label": {
                            "type": "string"
                          },
                          "address": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/facilities/import": {
      "post": {
        "tags": [
          "admin",
          "facilities"
        ],
        "summary": "Importa strutture e le associa ai campi esistenti (anteprima con dry_run; ripetibile per source_ref)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "dry_run",
                  "items"
                ],
                "properties": {
                  "dry_run": {
                    "type": "boolean"
                  },
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "source_ref",
                        "organization_id",
                        "name",
                        "city",
                        "address",
                        "field_ids"
                      ],
                      "properties": {
                        "source_ref": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80
                        },
                        "organization_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "name": {
                          "type": "string",
                          "minLength": 2,
                          "maxLength": 120
                        },
                        "city": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80
                        },
                        "address": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "minLength": 1,
                          "maxLength": 200
                        },
                        "field_ids": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "maxItems": 50
                        }
                      },
                      "additionalProperties": false
                    },
                    "maxItems": 500
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Esito",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "dry_run",
                    "created",
                    "existing",
                    "linked",
                    "items"
                  ],
                  "properties": {
                    "dry_run": {
                      "type": "boolean"
                    },
                    "created": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "existing": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "linked": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "source_ref",
                          "facility_id",
                          "state",
                          "linked_field_ids",
                          "skipped"
                        ],
                        "properties": {
                          "source_ref": {
                            "type": "string"
                          },
                          "facility_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "state": {
                            "type": "string",
                            "enum": [
                              "created",
                              "existing"
                            ]
                          },
                          "linked_field_ids": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "format": "uuid"
                            }
                          },
                          "skipped": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "field_id",
                                "reason"
                              ],
                              "properties": {
                                "field_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "reason": {
                                  "type": "string",
                                  "enum": [
                                    "unknown_field",
                                    "linked_elsewhere",
                                    "other_organization",
                                    "facility_archived"
                                  ]
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/facilities/{facilityId}": {
      "get": {
        "tags": [
          "admin",
          "facilities"
        ],
        "summary": "Scheda della struttura: dati, campi, orari, tariffe, chiusure, foto, responsabili",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "facilityId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Struttura",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "slug",
                    "organization_id",
                    "name",
                    "city",
                    "address",
                    "status",
                    "version",
                    "updated_at",
                    "geo_lat",
                    "geo_lng",
                    "phone",
                    "mobile",
                    "fax",
                    "email",
                    "website",
                    "services",
                    "photos",
                    "administrator",
                    "manager",
                    "source_ref",
                    "fields",
                    "dayoffs"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "slug": {
                      "type": "string",
                      "minLength": 2,
                      "maxLength": 64,
                      "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
                    },
                    "organization_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "name": {
                      "type": "string"
                    },
                    "city": {
                      "type": "string"
                    },
                    "address": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "active",
                        "archived"
                      ]
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "geo_lat": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "geo_lng": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "phone": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "mobile": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "fax": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "email": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "website": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "services": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "photos": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "url",
                          "caption"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "url": {
                            "type": "string",
                            "format": "uri",
                            "pattern": "^https?:\\/\\/"
                          },
                          "caption": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "maxLength": 200
                          }
                        }
                      }
                    },
                    "administrator": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "required": [
                        "id",
                        "display_name"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "display_name": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    },
                    "manager": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "required": [
                        "id",
                        "display_name"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "display_name": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    },
                    "source_ref": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "field_id",
                          "label",
                          "address",
                          "surface",
                          "opening_hours",
                          "opening_hours_version",
                          "fares",
                          "fares_version"
                        ],
                        "properties": {
                          "field_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "label": {
                            "type": "string"
                          },
                          "address": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "surface": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "enum": [
                              "grass",
                              "synthetic",
                              "mixed",
                              "indoor"
                            ]
                          },
                          "opening_hours": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "weekday",
                                "opens",
                                "closes"
                              ],
                              "properties": {
                                "weekday": {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 7
                                },
                                "opens": {
                                  "type": "string",
                                  "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$|^24:00$"
                                },
                                "closes": {
                                  "type": "string",
                                  "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$|^24:00$"
                                }
                              },
                              "additionalProperties": false
                            }
                          },
                          "opening_hours_version": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "fares": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "label",
                                "amount_cents"
                              ],
                              "properties": {
                                "label": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "amount_cents": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 10000000
                                }
                              },
                              "additionalProperties": false
                            }
                          },
                          "fares_version": {
                            "type": "integer",
                            "minimum": 0
                          }
                        }
                      }
                    },
                    "dayoffs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "from",
                          "to",
                          "reason",
                          "created_at"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "from": {
                            "type": "string",
                            "format": "date"
                          },
                          "to": {
                            "type": "string",
                            "format": "date"
                          },
                          "reason": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "admin",
          "facilities"
        ],
        "summary": "Aggiorna dati e recapiti della struttura (concorrenza per versione)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "facilityId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "expected_version"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 120
                  },
                  "city": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "address": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "geo_lat": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "minimum": -90,
                    "maximum": 90
                  },
                  "geo_lng": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "minimum": -180,
                    "maximum": 180
                  },
                  "phone": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "minLength": 1,
                    "maxLength": 40
                  },
                  "mobile": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "minLength": 1,
                    "maxLength": 40
                  },
                  "fax": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "minLength": 1,
                    "maxLength": 40
                  },
                  "email": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "email",
                    "maxLength": 160
                  },
                  "website": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uri",
                    "pattern": "^https?:\\/\\/"
                  },
                  "services": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 60
                    },
                    "maxItems": 30
                  },
                  "expected_version": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Struttura aggiornata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "slug",
                    "organization_id",
                    "name",
                    "city",
                    "address",
                    "status",
                    "version",
                    "updated_at",
                    "geo_lat",
                    "geo_lng",
                    "phone",
                    "mobile",
                    "fax",
                    "email",
                    "website",
                    "services",
                    "photos",
                    "administrator",
                    "manager",
                    "source_ref",
                    "fields",
                    "dayoffs"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "slug": {
                      "type": "string",
                      "minLength": 2,
                      "maxLength": 64,
                      "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
                    },
                    "organization_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "name": {
                      "type": "string"
                    },
                    "city": {
                      "type": "string"
                    },
                    "address": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "active",
                        "archived"
                      ]
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "geo_lat": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "geo_lng": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "phone": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "mobile": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "fax": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "email": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "website": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "services": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "photos": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "url",
                          "caption"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "url": {
                            "type": "string",
                            "format": "uri",
                            "pattern": "^https?:\\/\\/"
                          },
                          "caption": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "maxLength": 200
                          }
                        }
                      }
                    },
                    "administrator": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "required": [
                        "id",
                        "display_name"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "display_name": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    },
                    "manager": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "required": [
                        "id",
                        "display_name"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "display_name": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    },
                    "source_ref": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "field_id",
                          "label",
                          "address",
                          "surface",
                          "opening_hours",
                          "opening_hours_version",
                          "fares",
                          "fares_version"
                        ],
                        "properties": {
                          "field_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "label": {
                            "type": "string"
                          },
                          "address": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "surface": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "enum": [
                              "grass",
                              "synthetic",
                              "mixed",
                              "indoor"
                            ]
                          },
                          "opening_hours": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "weekday",
                                "opens",
                                "closes"
                              ],
                              "properties": {
                                "weekday": {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 7
                                },
                                "opens": {
                                  "type": "string",
                                  "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$|^24:00$"
                                },
                                "closes": {
                                  "type": "string",
                                  "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$|^24:00$"
                                }
                              },
                              "additionalProperties": false
                            }
                          },
                          "opening_hours_version": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "fares": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "label",
                                "amount_cents"
                              ],
                              "properties": {
                                "label": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "amount_cents": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 10000000
                                }
                              },
                              "additionalProperties": false
                            }
                          },
                          "fares_version": {
                            "type": "integer",
                            "minimum": 0
                          }
                        }
                      }
                    },
                    "dayoffs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "from",
                          "to",
                          "reason",
                          "created_at"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "from": {
                            "type": "string",
                            "format": "date"
                          },
                          "to": {
                            "type": "string",
                            "format": "date"
                          },
                          "reason": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "admin",
          "facilities"
        ],
        "summary": "Archivia la struttura e libera i suoi campi; rifiutata (409) se ci sono gare future sui suoi campi",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "facilityId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "expected_version",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Struttura archiviata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "slug",
                    "organization_id",
                    "name",
                    "city",
                    "address",
                    "status",
                    "version",
                    "updated_at",
                    "geo_lat",
                    "geo_lng",
                    "phone",
                    "mobile",
                    "fax",
                    "email",
                    "website",
                    "services",
                    "photos",
                    "administrator",
                    "manager",
                    "source_ref",
                    "fields",
                    "dayoffs"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "slug": {
                      "type": "string",
                      "minLength": 2,
                      "maxLength": 64,
                      "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
                    },
                    "organization_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "name": {
                      "type": "string"
                    },
                    "city": {
                      "type": "string"
                    },
                    "address": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "active",
                        "archived"
                      ]
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "geo_lat": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "geo_lng": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "phone": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "mobile": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "fax": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "email": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "website": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "services": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "photos": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "url",
                          "caption"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "url": {
                            "type": "string",
                            "format": "uri",
                            "pattern": "^https?:\\/\\/"
                          },
                          "caption": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "maxLength": 200
                          }
                        }
                      }
                    },
                    "administrator": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "required": [
                        "id",
                        "display_name"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "display_name": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    },
                    "manager": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "required": [
                        "id",
                        "display_name"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "display_name": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    },
                    "source_ref": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "field_id",
                          "label",
                          "address",
                          "surface",
                          "opening_hours",
                          "opening_hours_version",
                          "fares",
                          "fares_version"
                        ],
                        "properties": {
                          "field_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "label": {
                            "type": "string"
                          },
                          "address": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "surface": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "enum": [
                              "grass",
                              "synthetic",
                              "mixed",
                              "indoor"
                            ]
                          },
                          "opening_hours": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "weekday",
                                "opens",
                                "closes"
                              ],
                              "properties": {
                                "weekday": {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 7
                                },
                                "opens": {
                                  "type": "string",
                                  "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$|^24:00$"
                                },
                                "closes": {
                                  "type": "string",
                                  "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$|^24:00$"
                                }
                              },
                              "additionalProperties": false
                            }
                          },
                          "opening_hours_version": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "fares": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "label",
                                "amount_cents"
                              ],
                              "properties": {
                                "label": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "amount_cents": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 10000000
                                }
                              },
                              "additionalProperties": false
                            }
                          },
                          "fares_version": {
                            "type": "integer",
                            "minimum": 0
                          }
                        }
                      }
                    },
                    "dayoffs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "from",
                          "to",
                          "reason",
                          "created_at"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "from": {
                            "type": "string",
                            "format": "date"
                          },
                          "to": {
                            "type": "string",
                            "format": "date"
                          },
                          "reason": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/facilities/{facilityId}/fields": {
      "post": {
        "tags": [
          "admin",
          "facilities"
        ],
        "summary": "Associa un campo esistente alla struttura (ripetibile)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "facilityId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "field_id"
                ],
                "properties": {
                  "field_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Struttura con il campo",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "slug",
                    "organization_id",
                    "name",
                    "city",
                    "address",
                    "status",
                    "version",
                    "updated_at",
                    "geo_lat",
                    "geo_lng",
                    "phone",
                    "mobile",
                    "fax",
                    "email",
                    "website",
                    "services",
                    "photos",
                    "administrator",
                    "manager",
                    "source_ref",
                    "fields",
                    "dayoffs"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "slug": {
                      "type": "string",
                      "minLength": 2,
                      "maxLength": 64,
                      "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
                    },
                    "organization_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "name": {
                      "type": "string"
                    },
                    "city": {
                      "type": "string"
                    },
                    "address": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "active",
                        "archived"
                      ]
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "geo_lat": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "geo_lng": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "phone": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "mobile": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "fax": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "email": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "website": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "services": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "photos": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "url",
                          "caption"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "url": {
                            "type": "string",
                            "format": "uri",
                            "pattern": "^https?:\\/\\/"
                          },
                          "caption": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "maxLength": 200
                          }
                        }
                      }
                    },
                    "administrator": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "required": [
                        "id",
                        "display_name"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "display_name": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    },
                    "manager": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "required": [
                        "id",
                        "display_name"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "display_name": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    },
                    "source_ref": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "field_id",
                          "label",
                          "address",
                          "surface",
                          "opening_hours",
                          "opening_hours_version",
                          "fares",
                          "fares_version"
                        ],
                        "properties": {
                          "field_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "label": {
                            "type": "string"
                          },
                          "address": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "surface": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "enum": [
                              "grass",
                              "synthetic",
                              "mixed",
                              "indoor"
                            ]
                          },
                          "opening_hours": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "weekday",
                                "opens",
                                "closes"
                              ],
                              "properties": {
                                "weekday": {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 7
                                },
                                "opens": {
                                  "type": "string",
                                  "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$|^24:00$"
                                },
                                "closes": {
                                  "type": "string",
                                  "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$|^24:00$"
                                }
                              },
                              "additionalProperties": false
                            }
                          },
                          "opening_hours_version": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "fares": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "label",
                                "amount_cents"
                              ],
                              "properties": {
                                "label": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "amount_cents": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 10000000
                                }
                              },
                              "additionalProperties": false
                            }
                          },
                          "fares_version": {
                            "type": "integer",
                            "minimum": 0
                          }
                        }
                      }
                    },
                    "dayoffs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "from",
                          "to",
                          "reason",
                          "created_at"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "from": {
                            "type": "string",
                            "format": "date"
                          },
                          "to": {
                            "type": "string",
                            "format": "date"
                          },
                          "reason": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/facilities/{facilityId}/fields/{fieldId}": {
      "delete": {
        "tags": [
          "admin",
          "facilities"
        ],
        "summary": "Toglie il campo dalla struttura: il campo resta, con struttura non disponibile",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "facilityId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "fieldId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Struttura senza il campo",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "slug",
                    "organization_id",
                    "name",
                    "city",
                    "address",
                    "status",
                    "version",
                    "updated_at",
                    "geo_lat",
                    "geo_lng",
                    "phone",
                    "mobile",
                    "fax",
                    "email",
                    "website",
                    "services",
                    "photos",
                    "administrator",
                    "manager",
                    "source_ref",
                    "fields",
                    "dayoffs"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "slug": {
                      "type": "string",
                      "minLength": 2,
                      "maxLength": 64,
                      "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
                    },
                    "organization_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "name": {
                      "type": "string"
                    },
                    "city": {
                      "type": "string"
                    },
                    "address": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "active",
                        "archived"
                      ]
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "geo_lat": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "geo_lng": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "phone": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "mobile": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "fax": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "email": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "website": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "services": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "photos": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "url",
                          "caption"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "url": {
                            "type": "string",
                            "format": "uri",
                            "pattern": "^https?:\\/\\/"
                          },
                          "caption": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "maxLength": 200
                          }
                        }
                      }
                    },
                    "administrator": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "required": [
                        "id",
                        "display_name"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "display_name": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    },
                    "manager": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "required": [
                        "id",
                        "display_name"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "display_name": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    },
                    "source_ref": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "field_id",
                          "label",
                          "address",
                          "surface",
                          "opening_hours",
                          "opening_hours_version",
                          "fares",
                          "fares_version"
                        ],
                        "properties": {
                          "field_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "label": {
                            "type": "string"
                          },
                          "address": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "surface": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "enum": [
                              "grass",
                              "synthetic",
                              "mixed",
                              "indoor"
                            ]
                          },
                          "opening_hours": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "weekday",
                                "opens",
                                "closes"
                              ],
                              "properties": {
                                "weekday": {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 7
                                },
                                "opens": {
                                  "type": "string",
                                  "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$|^24:00$"
                                },
                                "closes": {
                                  "type": "string",
                                  "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$|^24:00$"
                                }
                              },
                              "additionalProperties": false
                            }
                          },
                          "opening_hours_version": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "fares": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "label",
                                "amount_cents"
                              ],
                              "properties": {
                                "label": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "amount_cents": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 10000000
                                }
                              },
                              "additionalProperties": false
                            }
                          },
                          "fares_version": {
                            "type": "integer",
                            "minimum": 0
                          }
                        }
                      }
                    },
                    "dayoffs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "from",
                          "to",
                          "reason",
                          "created_at"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "from": {
                            "type": "string",
                            "format": "date"
                          },
                          "to": {
                            "type": "string",
                            "format": "date"
                          },
                          "reason": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/facilities/{facilityId}/opening-hours": {
      "put": {
        "tags": [
          "admin",
          "facilities"
        ],
        "summary": "Sostituisce la settimana di apertura di un campo della struttura",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "facilityId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "field_id",
                  "slots",
                  "expected_version"
                ],
                "properties": {
                  "field_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "slots": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "weekday",
                        "opens",
                        "closes"
                      ],
                      "properties": {
                        "weekday": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 7
                        },
                        "opens": {
                          "type": "string",
                          "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$|^24:00$"
                        },
                        "closes": {
                          "type": "string",
                          "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$|^24:00$"
                        }
                      },
                      "additionalProperties": false
                    },
                    "maxItems": 28
                  },
                  "expected_version": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Struttura con gli orari",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "slug",
                    "organization_id",
                    "name",
                    "city",
                    "address",
                    "status",
                    "version",
                    "updated_at",
                    "geo_lat",
                    "geo_lng",
                    "phone",
                    "mobile",
                    "fax",
                    "email",
                    "website",
                    "services",
                    "photos",
                    "administrator",
                    "manager",
                    "source_ref",
                    "fields",
                    "dayoffs"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "slug": {
                      "type": "string",
                      "minLength": 2,
                      "maxLength": 64,
                      "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
                    },
                    "organization_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "name": {
                      "type": "string"
                    },
                    "city": {
                      "type": "string"
                    },
                    "address": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "active",
                        "archived"
                      ]
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "geo_lat": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "geo_lng": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "phone": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "mobile": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "fax": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "email": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "website": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "services": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "photos": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "url",
                          "caption"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "url": {
                            "type": "string",
                            "format": "uri",
                            "pattern": "^https?:\\/\\/"
                          },
                          "caption": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "maxLength": 200
                          }
                        }
                      }
                    },
                    "administrator": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "required": [
                        "id",
                        "display_name"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "display_name": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    },
                    "manager": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "required": [
                        "id",
                        "display_name"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "display_name": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    },
                    "source_ref": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "field_id",
                          "label",
                          "address",
                          "surface",
                          "opening_hours",
                          "opening_hours_version",
                          "fares",
                          "fares_version"
                        ],
                        "properties": {
                          "field_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "label": {
                            "type": "string"
                          },
                          "address": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "surface": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "enum": [
                              "grass",
                              "synthetic",
                              "mixed",
                              "indoor"
                            ]
                          },
                          "opening_hours": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "weekday",
                                "opens",
                                "closes"
                              ],
                              "properties": {
                                "weekday": {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 7
                                },
                                "opens": {
                                  "type": "string",
                                  "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$|^24:00$"
                                },
                                "closes": {
                                  "type": "string",
                                  "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$|^24:00$"
                                }
                              },
                              "additionalProperties": false
                            }
                          },
                          "opening_hours_version": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "fares": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "label",
                                "amount_cents"
                              ],
                              "properties": {
                                "label": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "amount_cents": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 10000000
                                }
                              },
                              "additionalProperties": false
                            }
                          },
                          "fares_version": {
                            "type": "integer",
                            "minimum": 0
                          }
                        }
                      }
                    },
                    "dayoffs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "from",
                          "to",
                          "reason",
                          "created_at"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "from": {
                            "type": "string",
                            "format": "date"
                          },
                          "to": {
                            "type": "string",
                            "format": "date"
                          },
                          "reason": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/facilities/{facilityId}/fares": {
      "put": {
        "tags": [
          "admin",
          "facilities"
        ],
        "summary": "Sostituisce le tariffe di un campo della struttura",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "facilityId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "field_id",
                  "fares",
                  "expected_version"
                ],
                "properties": {
                  "field_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "fares": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "label",
                        "amount_cents"
                      ],
                      "properties": {
                        "label": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 120
                        },
                        "amount_cents": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 10000000
                        }
                      },
                      "additionalProperties": false
                    },
                    "maxItems": 20
                  },
                  "expected_version": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Struttura con le tariffe",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "slug",
                    "organization_id",
                    "name",
                    "city",
                    "address",
                    "status",
                    "version",
                    "updated_at",
                    "geo_lat",
                    "geo_lng",
                    "phone",
                    "mobile",
                    "fax",
                    "email",
                    "website",
                    "services",
                    "photos",
                    "administrator",
                    "manager",
                    "source_ref",
                    "fields",
                    "dayoffs"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "slug": {
                      "type": "string",
                      "minLength": 2,
                      "maxLength": 64,
                      "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
                    },
                    "organization_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "name": {
                      "type": "string"
                    },
                    "city": {
                      "type": "string"
                    },
                    "address": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "active",
                        "archived"
                      ]
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "geo_lat": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "geo_lng": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "phone": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "mobile": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "fax": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "email": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "website": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "services": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "photos": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "url",
                          "caption"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "url": {
                            "type": "string",
                            "format": "uri",
                            "pattern": "^https?:\\/\\/"
                          },
                          "caption": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "maxLength": 200
                          }
                        }
                      }
                    },
                    "administrator": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "required": [
                        "id",
                        "display_name"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "display_name": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    },
                    "manager": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "required": [
                        "id",
                        "display_name"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "display_name": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    },
                    "source_ref": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "field_id",
                          "label",
                          "address",
                          "surface",
                          "opening_hours",
                          "opening_hours_version",
                          "fares",
                          "fares_version"
                        ],
                        "properties": {
                          "field_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "label": {
                            "type": "string"
                          },
                          "address": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "surface": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "enum": [
                              "grass",
                              "synthetic",
                              "mixed",
                              "indoor"
                            ]
                          },
                          "opening_hours": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "weekday",
                                "opens",
                                "closes"
                              ],
                              "properties": {
                                "weekday": {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 7
                                },
                                "opens": {
                                  "type": "string",
                                  "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$|^24:00$"
                                },
                                "closes": {
                                  "type": "string",
                                  "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$|^24:00$"
                                }
                              },
                              "additionalProperties": false
                            }
                          },
                          "opening_hours_version": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "fares": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "label",
                                "amount_cents"
                              ],
                              "properties": {
                                "label": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "amount_cents": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 10000000
                                }
                              },
                              "additionalProperties": false
                            }
                          },
                          "fares_version": {
                            "type": "integer",
                            "minimum": 0
                          }
                        }
                      }
                    },
                    "dayoffs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "from",
                          "to",
                          "reason",
                          "created_at"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "from": {
                            "type": "string",
                            "format": "date"
                          },
                          "to": {
                            "type": "string",
                            "format": "date"
                          },
                          "reason": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/facilities/{facilityId}/dayoffs": {
      "post": {
        "tags": [
          "admin",
          "facilities"
        ],
        "summary": "Aggiunge una chiusura straordinaria (dal ≥ oggi, al ≥ dal; ripetibile con request_id)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "facilityId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "from",
                  "to"
                ],
                "properties": {
                  "from": {
                    "type": "string",
                    "format": "date"
                  },
                  "to": {
                    "type": "string",
                    "format": "date"
                  },
                  "reason": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "request_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Già aggiunta",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "slug",
                    "organization_id",
                    "name",
                    "city",
                    "address",
                    "status",
                    "version",
                    "updated_at",
                    "geo_lat",
                    "geo_lng",
                    "phone",
                    "mobile",
                    "fax",
                    "email",
                    "website",
                    "services",
                    "photos",
                    "administrator",
                    "manager",
                    "source_ref",
                    "fields",
                    "dayoffs"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "slug": {
                      "type": "string",
                      "minLength": 2,
                      "maxLength": 64,
                      "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
                    },
                    "organization_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "name": {
                      "type": "string"
                    },
                    "city": {
                      "type": "string"
                    },
                    "address": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "active",
                        "archived"
                      ]
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "geo_lat": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "geo_lng": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "phone": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "mobile": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "fax": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "email": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "website": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "services": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "photos": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "url",
                          "caption"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "url": {
                            "type": "string",
                            "format": "uri",
                            "pattern": "^https?:\\/\\/"
                          },
                          "caption": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "maxLength": 200
                          }
                        }
                      }
                    },
                    "administrator": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "required": [
                        "id",
                        "display_name"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "display_name": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    },
                    "manager": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "required": [
                        "id",
                        "display_name"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "display_name": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    },
                    "source_ref": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "field_id",
                          "label",
                          "address",
                          "surface",
                          "opening_hours",
                          "opening_hours_version",
                          "fares",
                          "fares_version"
                        ],
                        "properties": {
                          "field_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "label": {
                            "type": "string"
                          },
                          "address": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "surface": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "enum": [
                              "grass",
                              "synthetic",
                              "mixed",
                              "indoor"
                            ]
                          },
                          "opening_hours": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "weekday",
                                "opens",
                                "closes"
                              ],
                              "properties": {
                                "weekday": {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 7
                                },
                                "opens": {
                                  "type": "string",
                                  "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$|^24:00$"
                                },
                                "closes": {
                                  "type": "string",
                                  "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$|^24:00$"
                                }
                              },
                              "additionalProperties": false
                            }
                          },
                          "opening_hours_version": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "fares": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "label",
                                "amount_cents"
                              ],
                              "properties": {
                                "label": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "amount_cents": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 10000000
                                }
                              },
                              "additionalProperties": false
                            }
                          },
                          "fares_version": {
                            "type": "integer",
                            "minimum": 0
                          }
                        }
                      }
                    },
                    "dayoffs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "from",
                          "to",
                          "reason",
                          "created_at"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "from": {
                            "type": "string",
                            "format": "date"
                          },
                          "to": {
                            "type": "string",
                            "format": "date"
                          },
                          "reason": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "Chiusura aggiunta",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "slug",
                    "organization_id",
                    "name",
                    "city",
                    "address",
                    "status",
                    "version",
                    "updated_at",
                    "geo_lat",
                    "geo_lng",
                    "phone",
                    "mobile",
                    "fax",
                    "email",
                    "website",
                    "services",
                    "photos",
                    "administrator",
                    "manager",
                    "source_ref",
                    "fields",
                    "dayoffs"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "slug": {
                      "type": "string",
                      "minLength": 2,
                      "maxLength": 64,
                      "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
                    },
                    "organization_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "name": {
                      "type": "string"
                    },
                    "city": {
                      "type": "string"
                    },
                    "address": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "active",
                        "archived"
                      ]
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "geo_lat": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "geo_lng": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "phone": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "mobile": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "fax": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "email": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "website": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "services": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "photos": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "url",
                          "caption"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "url": {
                            "type": "string",
                            "format": "uri",
                            "pattern": "^https?:\\/\\/"
                          },
                          "caption": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "maxLength": 200
                          }
                        }
                      }
                    },
                    "administrator": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "required": [
                        "id",
                        "display_name"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "display_name": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    },
                    "manager": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "required": [
                        "id",
                        "display_name"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "display_name": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    },
                    "source_ref": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "field_id",
                          "label",
                          "address",
                          "surface",
                          "opening_hours",
                          "opening_hours_version",
                          "fares",
                          "fares_version"
                        ],
                        "properties": {
                          "field_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "label": {
                            "type": "string"
                          },
                          "address": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "surface": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "enum": [
                              "grass",
                              "synthetic",
                              "mixed",
                              "indoor"
                            ]
                          },
                          "opening_hours": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "weekday",
                                "opens",
                                "closes"
                              ],
                              "properties": {
                                "weekday": {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 7
                                },
                                "opens": {
                                  "type": "string",
                                  "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$|^24:00$"
                                },
                                "closes": {
                                  "type": "string",
                                  "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$|^24:00$"
                                }
                              },
                              "additionalProperties": false
                            }
                          },
                          "opening_hours_version": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "fares": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "label",
                                "amount_cents"
                              ],
                              "properties": {
                                "label": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "amount_cents": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 10000000
                                }
                              },
                              "additionalProperties": false
                            }
                          },
                          "fares_version": {
                            "type": "integer",
                            "minimum": 0
                          }
                        }
                      }
                    },
                    "dayoffs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "from",
                          "to",
                          "reason",
                          "created_at"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "from": {
                            "type": "string",
                            "format": "date"
                          },
                          "to": {
                            "type": "string",
                            "format": "date"
                          },
                          "reason": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/facilities/{facilityId}/dayoffs/{dayoffId}": {
      "delete": {
        "tags": [
          "admin",
          "facilities"
        ],
        "summary": "Rimuove una chiusura straordinaria (resta nello storico come rimossa)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "facilityId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "dayoffId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Chiusura rimossa",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "slug",
                    "organization_id",
                    "name",
                    "city",
                    "address",
                    "status",
                    "version",
                    "updated_at",
                    "geo_lat",
                    "geo_lng",
                    "phone",
                    "mobile",
                    "fax",
                    "email",
                    "website",
                    "services",
                    "photos",
                    "administrator",
                    "manager",
                    "source_ref",
                    "fields",
                    "dayoffs"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "slug": {
                      "type": "string",
                      "minLength": 2,
                      "maxLength": 64,
                      "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
                    },
                    "organization_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "name": {
                      "type": "string"
                    },
                    "city": {
                      "type": "string"
                    },
                    "address": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "active",
                        "archived"
                      ]
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "geo_lat": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "geo_lng": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "phone": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "mobile": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "fax": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "email": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "website": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "services": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "photos": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "url",
                          "caption"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "url": {
                            "type": "string",
                            "format": "uri",
                            "pattern": "^https?:\\/\\/"
                          },
                          "caption": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "maxLength": 200
                          }
                        }
                      }
                    },
                    "administrator": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "required": [
                        "id",
                        "display_name"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "display_name": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    },
                    "manager": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "required": [
                        "id",
                        "display_name"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "display_name": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    },
                    "source_ref": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "field_id",
                          "label",
                          "address",
                          "surface",
                          "opening_hours",
                          "opening_hours_version",
                          "fares",
                          "fares_version"
                        ],
                        "properties": {
                          "field_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "label": {
                            "type": "string"
                          },
                          "address": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "surface": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "enum": [
                              "grass",
                              "synthetic",
                              "mixed",
                              "indoor"
                            ]
                          },
                          "opening_hours": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "weekday",
                                "opens",
                                "closes"
                              ],
                              "properties": {
                                "weekday": {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 7
                                },
                                "opens": {
                                  "type": "string",
                                  "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$|^24:00$"
                                },
                                "closes": {
                                  "type": "string",
                                  "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$|^24:00$"
                                }
                              },
                              "additionalProperties": false
                            }
                          },
                          "opening_hours_version": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "fares": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "label",
                                "amount_cents"
                              ],
                              "properties": {
                                "label": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "amount_cents": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 10000000
                                }
                              },
                              "additionalProperties": false
                            }
                          },
                          "fares_version": {
                            "type": "integer",
                            "minimum": 0
                          }
                        }
                      }
                    },
                    "dayoffs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "from",
                          "to",
                          "reason",
                          "created_at"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "from": {
                            "type": "string",
                            "format": "date"
                          },
                          "to": {
                            "type": "string",
                            "format": "date"
                          },
                          "reason": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/facilities/{facilityId}/photos": {
      "post": {
        "tags": [
          "admin",
          "facilities"
        ],
        "summary": "Aggiunge una foto (URL http/https) alla galleria della struttura",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "facilityId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "url",
                  "expected_version"
                ],
                "properties": {
                  "url": {
                    "type": "string",
                    "format": "uri",
                    "pattern": "^https?:\\/\\/"
                  },
                  "caption": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "request_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "expected_version": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Già aggiunta",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "slug",
                    "organization_id",
                    "name",
                    "city",
                    "address",
                    "status",
                    "version",
                    "updated_at",
                    "geo_lat",
                    "geo_lng",
                    "phone",
                    "mobile",
                    "fax",
                    "email",
                    "website",
                    "services",
                    "photos",
                    "administrator",
                    "manager",
                    "source_ref",
                    "fields",
                    "dayoffs"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "slug": {
                      "type": "string",
                      "minLength": 2,
                      "maxLength": 64,
                      "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
                    },
                    "organization_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "name": {
                      "type": "string"
                    },
                    "city": {
                      "type": "string"
                    },
                    "address": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "active",
                        "archived"
                      ]
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "geo_lat": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "geo_lng": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "phone": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "mobile": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "fax": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "email": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "website": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "services": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "photos": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "url",
                          "caption"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "url": {
                            "type": "string",
                            "format": "uri",
                            "pattern": "^https?:\\/\\/"
                          },
                          "caption": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "maxLength": 200
                          }
                        }
                      }
                    },
                    "administrator": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "required": [
                        "id",
                        "display_name"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "display_name": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    },
                    "manager": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "required": [
                        "id",
                        "display_name"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "display_name": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    },
                    "source_ref": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "field_id",
                          "label",
                          "address",
                          "surface",
                          "opening_hours",
                          "opening_hours_version",
                          "fares",
                          "fares_version"
                        ],
                        "properties": {
                          "field_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "label": {
                            "type": "string"
                          },
                          "address": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "surface": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "enum": [
                              "grass",
                              "synthetic",
                              "mixed",
                              "indoor"
                            ]
                          },
                          "opening_hours": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "weekday",
                                "opens",
                                "closes"
                              ],
                              "properties": {
                                "weekday": {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 7
                                },
                                "opens": {
                                  "type": "string",
                                  "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$|^24:00$"
                                },
                                "closes": {
                                  "type": "string",
                                  "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$|^24:00$"
                                }
                              },
                              "additionalProperties": false
                            }
                          },
                          "opening_hours_version": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "fares": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "label",
                                "amount_cents"
                              ],
                              "properties": {
                                "label": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "amount_cents": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 10000000
                                }
                              },
                              "additionalProperties": false
                            }
                          },
                          "fares_version": {
                            "type": "integer",
                            "minimum": 0
                          }
                        }
                      }
                    },
                    "dayoffs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "from",
                          "to",
                          "reason",
                          "created_at"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "from": {
                            "type": "string",
                            "format": "date"
                          },
                          "to": {
                            "type": "string",
                            "format": "date"
                          },
                          "reason": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "Foto aggiunta",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "slug",
                    "organization_id",
                    "name",
                    "city",
                    "address",
                    "status",
                    "version",
                    "updated_at",
                    "geo_lat",
                    "geo_lng",
                    "phone",
                    "mobile",
                    "fax",
                    "email",
                    "website",
                    "services",
                    "photos",
                    "administrator",
                    "manager",
                    "source_ref",
                    "fields",
                    "dayoffs"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "slug": {
                      "type": "string",
                      "minLength": 2,
                      "maxLength": 64,
                      "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
                    },
                    "organization_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "name": {
                      "type": "string"
                    },
                    "city": {
                      "type": "string"
                    },
                    "address": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "active",
                        "archived"
                      ]
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "geo_lat": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "geo_lng": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "phone": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "mobile": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "fax": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "email": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "website": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "services": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "photos": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "url",
                          "caption"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "url": {
                            "type": "string",
                            "format": "uri",
                            "pattern": "^https?:\\/\\/"
                          },
                          "caption": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "maxLength": 200
                          }
                        }
                      }
                    },
                    "administrator": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "required": [
                        "id",
                        "display_name"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "display_name": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    },
                    "manager": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "required": [
                        "id",
                        "display_name"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "display_name": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    },
                    "source_ref": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "field_id",
                          "label",
                          "address",
                          "surface",
                          "opening_hours",
                          "opening_hours_version",
                          "fares",
                          "fares_version"
                        ],
                        "properties": {
                          "field_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "label": {
                            "type": "string"
                          },
                          "address": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "surface": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "enum": [
                              "grass",
                              "synthetic",
                              "mixed",
                              "indoor"
                            ]
                          },
                          "opening_hours": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "weekday",
                                "opens",
                                "closes"
                              ],
                              "properties": {
                                "weekday": {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 7
                                },
                                "opens": {
                                  "type": "string",
                                  "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$|^24:00$"
                                },
                                "closes": {
                                  "type": "string",
                                  "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$|^24:00$"
                                }
                              },
                              "additionalProperties": false
                            }
                          },
                          "opening_hours_version": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "fares": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "label",
                                "amount_cents"
                              ],
                              "properties": {
                                "label": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "amount_cents": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 10000000
                                }
                              },
                              "additionalProperties": false
                            }
                          },
                          "fares_version": {
                            "type": "integer",
                            "minimum": 0
                          }
                        }
                      }
                    },
                    "dayoffs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "from",
                          "to",
                          "reason",
                          "created_at"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "from": {
                            "type": "string",
                            "format": "date"
                          },
                          "to": {
                            "type": "string",
                            "format": "date"
                          },
                          "reason": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/facilities/{facilityId}/photos/{photoId}": {
      "delete": {
        "tags": [
          "admin",
          "facilities"
        ],
        "summary": "Elimina una foto dalla galleria della struttura",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "facilityId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "photoId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "expected_version",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Foto eliminata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "slug",
                    "organization_id",
                    "name",
                    "city",
                    "address",
                    "status",
                    "version",
                    "updated_at",
                    "geo_lat",
                    "geo_lng",
                    "phone",
                    "mobile",
                    "fax",
                    "email",
                    "website",
                    "services",
                    "photos",
                    "administrator",
                    "manager",
                    "source_ref",
                    "fields",
                    "dayoffs"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "slug": {
                      "type": "string",
                      "minLength": 2,
                      "maxLength": 64,
                      "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
                    },
                    "organization_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "name": {
                      "type": "string"
                    },
                    "city": {
                      "type": "string"
                    },
                    "address": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "active",
                        "archived"
                      ]
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "geo_lat": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "geo_lng": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "phone": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "mobile": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "fax": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "email": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "website": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "services": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "photos": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "url",
                          "caption"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "url": {
                            "type": "string",
                            "format": "uri",
                            "pattern": "^https?:\\/\\/"
                          },
                          "caption": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "maxLength": 200
                          }
                        }
                      }
                    },
                    "administrator": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "required": [
                        "id",
                        "display_name"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "display_name": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    },
                    "manager": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "required": [
                        "id",
                        "display_name"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "display_name": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    },
                    "source_ref": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "field_id",
                          "label",
                          "address",
                          "surface",
                          "opening_hours",
                          "opening_hours_version",
                          "fares",
                          "fares_version"
                        ],
                        "properties": {
                          "field_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "label": {
                            "type": "string"
                          },
                          "address": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "surface": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "enum": [
                              "grass",
                              "synthetic",
                              "mixed",
                              "indoor"
                            ]
                          },
                          "opening_hours": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "weekday",
                                "opens",
                                "closes"
                              ],
                              "properties": {
                                "weekday": {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 7
                                },
                                "opens": {
                                  "type": "string",
                                  "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$|^24:00$"
                                },
                                "closes": {
                                  "type": "string",
                                  "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$|^24:00$"
                                }
                              },
                              "additionalProperties": false
                            }
                          },
                          "opening_hours_version": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "fares": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "label",
                                "amount_cents"
                              ],
                              "properties": {
                                "label": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "amount_cents": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 10000000
                                }
                              },
                              "additionalProperties": false
                            }
                          },
                          "fares_version": {
                            "type": "integer",
                            "minimum": 0
                          }
                        }
                      }
                    },
                    "dayoffs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "from",
                          "to",
                          "reason",
                          "created_at"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "from": {
                            "type": "string",
                            "format": "date"
                          },
                          "to": {
                            "type": "string",
                            "format": "date"
                          },
                          "reason": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/facilities/{facilityId}/admins": {
      "put": {
        "tags": [
          "admin",
          "facilities"
        ],
        "summary": "Amministratore (account del tenant) e responsabile (solo tesserato) della struttura",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "facilityId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "administrator_user_id",
                  "manager_player_id",
                  "expected_version"
                ],
                "properties": {
                  "administrator_user_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "manager_player_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "expected_version": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Responsabili aggiornati",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "slug",
                    "organization_id",
                    "name",
                    "city",
                    "address",
                    "status",
                    "version",
                    "updated_at",
                    "geo_lat",
                    "geo_lng",
                    "phone",
                    "mobile",
                    "fax",
                    "email",
                    "website",
                    "services",
                    "photos",
                    "administrator",
                    "manager",
                    "source_ref",
                    "fields",
                    "dayoffs"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "slug": {
                      "type": "string",
                      "minLength": 2,
                      "maxLength": 64,
                      "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
                    },
                    "organization_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "name": {
                      "type": "string"
                    },
                    "city": {
                      "type": "string"
                    },
                    "address": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "active",
                        "archived"
                      ]
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "geo_lat": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "geo_lng": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "phone": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "mobile": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "fax": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "email": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "website": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "services": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "photos": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "url",
                          "caption"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "url": {
                            "type": "string",
                            "format": "uri",
                            "pattern": "^https?:\\/\\/"
                          },
                          "caption": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "maxLength": 200
                          }
                        }
                      }
                    },
                    "administrator": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "required": [
                        "id",
                        "display_name"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "display_name": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    },
                    "manager": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "required": [
                        "id",
                        "display_name"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "display_name": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    },
                    "source_ref": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "field_id",
                          "label",
                          "address",
                          "surface",
                          "opening_hours",
                          "opening_hours_version",
                          "fares",
                          "fares_version"
                        ],
                        "properties": {
                          "field_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "label": {
                            "type": "string"
                          },
                          "address": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "surface": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "enum": [
                              "grass",
                              "synthetic",
                              "mixed",
                              "indoor"
                            ]
                          },
                          "opening_hours": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "weekday",
                                "opens",
                                "closes"
                              ],
                              "properties": {
                                "weekday": {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 7
                                },
                                "opens": {
                                  "type": "string",
                                  "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$|^24:00$"
                                },
                                "closes": {
                                  "type": "string",
                                  "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$|^24:00$"
                                }
                              },
                              "additionalProperties": false
                            }
                          },
                          "opening_hours_version": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "fares": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "label",
                                "amount_cents"
                              ],
                              "properties": {
                                "label": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "amount_cents": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 10000000
                                }
                              },
                              "additionalProperties": false
                            }
                          },
                          "fares_version": {
                            "type": "integer",
                            "minimum": 0
                          }
                        }
                      }
                    },
                    "dayoffs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "from",
                          "to",
                          "reason",
                          "created_at"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "from": {
                            "type": "string",
                            "format": "date"
                          },
                          "to": {
                            "type": "string",
                            "format": "date"
                          },
                          "reason": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/tournaments/{tournamentId}/fields": {
      "get": {
        "tags": [
          "admin",
          "facilities"
        ],
        "summary": "Campi assegnati al torneo (paginati a cursore)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 400
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Campi del torneo",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "next_cursor"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "field_id",
                          "label",
                          "facility",
                          "assigned_at"
                        ],
                        "properties": {
                          "field_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "label": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "facility": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "required": [
                              "id",
                              "name",
                              "slug"
                            ],
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "name": {
                                "type": "string"
                              },
                              "slug": {
                                "type": "string",
                                "minLength": 2,
                                "maxLength": 64,
                                "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
                              }
                            }
                          },
                          "assigned_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "admin",
          "facilities"
        ],
        "summary": "Assegna un campo al torneo (ripetibile)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "field_id"
                ],
                "properties": {
                  "field_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Era già assegnato",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "field_id",
                    "label",
                    "facility",
                    "assigned_at"
                  ],
                  "properties": {
                    "field_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "label": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "facility": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "required": [
                        "id",
                        "name",
                        "slug"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "name": {
                          "type": "string"
                        },
                        "slug": {
                          "type": "string",
                          "minLength": 2,
                          "maxLength": 64,
                          "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
                        }
                      }
                    },
                    "assigned_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "Campo assegnato",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "field_id",
                    "label",
                    "facility",
                    "assigned_at"
                  ],
                  "properties": {
                    "field_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "label": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "facility": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "required": [
                        "id",
                        "name",
                        "slug"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "name": {
                          "type": "string"
                        },
                        "slug": {
                          "type": "string",
                          "minLength": 2,
                          "maxLength": 64,
                          "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
                        }
                      }
                    },
                    "assigned_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/tournaments/{tournamentId}/fields/{fieldId}": {
      "delete": {
        "tags": [
          "admin",
          "facilities"
        ],
        "summary": "Rimuove il campo dal torneo (stato «rimosso»; le gare già fissate restano)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "fieldId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Rimosso"
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/fields/{fieldId}/opening-hours": {
      "get": {
        "tags": [
          "admin",
          "facilities"
        ],
        "summary": "Orari di apertura e chiusure future di un campo (per proporre giorni e orari)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "fieldId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Orari del campo",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "field_id",
                    "facility",
                    "recorded",
                    "slots",
                    "open_weekdays",
                    "dayoffs"
                  ],
                  "properties": {
                    "field_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "facility": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "required": [
                        "id",
                        "name"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "name": {
                          "type": "string"
                        }
                      }
                    },
                    "recorded": {
                      "type": "boolean"
                    },
                    "slots": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "weekday",
                          "opens",
                          "closes"
                        ],
                        "properties": {
                          "weekday": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 7
                          },
                          "opens": {
                            "type": "string",
                            "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$|^24:00$"
                          },
                          "closes": {
                            "type": "string",
                            "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$|^24:00$"
                          }
                        },
                        "additionalProperties": false
                      }
                    },
                    "open_weekdays": {
                      "type": "array",
                      "items": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 7
                      }
                    },
                    "dayoffs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "from",
                          "to"
                        ],
                        "properties": {
                          "from": {
                            "type": "string",
                            "format": "date"
                          },
                          "to": {
                            "type": "string",
                            "format": "date"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/fields/{fieldId}/availability": {
      "get": {
        "tags": [
          "admin",
          "facilities"
        ],
        "summary": "Disponibilità del campo a una data e ora: aperto, non in chiusura, senza altra gara nei 90 minuti",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "fieldId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "at",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "match_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Disponibilità",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "field_id",
                    "at",
                    "local_date",
                    "local_time",
                    "weekday",
                    "window_minutes",
                    "available",
                    "opening",
                    "dayoff",
                    "conflicts"
                  ],
                  "properties": {
                    "field_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "local_date": {
                      "type": "string",
                      "format": "date"
                    },
                    "local_time": {
                      "type": "string",
                      "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$|^24:00$"
                    },
                    "weekday": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 7
                    },
                    "window_minutes": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "available": {
                      "type": [
                        "boolean",
                        "null"
                      ]
                    },
                    "opening": {
                      "type": "string",
                      "enum": [
                        "open",
                        "closed",
                        "not_recorded"
                      ]
                    },
                    "dayoff": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "required": [
                        "id",
                        "from",
                        "to",
                        "reason",
                        "created_at"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "from": {
                          "type": "string",
                          "format": "date"
                        },
                        "to": {
                          "type": "string",
                          "format": "date"
                        },
                        "reason": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    },
                    "conflicts": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "match_id",
                          "tournament_id",
                          "scheduled_at"
                        ],
                        "properties": {
                          "match_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "tournament_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "scheduled_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/public/facilities": {
      "get": {
        "tags": [
          "public",
          "facilities"
        ],
        "summary": "Strutture sportive attive, per nome (paginate a cursore)",
        "security": [
          {
            "ApiKey": [
              "read:public.matches"
            ]
          }
        ],
        "x-tenant-scope": "public",
        "x-privacy-classification": "public",
        "x-rate-limit-tier": "public_widget",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 400
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Pagina di strutture",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "next_cursor"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "slug",
                          "name",
                          "city",
                          "address",
                          "geo_lat",
                          "geo_lng",
                          "services",
                          "field_count"
                        ],
                        "properties": {
                          "slug": {
                            "type": "string",
                            "minLength": 2,
                            "maxLength": 64,
                            "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
                          },
                          "name": {
                            "type": "string"
                          },
                          "city": {
                            "type": "string"
                          },
                          "address": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "geo_lat": {
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "geo_lng": {
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "services": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "field_count": {
                            "type": "integer",
                            "minimum": 0
                          }
                        }
                      }
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/public/facilities/{slug}": {
      "get": {
        "tags": [
          "public",
          "facilities"
        ],
        "summary": "Scheda pubblica della struttura: recapiti, servizi, campi con orari, chiusure",
        "security": [
          {
            "ApiKey": [
              "read:public.matches"
            ]
          }
        ],
        "x-tenant-scope": "public",
        "x-privacy-classification": "public",
        "x-rate-limit-tier": "public_widget",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Struttura",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "slug",
                    "name",
                    "city",
                    "address",
                    "geo_lat",
                    "geo_lng",
                    "services",
                    "field_count",
                    "phone",
                    "mobile",
                    "email",
                    "website",
                    "photos",
                    "fields",
                    "dayoffs"
                  ],
                  "properties": {
                    "slug": {
                      "type": "string",
                      "minLength": 2,
                      "maxLength": 64,
                      "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
                    },
                    "name": {
                      "type": "string"
                    },
                    "city": {
                      "type": "string"
                    },
                    "address": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "geo_lat": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "geo_lng": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "services": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "field_count": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "phone": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "mobile": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "email": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "website": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "photos": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "url",
                          "caption"
                        ],
                        "properties": {
                          "url": {
                            "type": "string",
                            "format": "uri",
                            "pattern": "^https?:\\/\\/"
                          },
                          "caption": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "maxLength": 200
                          }
                        }
                      }
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "field_id",
                          "label",
                          "surface",
                          "opening_hours"
                        ],
                        "properties": {
                          "field_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "label": {
                            "type": "string"
                          },
                          "surface": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "enum": [
                              "grass",
                              "synthetic",
                              "mixed",
                              "indoor"
                            ]
                          },
                          "opening_hours": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "weekday",
                                "opens",
                                "closes"
                              ],
                              "properties": {
                                "weekday": {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 7
                                },
                                "opens": {
                                  "type": "string",
                                  "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$|^24:00$"
                                },
                                "closes": {
                                  "type": "string",
                                  "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$|^24:00$"
                                }
                              },
                              "additionalProperties": false
                            }
                          }
                        }
                      }
                    },
                    "dayoffs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "from",
                          "to"
                        ],
                        "properties": {
                          "from": {
                            "type": "string",
                            "format": "date"
                          },
                          "to": {
                            "type": "string",
                            "format": "date"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/public/facilities/by-field/{fieldId}": {
      "get": {
        "tags": [
          "public",
          "facilities"
        ],
        "summary": "Scheda pubblica della struttura a cui appartiene un campo (dal dettaglio gara)",
        "security": [
          {
            "ApiKey": [
              "read:public.matches"
            ]
          }
        ],
        "x-tenant-scope": "public",
        "x-privacy-classification": "public",
        "x-rate-limit-tier": "public_widget",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "fieldId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Struttura",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "slug",
                    "name",
                    "city",
                    "address",
                    "geo_lat",
                    "geo_lng",
                    "services",
                    "field_count",
                    "phone",
                    "mobile",
                    "email",
                    "website",
                    "photos",
                    "fields",
                    "dayoffs"
                  ],
                  "properties": {
                    "slug": {
                      "type": "string",
                      "minLength": 2,
                      "maxLength": 64,
                      "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
                    },
                    "name": {
                      "type": "string"
                    },
                    "city": {
                      "type": "string"
                    },
                    "address": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "geo_lat": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "geo_lng": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "services": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "field_count": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "phone": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "mobile": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "email": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "website": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "photos": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "url",
                          "caption"
                        ],
                        "properties": {
                          "url": {
                            "type": "string",
                            "format": "uri",
                            "pattern": "^https?:\\/\\/"
                          },
                          "caption": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "maxLength": 200
                          }
                        }
                      }
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "field_id",
                          "label",
                          "surface",
                          "opening_hours"
                        ],
                        "properties": {
                          "field_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "label": {
                            "type": "string"
                          },
                          "surface": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "enum": [
                              "grass",
                              "synthetic",
                              "mixed",
                              "indoor"
                            ]
                          },
                          "opening_hours": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "weekday",
                                "opens",
                                "closes"
                              ],
                              "properties": {
                                "weekday": {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 7
                                },
                                "opens": {
                                  "type": "string",
                                  "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$|^24:00$"
                                },
                                "closes": {
                                  "type": "string",
                                  "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$|^24:00$"
                                }
                              },
                              "additionalProperties": false
                            }
                          }
                        }
                      }
                    },
                    "dayoffs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "from",
                          "to"
                        ],
                        "properties": {
                          "from": {
                            "type": "string",
                            "format": "date"
                          },
                          "to": {
                            "type": "string",
                            "format": "date"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/tournaments/{tournamentId}/profile": {
      "get": {
        "tags": [
          "admin",
          "tournament-settings"
        ],
        "summary": "Scheda completa del torneo (valori predefiniti se mai salvata)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Scheda del torneo",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "description",
                    "gender",
                    "team_preference",
                    "lineup_sheets_enabled",
                    "certificate_check",
                    "top_scorer_goal_limit",
                    "top_system",
                    "membership_managed",
                    "membership_deadline",
                    "costs",
                    "visibility",
                    "hidden",
                    "featured",
                    "sort_order",
                    "logo_media_id",
                    "logo_crop",
                    "category_ids",
                    "tournament_id",
                    "organization_id",
                    "duplicated_from",
                    "version",
                    "updated_at",
                    "updated_by"
                  ],
                  "properties": {
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "maxLength": 4000
                    },
                    "gender": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "male",
                        "female",
                        "mixed",
                        null
                      ]
                    },
                    "team_preference": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "day_and_field",
                        "day_only",
                        "field_only",
                        "none",
                        null
                      ]
                    },
                    "lineup_sheets_enabled": {
                      "type": "boolean"
                    },
                    "certificate_check": {
                      "type": "boolean"
                    },
                    "top_scorer_goal_limit": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 1,
                      "maximum": 20
                    },
                    "top_system": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "best_goalkeeper_and_player",
                        "role_ranking_and_mvp",
                        null
                      ]
                    },
                    "membership_managed": {
                      "type": "boolean"
                    },
                    "membership_deadline": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date"
                    },
                    "costs": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "registration_cents",
                        "deposit_cents",
                        "fields_whole_cents",
                        "field_per_match_cents",
                        "payment_deadline"
                      ],
                      "properties": {
                        "registration_cents": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "minimum": 0,
                          "maximum": 100000000
                        },
                        "deposit_cents": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "minimum": 0,
                          "maximum": 100000000
                        },
                        "fields_whole_cents": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "minimum": 0,
                          "maximum": 100000000
                        },
                        "field_per_match_cents": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "minimum": 0,
                          "maximum": 100000000
                        },
                        "payment_deadline": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date"
                        }
                      }
                    },
                    "visibility": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "show_calendar",
                        "show_standings"
                      ],
                      "properties": {
                        "show_calendar": {
                          "type": "boolean"
                        },
                        "show_standings": {
                          "type": "boolean"
                        }
                      }
                    },
                    "hidden": {
                      "type": "boolean"
                    },
                    "featured": {
                      "type": "boolean"
                    },
                    "sort_order": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0,
                      "maximum": 9999
                    },
                    "logo_media_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "logo_crop": {
                      "anyOf": [
                        {
                          "type": "object",
                          "additionalProperties": false,
                          "required": [
                            "x",
                            "y",
                            "width",
                            "height",
                            "source_width",
                            "source_height",
                            "output_width",
                            "output_height",
                            "version"
                          ],
                          "properties": {
                            "x": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "y": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "width": {
                              "type": "integer",
                              "minimum": 210
                            },
                            "height": {
                              "type": "integer",
                              "minimum": 210
                            },
                            "source_width": {
                              "type": "integer",
                              "minimum": 210,
                              "maximum": 8192
                            },
                            "source_height": {
                              "type": "integer",
                              "minimum": 210,
                              "maximum": 8192
                            },
                            "output_width": {
                              "type": "integer",
                              "enum": [
                                210
                              ]
                            },
                            "output_height": {
                              "type": "integer",
                              "enum": [
                                210
                              ]
                            },
                            "version": {
                              "type": "integer",
                              "minimum": 1
                            }
                          }
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "category_ids": {
                      "type": "array",
                      "maxItems": 20,
                      "items": {
                        "type": "string",
                        "format": "uuid"
                      }
                    },
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "organization_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "duplicated_from": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updated_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "updated_by": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "admin",
          "tournament-settings"
        ],
        "summary": "Salva la scheda completa del torneo (concorrenza su expected_version)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "description",
                  "gender",
                  "team_preference",
                  "lineup_sheets_enabled",
                  "certificate_check",
                  "top_scorer_goal_limit",
                  "top_system",
                  "membership_managed",
                  "membership_deadline",
                  "costs",
                  "visibility",
                  "hidden",
                  "featured",
                  "sort_order",
                  "logo_media_id",
                  "logo_crop",
                  "category_ids",
                  "expected_version"
                ],
                "properties": {
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 4000
                  },
                  "gender": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "male",
                      "female",
                      "mixed",
                      null
                    ]
                  },
                  "team_preference": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "day_and_field",
                      "day_only",
                      "field_only",
                      "none",
                      null
                    ]
                  },
                  "lineup_sheets_enabled": {
                    "type": "boolean"
                  },
                  "certificate_check": {
                    "type": "boolean"
                  },
                  "top_scorer_goal_limit": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1,
                    "maximum": 20
                  },
                  "top_system": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "best_goalkeeper_and_player",
                      "role_ranking_and_mvp",
                      null
                    ]
                  },
                  "membership_managed": {
                    "type": "boolean"
                  },
                  "membership_deadline": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date"
                  },
                  "costs": {
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                      "registration_cents",
                      "deposit_cents",
                      "fields_whole_cents",
                      "field_per_match_cents",
                      "payment_deadline"
                    ],
                    "properties": {
                      "registration_cents": {
                        "type": [
                          "integer",
                          "null"
                        ],
                        "minimum": 0,
                        "maximum": 100000000
                      },
                      "deposit_cents": {
                        "type": [
                          "integer",
                          "null"
                        ],
                        "minimum": 0,
                        "maximum": 100000000
                      },
                      "fields_whole_cents": {
                        "type": [
                          "integer",
                          "null"
                        ],
                        "minimum": 0,
                        "maximum": 100000000
                      },
                      "field_per_match_cents": {
                        "type": [
                          "integer",
                          "null"
                        ],
                        "minimum": 0,
                        "maximum": 100000000
                      },
                      "payment_deadline": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "date"
                      }
                    }
                  },
                  "visibility": {
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                      "show_calendar",
                      "show_standings"
                    ],
                    "properties": {
                      "show_calendar": {
                        "type": "boolean"
                      },
                      "show_standings": {
                        "type": "boolean"
                      }
                    }
                  },
                  "hidden": {
                    "type": "boolean"
                  },
                  "featured": {
                    "type": "boolean"
                  },
                  "sort_order": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 0,
                    "maximum": 9999
                  },
                  "logo_media_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "logo_crop": {
                    "anyOf": [
                      {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                          "x",
                          "y",
                          "width",
                          "height",
                          "source_width",
                          "source_height",
                          "output_width",
                          "output_height"
                        ],
                        "properties": {
                          "x": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "y": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "width": {
                            "type": "integer",
                            "minimum": 210
                          },
                          "height": {
                            "type": "integer",
                            "minimum": 210
                          },
                          "source_width": {
                            "type": "integer",
                            "minimum": 210,
                            "maximum": 8192
                          },
                          "source_height": {
                            "type": "integer",
                            "minimum": 210,
                            "maximum": 8192
                          },
                          "output_width": {
                            "type": "integer",
                            "enum": [
                              210
                            ]
                          },
                          "output_height": {
                            "type": "integer",
                            "enum": [
                              210
                            ]
                          }
                        }
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "category_ids": {
                    "type": "array",
                    "maxItems": 20,
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "expected_version": {
                    "type": "integer",
                    "minimum": 0
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Scheda salvata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "description",
                    "gender",
                    "team_preference",
                    "lineup_sheets_enabled",
                    "certificate_check",
                    "top_scorer_goal_limit",
                    "top_system",
                    "membership_managed",
                    "membership_deadline",
                    "costs",
                    "visibility",
                    "hidden",
                    "featured",
                    "sort_order",
                    "logo_media_id",
                    "logo_crop",
                    "category_ids",
                    "tournament_id",
                    "organization_id",
                    "duplicated_from",
                    "version",
                    "updated_at",
                    "updated_by"
                  ],
                  "properties": {
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "maxLength": 4000
                    },
                    "gender": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "male",
                        "female",
                        "mixed",
                        null
                      ]
                    },
                    "team_preference": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "day_and_field",
                        "day_only",
                        "field_only",
                        "none",
                        null
                      ]
                    },
                    "lineup_sheets_enabled": {
                      "type": "boolean"
                    },
                    "certificate_check": {
                      "type": "boolean"
                    },
                    "top_scorer_goal_limit": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 1,
                      "maximum": 20
                    },
                    "top_system": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "best_goalkeeper_and_player",
                        "role_ranking_and_mvp",
                        null
                      ]
                    },
                    "membership_managed": {
                      "type": "boolean"
                    },
                    "membership_deadline": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date"
                    },
                    "costs": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "registration_cents",
                        "deposit_cents",
                        "fields_whole_cents",
                        "field_per_match_cents",
                        "payment_deadline"
                      ],
                      "properties": {
                        "registration_cents": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "minimum": 0,
                          "maximum": 100000000
                        },
                        "deposit_cents": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "minimum": 0,
                          "maximum": 100000000
                        },
                        "fields_whole_cents": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "minimum": 0,
                          "maximum": 100000000
                        },
                        "field_per_match_cents": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "minimum": 0,
                          "maximum": 100000000
                        },
                        "payment_deadline": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date"
                        }
                      }
                    },
                    "visibility": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "show_calendar",
                        "show_standings"
                      ],
                      "properties": {
                        "show_calendar": {
                          "type": "boolean"
                        },
                        "show_standings": {
                          "type": "boolean"
                        }
                      }
                    },
                    "hidden": {
                      "type": "boolean"
                    },
                    "featured": {
                      "type": "boolean"
                    },
                    "sort_order": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0,
                      "maximum": 9999
                    },
                    "logo_media_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "logo_crop": {
                      "anyOf": [
                        {
                          "type": "object",
                          "additionalProperties": false,
                          "required": [
                            "x",
                            "y",
                            "width",
                            "height",
                            "source_width",
                            "source_height",
                            "output_width",
                            "output_height",
                            "version"
                          ],
                          "properties": {
                            "x": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "y": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "width": {
                              "type": "integer",
                              "minimum": 210
                            },
                            "height": {
                              "type": "integer",
                              "minimum": 210
                            },
                            "source_width": {
                              "type": "integer",
                              "minimum": 210,
                              "maximum": 8192
                            },
                            "source_height": {
                              "type": "integer",
                              "minimum": 210,
                              "maximum": 8192
                            },
                            "output_width": {
                              "type": "integer",
                              "enum": [
                                210
                              ]
                            },
                            "output_height": {
                              "type": "integer",
                              "enum": [
                                210
                              ]
                            },
                            "version": {
                              "type": "integer",
                              "minimum": 1
                            }
                          }
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "category_ids": {
                      "type": "array",
                      "maxItems": 20,
                      "items": {
                        "type": "string",
                        "format": "uuid"
                      }
                    },
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "organization_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "duplicated_from": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updated_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "updated_by": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/tournaments/{tournamentId}/pauses": {
      "get": {
        "tags": [
          "admin",
          "tournament-settings"
        ],
        "summary": "Pause del torneo, in ordine di data",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Pause",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "tournament_id",
                          "starts_on",
                          "ends_on",
                          "created_at",
                          "created_by"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "tournament_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "starts_on": {
                            "type": "string",
                            "format": "date"
                          },
                          "ends_on": {
                            "type": "string",
                            "format": "date"
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "created_by": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uuid"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "admin",
          "tournament-settings"
        ],
        "summary": "Aggiunge una pausa da lunedì a domenica (ripetibile: 200 se già presente)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "starts_on",
                  "ends_on"
                ],
                "properties": {
                  "starts_on": {
                    "type": "string",
                    "format": "date"
                  },
                  "ends_on": {
                    "type": "string",
                    "format": "date"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Pausa già presente",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "tournament_id",
                    "starts_on",
                    "ends_on",
                    "created_at",
                    "created_by"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "starts_on": {
                      "type": "string",
                      "format": "date"
                    },
                    "ends_on": {
                      "type": "string",
                      "format": "date"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "created_by": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "Pausa aggiunta",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "tournament_id",
                    "starts_on",
                    "ends_on",
                    "created_at",
                    "created_by"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "starts_on": {
                      "type": "string",
                      "format": "date"
                    },
                    "ends_on": {
                      "type": "string",
                      "format": "date"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "created_by": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/tournaments/{tournamentId}/pauses/{pauseId}": {
      "delete": {
        "tags": [
          "admin",
          "tournament-settings"
        ],
        "summary": "Elimina una pausa del torneo",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "pauseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Pausa eliminata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "tournament_id",
                    "starts_on",
                    "ends_on",
                    "created_at",
                    "created_by"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "starts_on": {
                      "type": "string",
                      "format": "date"
                    },
                    "ends_on": {
                      "type": "string",
                      "format": "date"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "created_by": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/tournament-duplicates": {
      "post": {
        "tags": [
          "admin",
          "tournament-settings"
        ],
        "summary": "Duplica configurazione, regola, scheda e fasi di un torneo, senza gare",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "source_tournament_id",
                  "label",
                  "slug",
                  "starts_on",
                  "ends_on"
                ],
                "properties": {
                  "source_tournament_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "slug": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 64
                  },
                  "season_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "starts_on": {
                    "type": "string",
                    "format": "date"
                  },
                  "ends_on": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Copia già creata con questo slug",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "tournament_id",
                    "slug",
                    "label",
                    "source_tournament_id",
                    "rule_copied",
                    "profile_copied",
                    "phases_copied",
                    "groups_copied"
                  ],
                  "properties": {
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "slug": {
                      "type": "string"
                    },
                    "label": {
                      "type": "string"
                    },
                    "source_tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "rule_copied": {
                      "type": "boolean"
                    },
                    "profile_copied": {
                      "type": "boolean"
                    },
                    "phases_copied": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "groups_copied": {
                      "type": "integer",
                      "minimum": 0
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "Torneo creato in bozza",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "tournament_id",
                    "slug",
                    "label",
                    "source_tournament_id",
                    "rule_copied",
                    "profile_copied",
                    "phases_copied",
                    "groups_copied"
                  ],
                  "properties": {
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "slug": {
                      "type": "string"
                    },
                    "label": {
                      "type": "string"
                    },
                    "source_tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "rule_copied": {
                      "type": "boolean"
                    },
                    "profile_copied": {
                      "type": "boolean"
                    },
                    "phases_copied": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "groups_copied": {
                      "type": "integer",
                      "minimum": 0
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/tournaments/{tournamentId}/lifecycle": {
      "delete": {
        "tags": [
          "admin",
          "tournament-settings"
        ],
        "summary": "Elimina il torneo senza gare, altrimenti lo archivia conservandone lo storico",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "expected_version",
                  "confirmation"
                ],
                "properties": {
                  "expected_version": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "confirmation": {
                    "type": "string",
                    "const": "ELIMINA"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Esito della rimozione",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "tournament_id",
                    "outcome",
                    "match_count",
                    "current_version"
                  ],
                  "properties": {
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "outcome": {
                      "type": "string",
                      "enum": [
                        "deleted",
                        "archived"
                      ]
                    },
                    "match_count": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "current_version": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 1
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/tournament-categories": {
      "get": {
        "tags": [
          "admin",
          "tournament-settings"
        ],
        "summary": "Categorie dei tornei attive, in ordine (paginate a cursore)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Pagina di categorie",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "next_cursor"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "name",
                          "sort_order",
                          "version",
                          "updated_at"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "name": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 80
                          },
                          "sort_order": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 1
                          },
                          "updated_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "admin",
          "tournament-settings"
        ],
        "summary": "Crea una categoria (ripetibile: 200 se esiste con lo stesso nome)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Categoria già esistente",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "name",
                    "sort_order",
                    "version",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 80
                    },
                    "sort_order": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "Categoria creata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "name",
                    "sort_order",
                    "version",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 80
                    },
                    "sort_order": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/tournament-categories/order": {
      "put": {
        "tags": [
          "admin",
          "tournament-settings"
        ],
        "summary": "Salva l'ordine di tutte le categorie attive",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "ids"
                ],
                "properties": {
                  "ids": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 200,
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Categorie nel nuovo ordine",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "next_cursor"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "name",
                          "sort_order",
                          "version",
                          "updated_at"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "name": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 80
                          },
                          "sort_order": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 1
                          },
                          "updated_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/tournament-categories/{categoryId}": {
      "patch": {
        "tags": [
          "admin",
          "tournament-settings"
        ],
        "summary": "Rinomina una categoria (concorrenza su expected_version)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "categoryId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "name",
                  "expected_version"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "expected_version": {
                    "type": "integer",
                    "minimum": 1
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Categoria rinominata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "name",
                    "sort_order",
                    "version",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 80
                    },
                    "sort_order": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "admin",
          "tournament-settings"
        ],
        "summary": "Archivia una categoria: sparisce da filtri e schede, i tornei restano",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "categoryId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Categoria archiviata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "name",
                    "sort_order",
                    "version",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 80
                    },
                    "sort_order": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/seasons/current": {
      "get": {
        "tags": [
          "admin",
          "tournament-settings"
        ],
        "summary": "Stagione corrente dell'organizzazione e stagioni selezionabili",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "organization_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Stagione corrente",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "organization_id",
                    "current_season_id",
                    "source",
                    "flagged_season_id",
                    "version",
                    "seasons"
                  ],
                  "properties": {
                    "organization_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "current_season_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "source": {
                      "type": "string",
                      "enum": [
                        "admin",
                        "calendar",
                        "latest",
                        "none"
                      ]
                    },
                    "flagged_season_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "seasons": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "slug",
                          "label",
                          "starts_on",
                          "ends_on",
                          "is_test",
                          "contains_today"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "slug": {
                            "type": "string"
                          },
                          "label": {
                            "type": "string"
                          },
                          "starts_on": {
                            "type": "string",
                            "format": "date"
                          },
                          "ends_on": {
                            "type": "string",
                            "format": "date"
                          },
                          "is_test": {
                            "type": "boolean"
                          },
                          "contains_today": {
                            "type": "boolean"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/seasons/{seasonId}/current": {
      "put": {
        "tags": [
          "admin",
          "tournament-settings"
        ],
        "summary": "Imposta la stagione come corrente (mai una stagione di prova)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "seasonId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "expected_version"
                ],
                "properties": {
                  "expected_version": {
                    "type": "integer",
                    "minimum": 0
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Stagione corrente",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "organization_id",
                    "current_season_id",
                    "source",
                    "flagged_season_id",
                    "version",
                    "seasons"
                  ],
                  "properties": {
                    "organization_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "current_season_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "source": {
                      "type": "string",
                      "enum": [
                        "admin",
                        "calendar",
                        "latest",
                        "none"
                      ]
                    },
                    "flagged_season_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "seasons": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "slug",
                          "label",
                          "starts_on",
                          "ends_on",
                          "is_test",
                          "contains_today"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "slug": {
                            "type": "string"
                          },
                          "label": {
                            "type": "string"
                          },
                          "starts_on": {
                            "type": "string",
                            "format": "date"
                          },
                          "ends_on": {
                            "type": "string",
                            "format": "date"
                          },
                          "is_test": {
                            "type": "boolean"
                          },
                          "contains_today": {
                            "type": "boolean"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "admin",
          "tournament-settings"
        ],
        "summary": "Toglie la scelta: torna la regola automatica di calendario",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "seasonId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "expected_version"
                ],
                "properties": {
                  "expected_version": {
                    "type": "integer",
                    "minimum": 0
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Stagione corrente",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "organization_id",
                    "current_season_id",
                    "source",
                    "flagged_season_id",
                    "version",
                    "seasons"
                  ],
                  "properties": {
                    "organization_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "current_season_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "source": {
                      "type": "string",
                      "enum": [
                        "admin",
                        "calendar",
                        "latest",
                        "none"
                      ]
                    },
                    "flagged_season_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "seasons": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "slug",
                          "label",
                          "starts_on",
                          "ends_on",
                          "is_test",
                          "contains_today"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "slug": {
                            "type": "string"
                          },
                          "label": {
                            "type": "string"
                          },
                          "starts_on": {
                            "type": "string",
                            "format": "date"
                          },
                          "ends_on": {
                            "type": "string",
                            "format": "date"
                          },
                          "is_test": {
                            "type": "boolean"
                          },
                          "contains_today": {
                            "type": "boolean"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/public/seasons/current": {
      "get": {
        "tags": [
          "public",
          "tournament-settings"
        ],
        "summary": "Stagione corrente dell'organizzazione e stagioni di prova da escludere",
        "security": [
          {
            "ApiKey": [
              "read:public.matches"
            ]
          }
        ],
        "x-tenant-scope": "public",
        "x-privacy-classification": "public",
        "x-rate-limit-tier": "public_widget",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "organization_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Stagione corrente",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "organization_id",
                    "season",
                    "source",
                    "test_season_ids"
                  ],
                  "properties": {
                    "organization_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "season": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "required": [
                        "id",
                        "slug",
                        "label"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "slug": {
                          "type": "string"
                        },
                        "label": {
                          "type": "string"
                        }
                      }
                    },
                    "source": {
                      "type": "string",
                      "enum": [
                        "admin",
                        "calendar",
                        "latest",
                        "none"
                      ]
                    },
                    "test_season_ids": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "format": "uuid"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/public/tournament-profiles": {
      "get": {
        "tags": [
          "public",
          "tournament-settings"
        ],
        "summary": "Schede pubbliche dei tornei pubblicati richiesti (al massimo 100 id)",
        "security": [
          {
            "ApiKey": [
              "read:public.matches"
            ]
          }
        ],
        "x-tenant-scope": "public",
        "x-privacy-classification": "public",
        "x-rate-limit-tier": "public_widget",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "ids",
            "in": "query",
            "required": true,
            "description": "Id dei tornei separati da virgola",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Schede pubbliche",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "tournament_id",
                          "description",
                          "gender",
                          "category_ids",
                          "featured",
                          "sort_order",
                          "hidden",
                          "visibility",
                          "logo_media_id",
                          "logo_crop"
                        ],
                        "properties": {
                          "tournament_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "description": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "gender": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "enum": [
                              "male",
                              "female",
                              "mixed",
                              null
                            ]
                          },
                          "category_ids": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "format": "uuid"
                            }
                          },
                          "featured": {
                            "type": "boolean"
                          },
                          "sort_order": {
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "hidden": {
                            "type": "boolean"
                          },
                          "visibility": {
                            "type": "object",
                            "additionalProperties": false,
                            "required": [
                              "show_calendar",
                              "show_standings"
                            ],
                            "properties": {
                              "show_calendar": {
                                "type": "boolean"
                              },
                              "show_standings": {
                                "type": "boolean"
                              }
                            }
                          },
                          "logo_media_id": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uuid"
                          },
                          "logo_crop": {
                            "anyOf": [
                              {
                                "type": "object",
                                "additionalProperties": false,
                                "required": [
                                  "x",
                                  "y",
                                  "width",
                                  "height",
                                  "source_width",
                                  "source_height",
                                  "output_width",
                                  "output_height",
                                  "version"
                                ],
                                "properties": {
                                  "x": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "y": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "width": {
                                    "type": "integer",
                                    "minimum": 210
                                  },
                                  "height": {
                                    "type": "integer",
                                    "minimum": 210
                                  },
                                  "source_width": {
                                    "type": "integer",
                                    "minimum": 210,
                                    "maximum": 8192
                                  },
                                  "source_height": {
                                    "type": "integer",
                                    "minimum": 210,
                                    "maximum": 8192
                                  },
                                  "output_width": {
                                    "type": "integer",
                                    "enum": [
                                      210
                                    ]
                                  },
                                  "output_height": {
                                    "type": "integer",
                                    "enum": [
                                      210
                                    ]
                                  },
                                  "version": {
                                    "type": "integer",
                                    "minimum": 1
                                  }
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/public/tournament-categories": {
      "get": {
        "tags": [
          "public",
          "tournament-settings"
        ],
        "summary": "Categorie dei tornei attive, in ordine (paginate a cursore)",
        "security": [
          {
            "ApiKey": [
              "read:public.matches"
            ]
          }
        ],
        "x-tenant-scope": "public",
        "x-privacy-classification": "public",
        "x-rate-limit-tier": "public_widget",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Pagina di categorie",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "next_cursor"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "name",
                          "sort_order"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "name": {
                            "type": "string"
                          },
                          "sort_order": {
                            "type": "integer",
                            "minimum": 0
                          }
                        }
                      }
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/tournaments/{tournamentId}/discipline-policy": {
      "get": {
        "tags": [
          "admin",
          "discipline-policy"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "summary": "Politica delle diffide del torneo (salvata e in vigore)",
        "x-privacy-classification": "tenant_internal",
        "x-audit-required": false,
        "responses": {
          "200": {
            "description": "Politica disciplinare",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "tournament_id",
                    "stored",
                    "effective",
                    "effective_source",
                    "version"
                  ],
                  "properties": {
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "stored": {
                      "anyOf": [
                        {
                          "type": "object",
                          "required": [
                            "tournament_id",
                            "kind",
                            "threshold",
                            "import_tournament_ids",
                            "version",
                            "updated_at",
                            "updated_by"
                          ],
                          "properties": {
                            "tournament_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "kind": {
                              "type": "string",
                              "enum": [
                                "fixed",
                                "scalar"
                              ]
                            },
                            "threshold": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 20
                            },
                            "import_tournament_ids": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "maxItems": 10,
                              "uniqueItems": true
                            },
                            "version": {
                              "type": "integer",
                              "minimum": 1
                            },
                            "updated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "updated_by": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          }
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "effective": {
                      "anyOf": [
                        {
                          "type": "object",
                          "required": [
                            "kind",
                            "threshold",
                            "import_tournament_ids"
                          ],
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "fixed",
                                "scalar"
                              ]
                            },
                            "threshold": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 20
                            },
                            "import_tournament_ids": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "maxItems": 10,
                              "uniqueItems": true
                            }
                          }
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "effective_source": {
                      "type": "string",
                      "enum": [
                        "tournament",
                        "rule_profile",
                        "none"
                      ]
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "admin",
          "discipline-policy"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "summary": "Salva una revisione della politica (conferma dell'anteprima: versione attesa e impronta)",
        "x-privacy-classification": "tenant_internal",
        "x-audit-required": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "kind",
                  "threshold",
                  "import_tournament_ids",
                  "expected_version",
                  "preview_token"
                ],
                "additionalProperties": false,
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "fixed",
                      "scalar"
                    ]
                  },
                  "threshold": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 20
                  },
                  "import_tournament_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "maxItems": 10,
                    "uniqueItems": true
                  },
                  "expected_version": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "preview_token": {
                    "type": "string",
                    "pattern": "^[0-9a-f]{64}$"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Politica salvata (o già uguale)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "tournament_id",
                    "stored",
                    "effective",
                    "effective_source",
                    "version"
                  ],
                  "properties": {
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "stored": {
                      "anyOf": [
                        {
                          "type": "object",
                          "required": [
                            "tournament_id",
                            "kind",
                            "threshold",
                            "import_tournament_ids",
                            "version",
                            "updated_at",
                            "updated_by"
                          ],
                          "properties": {
                            "tournament_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "kind": {
                              "type": "string",
                              "enum": [
                                "fixed",
                                "scalar"
                              ]
                            },
                            "threshold": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 20
                            },
                            "import_tournament_ids": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "maxItems": 10,
                              "uniqueItems": true
                            },
                            "version": {
                              "type": "integer",
                              "minimum": 1
                            },
                            "updated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "updated_by": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          }
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "effective": {
                      "anyOf": [
                        {
                          "type": "object",
                          "required": [
                            "kind",
                            "threshold",
                            "import_tournament_ids"
                          ],
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "fixed",
                                "scalar"
                              ]
                            },
                            "threshold": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 20
                            },
                            "import_tournament_ids": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "maxItems": 10,
                              "uniqueItems": true
                            }
                          }
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "effective_source": {
                      "type": "string",
                      "enum": [
                        "tournament",
                        "rule_profile",
                        "none"
                      ]
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/tournaments/{tournamentId}/discipline-policy/preview": {
      "post": {
        "tags": [
          "admin",
          "discipline-policy"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "summary": "Anteprima degli effetti di una politica sulle sanzioni già attribuite",
        "x-privacy-classification": "pii",
        "x-audit-required": false,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "kind",
                  "threshold",
                  "import_tournament_ids"
                ],
                "additionalProperties": false,
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "fixed",
                      "scalar"
                    ]
                  },
                  "threshold": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 20
                  },
                  "import_tournament_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "maxItems": 10,
                    "uniqueItems": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Effetti della politica proposta",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "tournament_id",
                    "base_version",
                    "current",
                    "candidate",
                    "changes",
                    "summary",
                    "preview_token"
                  ],
                  "properties": {
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "base_version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "current": {
                      "anyOf": [
                        {
                          "type": "object",
                          "required": [
                            "kind",
                            "threshold",
                            "import_tournament_ids"
                          ],
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "fixed",
                                "scalar"
                              ]
                            },
                            "threshold": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 20
                            },
                            "import_tournament_ids": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "maxItems": 10,
                              "uniqueItems": true
                            }
                          }
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "candidate": {
                      "type": "object",
                      "required": [
                        "kind",
                        "threshold",
                        "import_tournament_ids"
                      ],
                      "additionalProperties": false,
                      "properties": {
                        "kind": {
                          "type": "string",
                          "enum": [
                            "fixed",
                            "scalar"
                          ]
                        },
                        "threshold": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 20
                        },
                        "import_tournament_ids": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "maxItems": 10,
                          "uniqueItems": true
                        }
                      }
                    },
                    "changes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "player_id",
                          "player_name",
                          "team_id",
                          "team_name",
                          "before",
                          "after"
                        ],
                        "properties": {
                          "player_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "player_name": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "team_id": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "team_name": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "before": {
                            "anyOf": [
                              {
                                "type": "object",
                                "required": [
                                  "accumulated_yellows",
                                  "diffida",
                                  "suspensions_imposed",
                                  "served_suspensions",
                                  "pending_suspension_matches"
                                ],
                                "properties": {
                                  "accumulated_yellows": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "diffida": {
                                    "type": "boolean"
                                  },
                                  "suspensions_imposed": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "served_suspensions": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "pending_suspension_matches": {
                                    "type": "integer",
                                    "minimum": 0
                                  }
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "after": {
                            "anyOf": [
                              {
                                "type": "object",
                                "required": [
                                  "accumulated_yellows",
                                  "diffida",
                                  "suspensions_imposed",
                                  "served_suspensions",
                                  "pending_suspension_matches"
                                ],
                                "properties": {
                                  "accumulated_yellows": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "diffida": {
                                    "type": "boolean"
                                  },
                                  "suspensions_imposed": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "served_suspensions": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "pending_suspension_matches": {
                                    "type": "integer",
                                    "minimum": 0
                                  }
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        }
                      }
                    },
                    "summary": {
                      "type": "object",
                      "required": [
                        "players_changed",
                        "suspended_before",
                        "suspended_after",
                        "diffidati_before",
                        "diffidati_after"
                      ],
                      "properties": {
                        "players_changed": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "suspended_before": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "suspended_after": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "diffidati_before": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "diffidati_after": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    },
                    "preview_token": {
                      "type": "string",
                      "pattern": "^[0-9a-f]{64}$"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/public/tournaments/{tournamentId}/discipline": {
      "get": {
        "tags": [
          "public",
          "discipline-policy"
        ],
        "summary": "Disciplinare del torneo: squalificati, diffidati e ammonizioni numerate",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "group_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "public",
        "x-rate-limit-tier": "public_widget",
        "x-audit-required": false,
        "responses": {
          "200": {
            "description": "Disciplinare pubblico",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "tournament_id",
                    "group_id",
                    "computed",
                    "policy",
                    "coverage",
                    "suspensions",
                    "warnings",
                    "bookings",
                    "withheld_for_protection"
                  ],
                  "properties": {
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "group_id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "computed": {
                      "type": "boolean"
                    },
                    "policy": {
                      "anyOf": [
                        {
                          "type": "object",
                          "required": [
                            "kind",
                            "threshold",
                            "source"
                          ],
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "fixed",
                                "scalar"
                              ]
                            },
                            "threshold": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 20
                            },
                            "source": {
                              "type": "string",
                              "enum": [
                                "tournament",
                                "rule_profile"
                              ]
                            }
                          }
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "coverage": {
                      "type": "object",
                      "required": [
                        "counted_matches",
                        "matches_without_player_facts"
                      ],
                      "properties": {
                        "counted_matches": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "matches_without_player_facts": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    },
                    "suspensions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "player",
                          "team_id",
                          "team_name",
                          "cause",
                          "imposed_in",
                          "matches",
                          "served",
                          "cleared_matches",
                          "remaining_matches"
                        ],
                        "properties": {
                          "player": {
                            "$ref": "#/components/schemas/PublicPlayer"
                          },
                          "team_id": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "team_name": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "cause": {
                            "type": "string",
                            "enum": [
                              "yellow_accumulation",
                              "second_yellow",
                              "red_card",
                              "committee",
                              "carried_over"
                            ]
                          },
                          "imposed_in": {
                            "anyOf": [
                              {
                                "type": "object",
                                "required": [
                                  "match_id",
                                  "day",
                                  "round_label"
                                ],
                                "properties": {
                                  "match_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "day": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "format": "date"
                                  },
                                  "round_label": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  }
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "matches": {
                            "type": "integer",
                            "minimum": 1
                          },
                          "served": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "match_id",
                                "day",
                                "round_label"
                              ],
                              "properties": {
                                "match_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "day": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "format": "date"
                                },
                                "round_label": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                }
                              }
                            }
                          },
                          "served_rest_days": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "day",
                                "round_label"
                              ],
                              "properties": {
                                "day": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "format": "date"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "round_label": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              }
                            }
                          },
                          "cleared_matches": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "remaining_matches": {
                            "type": "integer",
                            "minimum": 0
                          }
                        }
                      }
                    },
                    "warnings": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "player",
                          "team_id",
                          "team_name",
                          "accumulated_yellows",
                          "yellows_to_suspension"
                        ],
                        "properties": {
                          "player": {
                            "$ref": "#/components/schemas/PublicPlayer"
                          },
                          "team_id": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "team_name": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "accumulated_yellows": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "yellows_to_suspension": {
                            "type": "integer",
                            "minimum": 0
                          }
                        }
                      }
                    },
                    "bookings": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "player",
                          "team_id",
                          "team_name",
                          "yellow_cards",
                          "second_yellows",
                          "red_cards"
                        ],
                        "properties": {
                          "player": {
                            "$ref": "#/components/schemas/PublicPlayer"
                          },
                          "team_id": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "team_name": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "yellow_cards": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "ordinal",
                                "fixture"
                              ],
                              "properties": {
                                "ordinal": {
                                  "type": "integer",
                                  "minimum": 1
                                },
                                "fixture": {
                                  "type": "object",
                                  "required": [
                                    "match_id",
                                    "day",
                                    "round_label"
                                  ],
                                  "properties": {
                                    "match_id": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "day": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "format": "date"
                                    },
                                    "round_label": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    }
                                  }
                                }
                              }
                            }
                          },
                          "second_yellows": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "red_cards": {
                            "type": "integer",
                            "minimum": 0
                          }
                        }
                      }
                    },
                    "archive": {
                      "type": "object",
                      "required": [
                        "available",
                        "unavailable_reason",
                        "total",
                        "items",
                        "next_cursor",
                        "source"
                      ],
                      "properties": {
                        "available": {
                          "type": "boolean"
                        },
                        "unavailable_reason": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "enum": [
                            "archive_not_available",
                            "archive_totals_not_per_group",
                            null
                          ]
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "rank",
                              "registration_id",
                              "display_name",
                              "team_id",
                              "yellow_cards",
                              "red_cards",
                              "appearances"
                            ],
                            "properties": {
                              "rank": {
                                "type": "integer",
                                "minimum": 1
                              },
                              "registration_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "display_name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "team_id": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "yellow_cards": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "red_cards": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "appearances": {
                                "type": "integer",
                                "minimum": 0
                              }
                            }
                          }
                        },
                        "next_cursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "source": {
                          "type": "object",
                          "required": [
                            "kind",
                            "basis",
                            "captured_at",
                            "revision"
                          ],
                          "properties": {
                            "kind": {
                              "type": "string",
                              "const": "archive_registration_totals"
                            },
                            "basis": {
                              "type": "string",
                              "const": "public_match_page_icons"
                            },
                            "captured_at": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "date-time"
                            },
                            "revision": {
                              "type": [
                                "integer",
                                "null"
                              ],
                              "minimum": 1
                            }
                          }
                        }
                      }
                    },
                    "withheld_for_protection": {
                      "type": "integer",
                      "minimum": 0
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/public/tournaments/{tournamentId}/player-stats": {
      "get": {
        "tags": [
          "public",
          "tournament-stats"
        ],
        "summary": "Classifiche giocatori del torneo (marcatori, migliori, disciplina, fair play) con la fonte di ogni numero",
        "security": [
          {
            "ApiKey": [
              "read:public.players"
            ]
          }
        ],
        "x-tenant-scope": "public",
        "x-privacy-classification": "public",
        "x-rate-limit-tier": "public_widget",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "score",
                "top-player",
                "top-goalkeeper",
                "role",
                "mvp",
                "discipline",
                "fairplay"
              ]
            },
            "description": "Classifica; predefinita score."
          },
          {
            "name": "source",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "lc8",
                "archive"
              ]
            },
            "description": "Referti LC8 o archivio storico."
          },
          {
            "name": "group",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Id di girone separati da virgola (fase = i suoi gironi)."
          },
          {
            "name": "role",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "GK",
                "DEF",
                "MID",
                "FWD"
              ]
            },
            "description": "Solo per type=role."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Classifica",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "tournament_id",
                    "type",
                    "origin",
                    "group_ids",
                    "role",
                    "available",
                    "unavailable_reason",
                    "settings",
                    "sources",
                    "minors_excluded",
                    "total",
                    "items",
                    "teams",
                    "next_cursor",
                    "generated_at"
                  ],
                  "properties": {
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "score",
                        "top-player",
                        "top-goalkeeper",
                        "role",
                        "mvp",
                        "discipline",
                        "fairplay"
                      ]
                    },
                    "origin": {
                      "type": "string",
                      "enum": [
                        "lc8",
                        "archive"
                      ]
                    },
                    "group_ids": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "format": "uuid"
                      }
                    },
                    "role": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "GK",
                        "DEF",
                        "MID",
                        "FWD",
                        null
                      ]
                    },
                    "available": {
                      "type": "boolean"
                    },
                    "unavailable_reason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "type_not_in_top_system",
                        "archive_has_no_ratings",
                        "archive_totals_not_per_group",
                        "archive_has_no_fines",
                        "archive_not_available",
                        null
                      ]
                    },
                    "settings": {
                      "type": "object",
                      "required": [
                        "top_scorer_goal_limit",
                        "goal_limit_applied",
                        "top_system",
                        "top_system_is_default",
                        "available_types"
                      ],
                      "properties": {
                        "top_scorer_goal_limit": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "minimum": 1
                        },
                        "goal_limit_applied": {
                          "type": "boolean"
                        },
                        "top_system": {
                          "type": "string",
                          "enum": [
                            "best_goalkeeper_and_player",
                            "role_ranking_and_mvp"
                          ]
                        },
                        "top_system_is_default": {
                          "type": "boolean"
                        },
                        "available_types": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "score",
                              "top-player",
                              "top-goalkeeper",
                              "role",
                              "mvp",
                              "discipline",
                              "fairplay"
                            ]
                          }
                        }
                      }
                    },
                    "sources": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "kind",
                          "basis",
                          "captured_at",
                          "revision",
                          "label_mapping"
                        ],
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "lc8_reports",
                              "archive_registration_totals",
                              "archive_match_events"
                            ]
                          },
                          "basis": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "captured_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          },
                          "revision": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "minimum": 1
                          },
                          "label_mapping": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "additionalProperties": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    },
                    "minors_excluded": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "total": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "rank",
                          "subject",
                          "team_id",
                          "role",
                          "goals",
                          "goals_uncapped",
                          "manual_goals",
                          "yellow_cards",
                          "red_cards",
                          "appearances",
                          "mvp_awards",
                          "average_rating",
                          "rating_count",
                          "source"
                        ],
                        "properties": {
                          "rank": {
                            "type": "integer",
                            "minimum": 1
                          },
                          "subject": {
                            "oneOf": [
                              {
                                "type": "object",
                                "required": [
                                  "kind",
                                  "player_id",
                                  "slug",
                                  "sport_name"
                                ],
                                "properties": {
                                  "kind": {
                                    "const": "player"
                                  },
                                  "player_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "slug": {
                                    "type": "string"
                                  },
                                  "sport_name": {
                                    "type": "string"
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "required": [
                                  "kind",
                                  "registration_id",
                                  "display_name"
                                ],
                                "properties": {
                                  "kind": {
                                    "const": "archive_registration"
                                  },
                                  "registration_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "display_name": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  }
                                }
                              }
                            ]
                          },
                          "team_id": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uuid"
                          },
                          "role": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "enum": [
                              "GK",
                              "DEF",
                              "MID",
                              "FWD",
                              null
                            ]
                          },
                          "goals": {
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "goals_uncapped": {
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "manual_goals": {
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "yellow_cards": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "minimum": 0
                          },
                          "red_cards": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "minimum": 0
                          },
                          "appearances": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "minimum": 0
                          },
                          "mvp_awards": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "minimum": 0
                          },
                          "average_rating": {
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "rating_count": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "minimum": 0
                          },
                          "source": {
                            "type": "string",
                            "enum": [
                              "lc8_reports",
                              "archive_registration_totals",
                              "archive_match_events"
                            ]
                          }
                        }
                      }
                    },
                    "teams": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "rank",
                          "team_id",
                          "display_name",
                          "fairplay_points",
                          "fines_count",
                          "yellow_cards",
                          "red_cards",
                          "source"
                        ],
                        "properties": {
                          "rank": {
                            "type": "integer",
                            "minimum": 1
                          },
                          "team_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "display_name": {
                            "type": "string"
                          },
                          "fairplay_points": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "fines_count": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "yellow_cards": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "red_cards": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "source": {
                            "type": "string",
                            "enum": [
                              "lc8_reports",
                              "archive_registration_totals",
                              "archive_match_events"
                            ]
                          }
                        }
                      }
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "generated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/public/tournaments/{tournamentId}/awards": {
      "get": {
        "tags": [
          "public",
          "tournament-stats"
        ],
        "summary": "Riconoscimenti confermati del torneo (i minori non sono nominati)",
        "security": [
          {
            "ApiKey": [
              "read:public.players"
            ]
          }
        ],
        "x-tenant-scope": "public",
        "x-privacy-classification": "public",
        "x-rate-limit-tier": "public_widget",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Riconoscimenti",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "tournament_id",
                    "items"
                  ],
                  "properties": {
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "category",
                          "player",
                          "team_id",
                          "confirmed_at"
                        ],
                        "properties": {
                          "category": {
                            "type": "string",
                            "enum": [
                              "best_player",
                              "best_goalkeeper",
                              "top_scorer"
                            ]
                          },
                          "player": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "required": [
                              "player_id",
                              "slug",
                              "sport_name"
                            ],
                            "properties": {
                              "player_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "slug": {
                                "type": "string"
                              },
                              "sport_name": {
                                "type": "string"
                              }
                            }
                          },
                          "team_id": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uuid"
                          },
                          "confirmed_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/tournaments/{tournamentId}/awards": {
      "get": {
        "tags": [
          "admin",
          "tournament-stats"
        ],
        "summary": "Riconoscimenti del torneo in ogni stato, con i suggerimenti calcolati",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Riconoscimenti",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "tournament_id",
                    "items",
                    "suggestions"
                  ],
                  "properties": {
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "tournament_id",
                          "category",
                          "player_id",
                          "player_name",
                          "team_id",
                          "note",
                          "status",
                          "proposed_at",
                          "proposed_by",
                          "confirmed_at",
                          "confirmed_by",
                          "revoked_at",
                          "revoked_by",
                          "revoke_reason",
                          "version"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "tournament_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "category": {
                            "type": "string",
                            "enum": [
                              "best_player",
                              "best_goalkeeper",
                              "top_scorer"
                            ]
                          },
                          "player_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "player_name": {
                            "type": "string"
                          },
                          "team_id": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uuid"
                          },
                          "note": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "proposed",
                              "confirmed",
                              "revoked"
                            ]
                          },
                          "proposed_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "proposed_by": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uuid"
                          },
                          "confirmed_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          },
                          "confirmed_by": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uuid"
                          },
                          "revoked_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          },
                          "revoked_by": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uuid"
                          },
                          "revoke_reason": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 1
                          }
                        }
                      }
                    },
                    "suggestions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "category",
                          "player_id",
                          "player_name",
                          "team_id",
                          "value"
                        ],
                        "properties": {
                          "category": {
                            "type": "string",
                            "enum": [
                              "best_player",
                              "best_goalkeeper",
                              "top_scorer"
                            ]
                          },
                          "player_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "player_name": {
                            "type": "string"
                          },
                          "team_id": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uuid"
                          },
                          "value": {
                            "type": "number"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "admin",
          "tournament-stats"
        ],
        "summary": "Propone il premiato di una categoria (non pubblico fino alla conferma)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "category",
                  "player_id",
                  "note",
                  "expected_version"
                ],
                "properties": {
                  "category": {
                    "type": "string",
                    "enum": [
                      "best_player",
                      "best_goalkeeper",
                      "top_scorer"
                    ]
                  },
                  "player_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "note": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 500
                  },
                  "expected_version": {
                    "type": "integer",
                    "minimum": 0
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Proposta salvata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "tournament_id",
                    "items",
                    "suggestions"
                  ],
                  "properties": {
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "tournament_id",
                          "category",
                          "player_id",
                          "player_name",
                          "team_id",
                          "note",
                          "status",
                          "proposed_at",
                          "proposed_by",
                          "confirmed_at",
                          "confirmed_by",
                          "revoked_at",
                          "revoked_by",
                          "revoke_reason",
                          "version"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "tournament_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "category": {
                            "type": "string",
                            "enum": [
                              "best_player",
                              "best_goalkeeper",
                              "top_scorer"
                            ]
                          },
                          "player_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "player_name": {
                            "type": "string"
                          },
                          "team_id": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uuid"
                          },
                          "note": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "proposed",
                              "confirmed",
                              "revoked"
                            ]
                          },
                          "proposed_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "proposed_by": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uuid"
                          },
                          "confirmed_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          },
                          "confirmed_by": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uuid"
                          },
                          "revoked_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          },
                          "revoked_by": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uuid"
                          },
                          "revoke_reason": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 1
                          }
                        }
                      }
                    },
                    "suggestions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "category",
                          "player_id",
                          "player_name",
                          "team_id",
                          "value"
                        ],
                        "properties": {
                          "category": {
                            "type": "string",
                            "enum": [
                              "best_player",
                              "best_goalkeeper",
                              "top_scorer"
                            ]
                          },
                          "player_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "player_name": {
                            "type": "string"
                          },
                          "team_id": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uuid"
                          },
                          "value": {
                            "type": "number"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/tournaments/{tournamentId}/awards/confirm": {
      "post": {
        "tags": [
          "admin",
          "tournament-stats"
        ],
        "summary": "Conferma e pubblica il riconoscimento proposto",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "category",
                  "expected_version"
                ],
                "properties": {
                  "category": {
                    "type": "string",
                    "enum": [
                      "best_player",
                      "best_goalkeeper",
                      "top_scorer"
                    ]
                  },
                  "expected_version": {
                    "type": "integer",
                    "minimum": 1
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Riconoscimento confermato",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "tournament_id",
                    "items",
                    "suggestions"
                  ],
                  "properties": {
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "tournament_id",
                          "category",
                          "player_id",
                          "player_name",
                          "team_id",
                          "note",
                          "status",
                          "proposed_at",
                          "proposed_by",
                          "confirmed_at",
                          "confirmed_by",
                          "revoked_at",
                          "revoked_by",
                          "revoke_reason",
                          "version"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "tournament_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "category": {
                            "type": "string",
                            "enum": [
                              "best_player",
                              "best_goalkeeper",
                              "top_scorer"
                            ]
                          },
                          "player_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "player_name": {
                            "type": "string"
                          },
                          "team_id": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uuid"
                          },
                          "note": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "proposed",
                              "confirmed",
                              "revoked"
                            ]
                          },
                          "proposed_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "proposed_by": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uuid"
                          },
                          "confirmed_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          },
                          "confirmed_by": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uuid"
                          },
                          "revoked_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          },
                          "revoked_by": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uuid"
                          },
                          "revoke_reason": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 1
                          }
                        }
                      }
                    },
                    "suggestions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "category",
                          "player_id",
                          "player_name",
                          "team_id",
                          "value"
                        ],
                        "properties": {
                          "category": {
                            "type": "string",
                            "enum": [
                              "best_player",
                              "best_goalkeeper",
                              "top_scorer"
                            ]
                          },
                          "player_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "player_name": {
                            "type": "string"
                          },
                          "team_id": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uuid"
                          },
                          "value": {
                            "type": "number"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/tournaments/{tournamentId}/awards/revoke": {
      "post": {
        "tags": [
          "admin",
          "tournament-stats"
        ],
        "summary": "Revoca un riconoscimento (proposto o confermato), con motivo",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "category",
                  "expected_version",
                  "reason"
                ],
                "properties": {
                  "category": {
                    "type": "string",
                    "enum": [
                      "best_player",
                      "best_goalkeeper",
                      "top_scorer"
                    ]
                  },
                  "expected_version": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 500
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Riconoscimento revocato",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "tournament_id",
                    "items",
                    "suggestions"
                  ],
                  "properties": {
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "tournament_id",
                          "category",
                          "player_id",
                          "player_name",
                          "team_id",
                          "note",
                          "status",
                          "proposed_at",
                          "proposed_by",
                          "confirmed_at",
                          "confirmed_by",
                          "revoked_at",
                          "revoked_by",
                          "revoke_reason",
                          "version"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "tournament_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "category": {
                            "type": "string",
                            "enum": [
                              "best_player",
                              "best_goalkeeper",
                              "top_scorer"
                            ]
                          },
                          "player_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "player_name": {
                            "type": "string"
                          },
                          "team_id": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uuid"
                          },
                          "note": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "proposed",
                              "confirmed",
                              "revoked"
                            ]
                          },
                          "proposed_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "proposed_by": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uuid"
                          },
                          "confirmed_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          },
                          "confirmed_by": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uuid"
                          },
                          "revoked_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          },
                          "revoked_by": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uuid"
                          },
                          "revoke_reason": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 1
                          }
                        }
                      }
                    },
                    "suggestions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "category",
                          "player_id",
                          "player_name",
                          "team_id",
                          "value"
                        ],
                        "properties": {
                          "category": {
                            "type": "string",
                            "enum": [
                              "best_player",
                              "best_goalkeeper",
                              "top_scorer"
                            ]
                          },
                          "player_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "player_name": {
                            "type": "string"
                          },
                          "team_id": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uuid"
                          },
                          "value": {
                            "type": "number"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/tournaments/{tournamentId}/stat-adjustments": {
      "get": {
        "tags": [
          "admin",
          "tournament-stats"
        ],
        "summary": "Gol manuali del torneo, i più recenti per primi",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gol manuali",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "next_cursor"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "tournament_id",
                          "player_id",
                          "player_name",
                          "group_id",
                          "goals",
                          "reason",
                          "status",
                          "created_at",
                          "created_by",
                          "voided_at",
                          "voided_by",
                          "void_reason",
                          "version"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "tournament_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "player_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "player_name": {
                            "type": "string"
                          },
                          "group_id": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uuid"
                          },
                          "goals": {
                            "type": "integer"
                          },
                          "reason": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "active",
                              "voided"
                            ]
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "created_by": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uuid"
                          },
                          "voided_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          },
                          "voided_by": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uuid"
                          },
                          "void_reason": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 1
                          }
                        }
                      }
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "admin",
          "tournament-stats"
        ],
        "summary": "Aggiunge o toglie gol a un giocatore del torneo (correzione statistica)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "request_id",
                  "player_id",
                  "group_id",
                  "goals",
                  "reason"
                ],
                "properties": {
                  "request_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "player_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "group_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "goals": {
                    "type": "integer",
                    "minimum": -20,
                    "maximum": 20,
                    "not": {
                      "const": 0
                    }
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 500
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Stessa richiesta già registrata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "tournament_id",
                    "player_id",
                    "player_name",
                    "group_id",
                    "goals",
                    "reason",
                    "status",
                    "created_at",
                    "created_by",
                    "voided_at",
                    "voided_by",
                    "void_reason",
                    "version"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "player_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "player_name": {
                      "type": "string"
                    },
                    "group_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "goals": {
                      "type": "integer"
                    },
                    "reason": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "active",
                        "voided"
                      ]
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "created_by": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "voided_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "voided_by": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "void_reason": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 1
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "Gol manuale registrato",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "tournament_id",
                    "player_id",
                    "player_name",
                    "group_id",
                    "goals",
                    "reason",
                    "status",
                    "created_at",
                    "created_by",
                    "voided_at",
                    "voided_by",
                    "void_reason",
                    "version"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "player_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "player_name": {
                      "type": "string"
                    },
                    "group_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "goals": {
                      "type": "integer"
                    },
                    "reason": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "active",
                        "voided"
                      ]
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "created_by": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "voided_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "voided_by": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "void_reason": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 1
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/tournaments/{tournamentId}/stat-adjustments/void": {
      "post": {
        "tags": [
          "admin",
          "tournament-stats"
        ],
        "summary": "Annulla un gol manuale (resta nello storico con il motivo)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "adjustment_id",
                  "expected_version",
                  "reason"
                ],
                "properties": {
                  "adjustment_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "expected_version": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 500
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gol manuale annullato",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "tournament_id",
                    "player_id",
                    "player_name",
                    "group_id",
                    "goals",
                    "reason",
                    "status",
                    "created_at",
                    "created_by",
                    "voided_at",
                    "voided_by",
                    "void_reason",
                    "version"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "player_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "player_name": {
                      "type": "string"
                    },
                    "group_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "goals": {
                      "type": "integer"
                    },
                    "reason": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "active",
                        "voided"
                      ]
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "created_by": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "voided_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "voided_by": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "void_reason": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 1
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/tournaments/{tournamentId}/stat-players": {
      "get": {
        "tags": [
          "admin",
          "tournament-stats"
        ],
        "summary": "Giocatori iscritti al torneo, per nome (almeno 3 lettere)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 3
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Giocatori",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "next_cursor"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "player_id",
                          "sport_name",
                          "role",
                          "team_id",
                          "is_minor"
                        ],
                        "properties": {
                          "player_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "sport_name": {
                            "type": "string"
                          },
                          "role": {
                            "type": "string",
                            "enum": [
                              "GK",
                              "DEF",
                              "MID",
                              "FWD"
                            ]
                          },
                          "team_id": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uuid"
                          },
                          "is_minor": {
                            "type": "boolean"
                          }
                        }
                      }
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/fine-types": {
      "get": {
        "tags": [
          "admin",
          "fines"
        ],
        "summary": "Catalogo delle tipologie di multa (paginato a cursore)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "recipient",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "team",
                "referee"
              ]
            }
          },
          {
            "name": "active_only",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false",
                "1",
                "0"
              ]
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Pagina del catalogo",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "next_cursor"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "name",
                          "recipient",
                          "sports",
                          "amount_cents",
                          "currency",
                          "fairplay_points",
                          "penalty_points",
                          "penalty_goals",
                          "active",
                          "used",
                          "version",
                          "created_at",
                          "updated_at"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "name": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          },
                          "recipient": {
                            "type": "string",
                            "enum": [
                              "team",
                              "referee"
                            ]
                          },
                          "sports": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "calcio_a_8"
                              ]
                            }
                          },
                          "amount_cents": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 1000000
                          },
                          "currency": {
                            "type": "string",
                            "enum": [
                              "EUR"
                            ]
                          },
                          "fairplay_points": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 99
                          },
                          "penalty_points": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 99
                          },
                          "penalty_goals": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 99
                          },
                          "active": {
                            "type": "boolean"
                          },
                          "used": {
                            "type": "boolean"
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 1
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updated_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    },
                    "next_cursor": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "admin",
          "fines"
        ],
        "summary": "Crea una tipologia di multa (ripetibile con lo stesso request_id)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "request_id",
                  "recipient",
                  "name",
                  "sports",
                  "amount_cents"
                ],
                "properties": {
                  "request_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "recipient": {
                    "type": "string",
                    "enum": [
                      "team",
                      "referee"
                    ]
                  },
                  "currency": {
                    "type": "string",
                    "enum": [
                      "EUR"
                    ]
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "sports": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "calcio_a_8"
                      ]
                    },
                    "minItems": 1,
                    "uniqueItems": true
                  },
                  "amount_cents": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 1000000
                  },
                  "fairplay_points": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 99
                  },
                  "penalty_points": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 99
                  },
                  "penalty_goals": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 99
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Già creata da questa richiesta",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "name",
                    "recipient",
                    "sports",
                    "amount_cents",
                    "currency",
                    "fairplay_points",
                    "penalty_points",
                    "penalty_goals",
                    "active",
                    "used",
                    "version",
                    "created_at",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "recipient": {
                      "type": "string",
                      "enum": [
                        "team",
                        "referee"
                      ]
                    },
                    "sports": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "calcio_a_8"
                        ]
                      }
                    },
                    "amount_cents": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 1000000
                    },
                    "currency": {
                      "type": "string",
                      "enum": [
                        "EUR"
                      ]
                    },
                    "fairplay_points": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 99
                    },
                    "penalty_points": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 99
                    },
                    "penalty_goals": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 99
                    },
                    "active": {
                      "type": "boolean"
                    },
                    "used": {
                      "type": "boolean"
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "Creata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "name",
                    "recipient",
                    "sports",
                    "amount_cents",
                    "currency",
                    "fairplay_points",
                    "penalty_points",
                    "penalty_goals",
                    "active",
                    "used",
                    "version",
                    "created_at",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "recipient": {
                      "type": "string",
                      "enum": [
                        "team",
                        "referee"
                      ]
                    },
                    "sports": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "calcio_a_8"
                        ]
                      }
                    },
                    "amount_cents": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 1000000
                    },
                    "currency": {
                      "type": "string",
                      "enum": [
                        "EUR"
                      ]
                    },
                    "fairplay_points": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 99
                    },
                    "penalty_points": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 99
                    },
                    "penalty_goals": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 99
                    },
                    "active": {
                      "type": "boolean"
                    },
                    "used": {
                      "type": "boolean"
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/fine-types/{fineTypeId}": {
      "put": {
        "tags": [
          "admin",
          "fines"
        ],
        "summary": "Modifica una tipologia; le multe già date non cambiano",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "fineTypeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "expected_version",
                  "name",
                  "sports",
                  "amount_cents"
                ],
                "properties": {
                  "expected_version": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "sports": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "calcio_a_8"
                      ]
                    },
                    "minItems": 1,
                    "uniqueItems": true
                  },
                  "amount_cents": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 1000000
                  },
                  "fairplay_points": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 99
                  },
                  "penalty_points": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 99
                  },
                  "penalty_goals": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 99
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Modificata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "name",
                    "recipient",
                    "sports",
                    "amount_cents",
                    "currency",
                    "fairplay_points",
                    "penalty_points",
                    "penalty_goals",
                    "active",
                    "used",
                    "version",
                    "created_at",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "recipient": {
                      "type": "string",
                      "enum": [
                        "team",
                        "referee"
                      ]
                    },
                    "sports": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "calcio_a_8"
                        ]
                      }
                    },
                    "amount_cents": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 1000000
                    },
                    "currency": {
                      "type": "string",
                      "enum": [
                        "EUR"
                      ]
                    },
                    "fairplay_points": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 99
                    },
                    "penalty_points": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 99
                    },
                    "penalty_goals": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 99
                    },
                    "active": {
                      "type": "boolean"
                    },
                    "used": {
                      "type": "boolean"
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "admin",
          "fines"
        ],
        "summary": "Elimina una tipologia mai usata",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "fineTypeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "expected_version",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Eliminata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "name",
                    "recipient",
                    "sports",
                    "amount_cents",
                    "currency",
                    "fairplay_points",
                    "penalty_points",
                    "penalty_goals",
                    "active",
                    "used",
                    "version",
                    "created_at",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "recipient": {
                      "type": "string",
                      "enum": [
                        "team",
                        "referee"
                      ]
                    },
                    "sports": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "calcio_a_8"
                        ]
                      }
                    },
                    "amount_cents": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 1000000
                    },
                    "currency": {
                      "type": "string",
                      "enum": [
                        "EUR"
                      ]
                    },
                    "fairplay_points": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 99
                    },
                    "penalty_points": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 99
                    },
                    "penalty_goals": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 99
                    },
                    "active": {
                      "type": "boolean"
                    },
                    "used": {
                      "type": "boolean"
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/fine-types/{fineTypeId}/status": {
      "post": {
        "tags": [
          "admin",
          "fines"
        ],
        "summary": "Attiva o disattiva una tipologia",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "fineTypeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "active",
                  "expected_version"
                ],
                "properties": {
                  "active": {
                    "type": "boolean"
                  },
                  "expected_version": {
                    "type": "integer",
                    "minimum": 1
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Stato aggiornato",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "name",
                    "recipient",
                    "sports",
                    "amount_cents",
                    "currency",
                    "fairplay_points",
                    "penalty_points",
                    "penalty_goals",
                    "active",
                    "used",
                    "version",
                    "created_at",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "recipient": {
                      "type": "string",
                      "enum": [
                        "team",
                        "referee"
                      ]
                    },
                    "sports": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "calcio_a_8"
                        ]
                      }
                    },
                    "amount_cents": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 1000000
                    },
                    "currency": {
                      "type": "string",
                      "enum": [
                        "EUR"
                      ]
                    },
                    "fairplay_points": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 99
                    },
                    "penalty_points": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 99
                    },
                    "penalty_goals": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 99
                    },
                    "active": {
                      "type": "boolean"
                    },
                    "used": {
                      "type": "boolean"
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/matches/{matchId}/fines": {
      "get": {
        "tags": [
          "admin",
          "fines"
        ],
        "summary": "Multe della partita, con squadre, arbitri e tipologie applicabili",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Multe della partita",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "match",
                    "fine_types",
                    "items"
                  ],
                  "properties": {
                    "match": {
                      "type": "object",
                      "required": [
                        "match_id",
                        "tournament_id",
                        "tournament_label",
                        "season_id",
                        "match_day",
                        "teams",
                        "referees"
                      ],
                      "properties": {
                        "match_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "tournament_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "tournament_label": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "season_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "match_day": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "date"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "teams": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "team_id",
                              "side",
                              "label"
                            ],
                            "properties": {
                              "team_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "side": {
                                "type": "string",
                                "enum": [
                                  "home",
                                  "away"
                                ]
                              },
                              "label": {
                                "oneOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            }
                          }
                        },
                        "referees": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "user_id",
                              "label"
                            ],
                            "properties": {
                              "user_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "label": {
                                "oneOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            }
                          }
                        }
                      }
                    },
                    "fine_types": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "name",
                          "recipient",
                          "sports",
                          "amount_cents",
                          "currency",
                          "fairplay_points",
                          "penalty_points",
                          "penalty_goals",
                          "active",
                          "used",
                          "version",
                          "created_at",
                          "updated_at"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "name": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          },
                          "recipient": {
                            "type": "string",
                            "enum": [
                              "team",
                              "referee"
                            ]
                          },
                          "sports": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "calcio_a_8"
                              ]
                            }
                          },
                          "amount_cents": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 1000000
                          },
                          "currency": {
                            "type": "string",
                            "enum": [
                              "EUR"
                            ]
                          },
                          "fairplay_points": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 99
                          },
                          "penalty_points": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 99
                          },
                          "penalty_goals": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 99
                          },
                          "active": {
                            "type": "boolean"
                          },
                          "used": {
                            "type": "boolean"
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 1
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updated_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "match_id",
                          "tournament_id",
                          "tournament_label",
                          "season_id",
                          "match_day",
                          "recipient",
                          "team_id",
                          "referee_user_id",
                          "recipient_label",
                          "player_id",
                          "fine_type_id",
                          "fine_type_name",
                          "unit_amount_cents",
                          "quantity",
                          "total_cents",
                          "currency",
                          "penalty_points_total",
                          "penalty_goals_total",
                          "fairplay_points_total",
                          "standing_effect",
                          "status",
                          "void_reason",
                          "voided_at",
                          "voided_by",
                          "note",
                          "history",
                          "version",
                          "created_at",
                          "created_by",
                          "updated_at"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "match_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "tournament_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "tournament_label": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "season_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "match_day": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "date"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "recipient": {
                            "type": "string",
                            "enum": [
                              "team",
                              "referee"
                            ]
                          },
                          "team_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "referee_user_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "recipient_label": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "player_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "fine_type_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "fine_type_name": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          },
                          "unit_amount_cents": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 1000000
                          },
                          "quantity": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 99
                          },
                          "total_cents": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "currency": {
                            "type": "string",
                            "enum": [
                              "EUR"
                            ]
                          },
                          "penalty_points_total": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "penalty_goals_total": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "fairplay_points_total": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "standing_effect": {
                            "oneOf": [
                              {
                                "type": "object",
                                "required": [
                                  "points",
                                  "status",
                                  "override_id",
                                  "reversal_override_id",
                                  "decided_at",
                                  "decided_by",
                                  "reason"
                                ],
                                "properties": {
                                  "points": {
                                    "type": "integer",
                                    "minimum": 1
                                  },
                                  "status": {
                                    "type": "string",
                                    "enum": [
                                      "proposed",
                                      "applied",
                                      "rejected",
                                      "withdrawn",
                                      "reversed"
                                    ]
                                  },
                                  "override_id": {
                                    "oneOf": [
                                      {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "reversal_override_id": {
                                    "oneOf": [
                                      {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "decided_at": {
                                    "oneOf": [
                                      {
                                        "type": "string",
                                        "format": "date-time"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "decided_by": {
                                    "oneOf": [
                                      {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "reason": {
                                    "oneOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "active",
                              "voided"
                            ]
                          },
                          "void_reason": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "voided_at": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "voided_by": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "note": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "history": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "at",
                                "by",
                                "action",
                                "reason",
                                "changes"
                              ],
                              "properties": {
                                "at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "by": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "action": {
                                  "type": "string",
                                  "enum": [
                                    "assigned",
                                    "modified",
                                    "voided",
                                    "penalty_confirmed",
                                    "penalty_rejected"
                                  ]
                                },
                                "reason": {
                                  "oneOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "changes": {
                                  "type": "object",
                                  "additionalProperties": true
                                }
                              }
                            }
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 1
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "created_by": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "updated_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "admin",
          "fines"
        ],
        "summary": "Assegna multe a una squadra o a un arbitro della partita",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "request_id",
                  "recipient",
                  "lines"
                ],
                "properties": {
                  "request_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "recipient": {
                    "oneOf": [
                      {
                        "type": "object",
                        "required": [
                          "kind",
                          "team_id"
                        ],
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "team"
                            ]
                          },
                          "team_id": {
                            "type": "string",
                            "format": "uuid"
                          }
                        },
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "required": [
                          "kind",
                          "user_id"
                        ],
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "referee"
                            ]
                          },
                          "user_id": {
                            "type": "string",
                            "format": "uuid"
                          }
                        },
                        "additionalProperties": false
                      }
                    ]
                  },
                  "lines": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "fine_type_id"
                      ],
                      "properties": {
                        "fine_type_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "quantity": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 99
                        }
                      },
                      "additionalProperties": false
                    },
                    "minItems": 1,
                    "maxItems": 50
                  },
                  "player_id": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "note": {
                    "oneOf": [
                      {
                        "type": "string",
                        "maxLength": 500
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Già assegnate da questa richiesta",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "created"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "match_id",
                          "tournament_id",
                          "tournament_label",
                          "season_id",
                          "match_day",
                          "recipient",
                          "team_id",
                          "referee_user_id",
                          "recipient_label",
                          "player_id",
                          "fine_type_id",
                          "fine_type_name",
                          "unit_amount_cents",
                          "quantity",
                          "total_cents",
                          "currency",
                          "penalty_points_total",
                          "penalty_goals_total",
                          "fairplay_points_total",
                          "standing_effect",
                          "status",
                          "void_reason",
                          "voided_at",
                          "voided_by",
                          "note",
                          "history",
                          "version",
                          "created_at",
                          "created_by",
                          "updated_at"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "match_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "tournament_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "tournament_label": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "season_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "match_day": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "date"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "recipient": {
                            "type": "string",
                            "enum": [
                              "team",
                              "referee"
                            ]
                          },
                          "team_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "referee_user_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "recipient_label": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "player_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "fine_type_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "fine_type_name": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          },
                          "unit_amount_cents": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 1000000
                          },
                          "quantity": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 99
                          },
                          "total_cents": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "currency": {
                            "type": "string",
                            "enum": [
                              "EUR"
                            ]
                          },
                          "penalty_points_total": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "penalty_goals_total": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "fairplay_points_total": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "standing_effect": {
                            "oneOf": [
                              {
                                "type": "object",
                                "required": [
                                  "points",
                                  "status",
                                  "override_id",
                                  "reversal_override_id",
                                  "decided_at",
                                  "decided_by",
                                  "reason"
                                ],
                                "properties": {
                                  "points": {
                                    "type": "integer",
                                    "minimum": 1
                                  },
                                  "status": {
                                    "type": "string",
                                    "enum": [
                                      "proposed",
                                      "applied",
                                      "rejected",
                                      "withdrawn",
                                      "reversed"
                                    ]
                                  },
                                  "override_id": {
                                    "oneOf": [
                                      {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "reversal_override_id": {
                                    "oneOf": [
                                      {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "decided_at": {
                                    "oneOf": [
                                      {
                                        "type": "string",
                                        "format": "date-time"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "decided_by": {
                                    "oneOf": [
                                      {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "reason": {
                                    "oneOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "active",
                              "voided"
                            ]
                          },
                          "void_reason": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "voided_at": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "voided_by": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "note": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "history": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "at",
                                "by",
                                "action",
                                "reason",
                                "changes"
                              ],
                              "properties": {
                                "at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "by": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "action": {
                                  "type": "string",
                                  "enum": [
                                    "assigned",
                                    "modified",
                                    "voided",
                                    "penalty_confirmed",
                                    "penalty_rejected"
                                  ]
                                },
                                "reason": {
                                  "oneOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "changes": {
                                  "type": "object",
                                  "additionalProperties": true
                                }
                              }
                            }
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 1
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "created_by": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "updated_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    },
                    "created": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "Assegnate",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "created"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "match_id",
                          "tournament_id",
                          "tournament_label",
                          "season_id",
                          "match_day",
                          "recipient",
                          "team_id",
                          "referee_user_id",
                          "recipient_label",
                          "player_id",
                          "fine_type_id",
                          "fine_type_name",
                          "unit_amount_cents",
                          "quantity",
                          "total_cents",
                          "currency",
                          "penalty_points_total",
                          "penalty_goals_total",
                          "fairplay_points_total",
                          "standing_effect",
                          "status",
                          "void_reason",
                          "voided_at",
                          "voided_by",
                          "note",
                          "history",
                          "version",
                          "created_at",
                          "created_by",
                          "updated_at"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "match_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "tournament_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "tournament_label": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "season_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "match_day": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "date"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "recipient": {
                            "type": "string",
                            "enum": [
                              "team",
                              "referee"
                            ]
                          },
                          "team_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "referee_user_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "recipient_label": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "player_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "fine_type_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "fine_type_name": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          },
                          "unit_amount_cents": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 1000000
                          },
                          "quantity": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 99
                          },
                          "total_cents": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "currency": {
                            "type": "string",
                            "enum": [
                              "EUR"
                            ]
                          },
                          "penalty_points_total": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "penalty_goals_total": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "fairplay_points_total": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "standing_effect": {
                            "oneOf": [
                              {
                                "type": "object",
                                "required": [
                                  "points",
                                  "status",
                                  "override_id",
                                  "reversal_override_id",
                                  "decided_at",
                                  "decided_by",
                                  "reason"
                                ],
                                "properties": {
                                  "points": {
                                    "type": "integer",
                                    "minimum": 1
                                  },
                                  "status": {
                                    "type": "string",
                                    "enum": [
                                      "proposed",
                                      "applied",
                                      "rejected",
                                      "withdrawn",
                                      "reversed"
                                    ]
                                  },
                                  "override_id": {
                                    "oneOf": [
                                      {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "reversal_override_id": {
                                    "oneOf": [
                                      {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "decided_at": {
                                    "oneOf": [
                                      {
                                        "type": "string",
                                        "format": "date-time"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "decided_by": {
                                    "oneOf": [
                                      {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "reason": {
                                    "oneOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "active",
                              "voided"
                            ]
                          },
                          "void_reason": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "voided_at": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "voided_by": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "note": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "history": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "at",
                                "by",
                                "action",
                                "reason",
                                "changes"
                              ],
                              "properties": {
                                "at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "by": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "action": {
                                  "type": "string",
                                  "enum": [
                                    "assigned",
                                    "modified",
                                    "voided",
                                    "penalty_confirmed",
                                    "penalty_rejected"
                                  ]
                                },
                                "reason": {
                                  "oneOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "changes": {
                                  "type": "object",
                                  "additionalProperties": true
                                }
                              }
                            }
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 1
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "created_by": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "updated_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    },
                    "created": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/fines/{fineId}": {
      "patch": {
        "tags": [
          "admin",
          "fines"
        ],
        "summary": "Modifica quantità, giocatore o nota di una multa, con motivo",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "fineId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "expected_version",
                  "reason"
                ],
                "properties": {
                  "expected_version": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 500
                  },
                  "quantity": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 99
                  },
                  "player_id": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "note": {
                    "oneOf": [
                      {
                        "type": "string",
                        "maxLength": 500
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Modificata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "match_id",
                    "tournament_id",
                    "tournament_label",
                    "season_id",
                    "match_day",
                    "recipient",
                    "team_id",
                    "referee_user_id",
                    "recipient_label",
                    "player_id",
                    "fine_type_id",
                    "fine_type_name",
                    "unit_amount_cents",
                    "quantity",
                    "total_cents",
                    "currency",
                    "penalty_points_total",
                    "penalty_goals_total",
                    "fairplay_points_total",
                    "standing_effect",
                    "status",
                    "void_reason",
                    "voided_at",
                    "voided_by",
                    "note",
                    "history",
                    "version",
                    "created_at",
                    "created_by",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "match_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "tournament_label": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "season_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "match_day": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "date"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "recipient": {
                      "type": "string",
                      "enum": [
                        "team",
                        "referee"
                      ]
                    },
                    "team_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "referee_user_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "recipient_label": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "player_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "fine_type_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "fine_type_name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "unit_amount_cents": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 1000000
                    },
                    "quantity": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 99
                    },
                    "total_cents": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "currency": {
                      "type": "string",
                      "enum": [
                        "EUR"
                      ]
                    },
                    "penalty_points_total": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "penalty_goals_total": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "fairplay_points_total": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "standing_effect": {
                      "oneOf": [
                        {
                          "type": "object",
                          "required": [
                            "points",
                            "status",
                            "override_id",
                            "reversal_override_id",
                            "decided_at",
                            "decided_by",
                            "reason"
                          ],
                          "properties": {
                            "points": {
                              "type": "integer",
                              "minimum": 1
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "proposed",
                                "applied",
                                "rejected",
                                "withdrawn",
                                "reversed"
                              ]
                            },
                            "override_id": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "reversal_override_id": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "decided_at": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "decided_by": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "reason": {
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          }
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "active",
                        "voided"
                      ]
                    },
                    "void_reason": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "voided_at": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "voided_by": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "note": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "history": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "at",
                          "by",
                          "action",
                          "reason",
                          "changes"
                        ],
                        "properties": {
                          "at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "by": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "action": {
                            "type": "string",
                            "enum": [
                              "assigned",
                              "modified",
                              "voided",
                              "penalty_confirmed",
                              "penalty_rejected"
                            ]
                          },
                          "reason": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "changes": {
                            "type": "object",
                            "additionalProperties": true
                          }
                        }
                      }
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "created_by": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/fines/{fineId}/void": {
      "post": {
        "tags": [
          "admin",
          "fines"
        ],
        "summary": "Annulla una multa con motivo (storno, mai cancellazione)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "fineId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "reason"
                ],
                "properties": {
                  "reason": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 500
                  },
                  "expected_version": {
                    "type": "integer",
                    "minimum": 1
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Annullata (o già annullata)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "match_id",
                    "tournament_id",
                    "tournament_label",
                    "season_id",
                    "match_day",
                    "recipient",
                    "team_id",
                    "referee_user_id",
                    "recipient_label",
                    "player_id",
                    "fine_type_id",
                    "fine_type_name",
                    "unit_amount_cents",
                    "quantity",
                    "total_cents",
                    "currency",
                    "penalty_points_total",
                    "penalty_goals_total",
                    "fairplay_points_total",
                    "standing_effect",
                    "status",
                    "void_reason",
                    "voided_at",
                    "voided_by",
                    "note",
                    "history",
                    "version",
                    "created_at",
                    "created_by",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "match_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "tournament_label": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "season_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "match_day": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "date"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "recipient": {
                      "type": "string",
                      "enum": [
                        "team",
                        "referee"
                      ]
                    },
                    "team_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "referee_user_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "recipient_label": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "player_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "fine_type_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "fine_type_name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "unit_amount_cents": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 1000000
                    },
                    "quantity": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 99
                    },
                    "total_cents": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "currency": {
                      "type": "string",
                      "enum": [
                        "EUR"
                      ]
                    },
                    "penalty_points_total": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "penalty_goals_total": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "fairplay_points_total": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "standing_effect": {
                      "oneOf": [
                        {
                          "type": "object",
                          "required": [
                            "points",
                            "status",
                            "override_id",
                            "reversal_override_id",
                            "decided_at",
                            "decided_by",
                            "reason"
                          ],
                          "properties": {
                            "points": {
                              "type": "integer",
                              "minimum": 1
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "proposed",
                                "applied",
                                "rejected",
                                "withdrawn",
                                "reversed"
                              ]
                            },
                            "override_id": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "reversal_override_id": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "decided_at": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "decided_by": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "reason": {
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          }
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "active",
                        "voided"
                      ]
                    },
                    "void_reason": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "voided_at": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "voided_by": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "note": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "history": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "at",
                          "by",
                          "action",
                          "reason",
                          "changes"
                        ],
                        "properties": {
                          "at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "by": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "action": {
                            "type": "string",
                            "enum": [
                              "assigned",
                              "modified",
                              "voided",
                              "penalty_confirmed",
                              "penalty_rejected"
                            ]
                          },
                          "reason": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "changes": {
                            "type": "object",
                            "additionalProperties": true
                          }
                        }
                      }
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "created_by": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/fines/{fineId}/penalty/confirm": {
      "post": {
        "tags": [
          "admin",
          "fines"
        ],
        "summary": "Conferma la penalità in classifica proposta dalla multa (N-06)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "fineId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "expected_version"
                ],
                "properties": {
                  "expected_version": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 500
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Penalità applicata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "match_id",
                    "tournament_id",
                    "tournament_label",
                    "season_id",
                    "match_day",
                    "recipient",
                    "team_id",
                    "referee_user_id",
                    "recipient_label",
                    "player_id",
                    "fine_type_id",
                    "fine_type_name",
                    "unit_amount_cents",
                    "quantity",
                    "total_cents",
                    "currency",
                    "penalty_points_total",
                    "penalty_goals_total",
                    "fairplay_points_total",
                    "standing_effect",
                    "status",
                    "void_reason",
                    "voided_at",
                    "voided_by",
                    "note",
                    "history",
                    "version",
                    "created_at",
                    "created_by",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "match_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "tournament_label": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "season_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "match_day": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "date"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "recipient": {
                      "type": "string",
                      "enum": [
                        "team",
                        "referee"
                      ]
                    },
                    "team_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "referee_user_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "recipient_label": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "player_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "fine_type_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "fine_type_name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "unit_amount_cents": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 1000000
                    },
                    "quantity": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 99
                    },
                    "total_cents": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "currency": {
                      "type": "string",
                      "enum": [
                        "EUR"
                      ]
                    },
                    "penalty_points_total": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "penalty_goals_total": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "fairplay_points_total": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "standing_effect": {
                      "oneOf": [
                        {
                          "type": "object",
                          "required": [
                            "points",
                            "status",
                            "override_id",
                            "reversal_override_id",
                            "decided_at",
                            "decided_by",
                            "reason"
                          ],
                          "properties": {
                            "points": {
                              "type": "integer",
                              "minimum": 1
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "proposed",
                                "applied",
                                "rejected",
                                "withdrawn",
                                "reversed"
                              ]
                            },
                            "override_id": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "reversal_override_id": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "decided_at": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "decided_by": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "reason": {
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          }
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "active",
                        "voided"
                      ]
                    },
                    "void_reason": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "voided_at": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "voided_by": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "note": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "history": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "at",
                          "by",
                          "action",
                          "reason",
                          "changes"
                        ],
                        "properties": {
                          "at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "by": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "action": {
                            "type": "string",
                            "enum": [
                              "assigned",
                              "modified",
                              "voided",
                              "penalty_confirmed",
                              "penalty_rejected"
                            ]
                          },
                          "reason": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "changes": {
                            "type": "object",
                            "additionalProperties": true
                          }
                        }
                      }
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "created_by": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/fines/{fineId}/penalty/reject": {
      "post": {
        "tags": [
          "admin",
          "fines"
        ],
        "summary": "Respinge la penalità in classifica proposta dalla multa",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "fineId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "expected_version",
                  "reason"
                ],
                "properties": {
                  "expected_version": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 500
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Penalità respinta",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "match_id",
                    "tournament_id",
                    "tournament_label",
                    "season_id",
                    "match_day",
                    "recipient",
                    "team_id",
                    "referee_user_id",
                    "recipient_label",
                    "player_id",
                    "fine_type_id",
                    "fine_type_name",
                    "unit_amount_cents",
                    "quantity",
                    "total_cents",
                    "currency",
                    "penalty_points_total",
                    "penalty_goals_total",
                    "fairplay_points_total",
                    "standing_effect",
                    "status",
                    "void_reason",
                    "voided_at",
                    "voided_by",
                    "note",
                    "history",
                    "version",
                    "created_at",
                    "created_by",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "match_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "tournament_label": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "season_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "match_day": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "date"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "recipient": {
                      "type": "string",
                      "enum": [
                        "team",
                        "referee"
                      ]
                    },
                    "team_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "referee_user_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "recipient_label": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "player_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "fine_type_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "fine_type_name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "unit_amount_cents": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 1000000
                    },
                    "quantity": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 99
                    },
                    "total_cents": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "currency": {
                      "type": "string",
                      "enum": [
                        "EUR"
                      ]
                    },
                    "penalty_points_total": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "penalty_goals_total": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "fairplay_points_total": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "standing_effect": {
                      "oneOf": [
                        {
                          "type": "object",
                          "required": [
                            "points",
                            "status",
                            "override_id",
                            "reversal_override_id",
                            "decided_at",
                            "decided_by",
                            "reason"
                          ],
                          "properties": {
                            "points": {
                              "type": "integer",
                              "minimum": 1
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "proposed",
                                "applied",
                                "rejected",
                                "withdrawn",
                                "reversed"
                              ]
                            },
                            "override_id": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "reversal_override_id": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "decided_at": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "decided_by": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "reason": {
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          }
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "active",
                        "voided"
                      ]
                    },
                    "void_reason": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "voided_at": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "voided_by": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "note": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "history": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "at",
                          "by",
                          "action",
                          "reason",
                          "changes"
                        ],
                        "properties": {
                          "at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "by": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "action": {
                            "type": "string",
                            "enum": [
                              "assigned",
                              "modified",
                              "voided",
                              "penalty_confirmed",
                              "penalty_rejected"
                            ]
                          },
                          "reason": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "changes": {
                            "type": "object",
                            "additionalProperties": true
                          }
                        }
                      }
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "created_by": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/fines/report": {
      "get": {
        "tags": [
          "admin",
          "fines"
        ],
        "summary": "Riepilogo multe con filtri e totali (lega, squadra, giocatore, arbitro)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "season_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "tournament_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "referee_user_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "player_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "recipient",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "team",
                "referee"
              ]
            }
          },
          {
            "name": "pecuniary_only",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false",
                "1",
                "0"
              ]
            }
          },
          {
            "name": "include_voided",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false",
                "1",
                "0"
              ]
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Pagina del riepilogo",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "totals",
                    "next_cursor"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "match_id",
                          "tournament_id",
                          "tournament_label",
                          "season_id",
                          "match_day",
                          "recipient",
                          "team_id",
                          "referee_user_id",
                          "recipient_label",
                          "player_id",
                          "fine_type_id",
                          "fine_type_name",
                          "unit_amount_cents",
                          "quantity",
                          "total_cents",
                          "currency",
                          "penalty_points_total",
                          "penalty_goals_total",
                          "fairplay_points_total",
                          "standing_effect",
                          "status",
                          "void_reason",
                          "voided_at",
                          "voided_by",
                          "note",
                          "history",
                          "version",
                          "created_at",
                          "created_by",
                          "updated_at"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "match_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "tournament_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "tournament_label": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "season_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "match_day": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "date"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "recipient": {
                            "type": "string",
                            "enum": [
                              "team",
                              "referee"
                            ]
                          },
                          "team_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "referee_user_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "recipient_label": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "player_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "fine_type_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "fine_type_name": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          },
                          "unit_amount_cents": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 1000000
                          },
                          "quantity": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 99
                          },
                          "total_cents": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "currency": {
                            "type": "string",
                            "enum": [
                              "EUR"
                            ]
                          },
                          "penalty_points_total": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "penalty_goals_total": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "fairplay_points_total": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "standing_effect": {
                            "oneOf": [
                              {
                                "type": "object",
                                "required": [
                                  "points",
                                  "status",
                                  "override_id",
                                  "reversal_override_id",
                                  "decided_at",
                                  "decided_by",
                                  "reason"
                                ],
                                "properties": {
                                  "points": {
                                    "type": "integer",
                                    "minimum": 1
                                  },
                                  "status": {
                                    "type": "string",
                                    "enum": [
                                      "proposed",
                                      "applied",
                                      "rejected",
                                      "withdrawn",
                                      "reversed"
                                    ]
                                  },
                                  "override_id": {
                                    "oneOf": [
                                      {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "reversal_override_id": {
                                    "oneOf": [
                                      {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "decided_at": {
                                    "oneOf": [
                                      {
                                        "type": "string",
                                        "format": "date-time"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "decided_by": {
                                    "oneOf": [
                                      {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "reason": {
                                    "oneOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "active",
                              "voided"
                            ]
                          },
                          "void_reason": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "voided_at": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "voided_by": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "note": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "history": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "at",
                                "by",
                                "action",
                                "reason",
                                "changes"
                              ],
                              "properties": {
                                "at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "by": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "action": {
                                  "type": "string",
                                  "enum": [
                                    "assigned",
                                    "modified",
                                    "voided",
                                    "penalty_confirmed",
                                    "penalty_rejected"
                                  ]
                                },
                                "reason": {
                                  "oneOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "changes": {
                                  "type": "object",
                                  "additionalProperties": true
                                }
                              }
                            }
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 1
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "created_by": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "updated_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    },
                    "totals": {
                      "type": "object",
                      "required": [
                        "fines_count",
                        "quantity_total",
                        "total_cents",
                        "currency",
                        "fairplay_points_total",
                        "penalty_points_total",
                        "penalty_goals_total"
                      ],
                      "properties": {
                        "fines_count": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "quantity_total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "total_cents": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "currency": {
                          "type": "string",
                          "enum": [
                            "EUR"
                          ]
                        },
                        "fairplay_points_total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "penalty_points_total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "penalty_goals_total": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    },
                    "next_cursor": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/fines/dues": {
      "get": {
        "tags": [
          "admin",
          "fines"
        ],
        "summary": "Totale dovuto per squadra e torneo (multe attive)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "season_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "tournament_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Totali dovuti",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "total_due_cents",
                    "currency"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "team_id",
                          "team_label",
                          "tournament_id",
                          "tournament_label",
                          "season_id",
                          "fines_count",
                          "total_due_cents",
                          "currency"
                        ],
                        "properties": {
                          "team_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "team_label": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "tournament_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "tournament_label": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "season_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "fines_count": {
                            "type": "integer",
                            "minimum": 1
                          },
                          "total_due_cents": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "currency": {
                            "type": "string",
                            "enum": [
                              "EUR"
                            ]
                          }
                        }
                      }
                    },
                    "total_due_cents": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "currency": {
                      "type": "string",
                      "enum": [
                        "EUR"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/me/team-area/fines": {
      "get": {
        "tags": [
          "team-area",
          "fines"
        ],
        "summary": "Multe della propria squadra (staff e capitano)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_bound",
        "x-privacy-classification": "tenant_internal",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "team_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "season_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "tournament_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Multe della squadra",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "team_id",
                    "items",
                    "totals",
                    "next_cursor"
                  ],
                  "properties": {
                    "team_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "match_id",
                          "match_day",
                          "tournament_id",
                          "tournament_label",
                          "fine_type_name",
                          "quantity",
                          "unit_amount_cents",
                          "total_cents",
                          "currency",
                          "penalty_points_total",
                          "penalty_goals_total",
                          "standing_effect_status"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "match_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "match_day": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "date"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "tournament_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "tournament_label": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "fine_type_name": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          },
                          "quantity": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 99
                          },
                          "unit_amount_cents": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 1000000
                          },
                          "total_cents": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "currency": {
                            "type": "string",
                            "enum": [
                              "EUR"
                            ]
                          },
                          "penalty_points_total": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "penalty_goals_total": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "standing_effect_status": {
                            "oneOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "proposed",
                                  "applied",
                                  "rejected",
                                  "withdrawn",
                                  "reversed"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        }
                      }
                    },
                    "totals": {
                      "type": "object",
                      "required": [
                        "fines_count",
                        "quantity_total",
                        "total_cents",
                        "currency",
                        "fairplay_points_total",
                        "penalty_points_total",
                        "penalty_goals_total"
                      ],
                      "properties": {
                        "fines_count": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "quantity_total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "total_cents": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "currency": {
                          "type": "string",
                          "enum": [
                            "EUR"
                          ]
                        },
                        "fairplay_points_total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "penalty_points_total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "penalty_goals_total": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    },
                    "next_cursor": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/tournaments/{tournamentId}/accounting": {
      "get": {
        "tags": [
          "admin",
          "accounting"
        ],
        "summary": "Registro dei movimenti del torneo (non fiscale), filtri e totali",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "purpose",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "registration",
                "match_fees",
                "deposit",
                "field",
                "membership",
                "sponsorship",
                "fine",
                "other"
              ]
            }
          },
          {
            "name": "operator_user_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "player_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Pagina del registro",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "tournament",
                    "items",
                    "totals",
                    "next_cursor"
                  ],
                  "properties": {
                    "tournament": {
                      "type": "object",
                      "required": [
                        "id",
                        "label",
                        "season_id"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "label": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "season_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      }
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "tournament_id",
                          "tournament_label",
                          "season_id",
                          "year",
                          "number",
                          "document_number",
                          "kind",
                          "date",
                          "recipient",
                          "team_id",
                          "player_id",
                          "recipient_label",
                          "purpose",
                          "method",
                          "amount_cents",
                          "currency",
                          "description",
                          "match_id",
                          "match_payment_id",
                          "reverses_entry_id",
                          "reversed_by_entry_id",
                          "reversal_note",
                          "operator_user_id",
                          "operator_label",
                          "version",
                          "created_at"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "tournament_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "tournament_label": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "season_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "year": {
                            "type": "integer",
                            "minimum": 2000,
                            "maximum": 2999
                          },
                          "number": {
                            "type": "integer",
                            "minimum": 1
                          },
                          "document_number": {
                            "type": "string"
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "receipt",
                              "invoice"
                            ]
                          },
                          "date": {
                            "type": "string",
                            "format": "date"
                          },
                          "recipient": {
                            "type": "string",
                            "enum": [
                              "team",
                              "player"
                            ]
                          },
                          "team_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "player_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "recipient_label": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "purpose": {
                            "type": "string",
                            "enum": [
                              "registration",
                              "match_fees",
                              "deposit",
                              "field",
                              "membership",
                              "sponsorship",
                              "fine",
                              "other"
                            ]
                          },
                          "method": {
                            "type": "string",
                            "enum": [
                              "cash",
                              "bank_transfer",
                              "card",
                              "other"
                            ]
                          },
                          "amount_cents": {
                            "type": "integer"
                          },
                          "currency": {
                            "type": "string",
                            "enum": [
                              "EUR"
                            ]
                          },
                          "description": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "match_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "match_payment_id": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "reverses_entry_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "reversed_by_entry_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "reversal_note": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "operator_user_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "operator_label": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 1
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    },
                    "totals": {
                      "type": "object",
                      "required": [
                        "entries_count",
                        "total_cents",
                        "currency"
                      ],
                      "properties": {
                        "entries_count": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "total_cents": {
                          "type": "integer"
                        },
                        "currency": {
                          "type": "string",
                          "enum": [
                            "EUR"
                          ]
                        }
                      }
                    },
                    "next_cursor": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "admin",
          "accounting"
        ],
        "summary": "Registra un movimento (ripetibile con lo stesso request_id)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "request_id",
                  "date",
                  "recipient",
                  "purpose",
                  "method",
                  "amount_cents"
                ],
                "properties": {
                  "request_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "receipt",
                      "invoice"
                    ]
                  },
                  "date": {
                    "type": "string",
                    "format": "date"
                  },
                  "recipient": {
                    "oneOf": [
                      {
                        "type": "object",
                        "required": [
                          "kind",
                          "team_id"
                        ],
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "team"
                            ]
                          },
                          "team_id": {
                            "type": "string",
                            "format": "uuid"
                          }
                        },
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "required": [
                          "kind",
                          "player_id"
                        ],
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "player"
                            ]
                          },
                          "player_id": {
                            "type": "string",
                            "format": "uuid"
                          }
                        },
                        "additionalProperties": false
                      }
                    ]
                  },
                  "purpose": {
                    "type": "string",
                    "enum": [
                      "registration",
                      "match_fees",
                      "deposit",
                      "field",
                      "membership",
                      "sponsorship",
                      "fine",
                      "other"
                    ]
                  },
                  "method": {
                    "type": "string",
                    "enum": [
                      "cash",
                      "bank_transfer",
                      "card",
                      "other"
                    ]
                  },
                  "amount_cents": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 100000000
                  },
                  "currency": {
                    "type": "string",
                    "enum": [
                      "EUR"
                    ]
                  },
                  "description": {
                    "oneOf": [
                      {
                        "type": "string",
                        "maxLength": 500
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Già registrato da questa richiesta",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "entry",
                    "created"
                  ],
                  "properties": {
                    "entry": {
                      "type": "object",
                      "required": [
                        "id",
                        "tournament_id",
                        "tournament_label",
                        "season_id",
                        "year",
                        "number",
                        "document_number",
                        "kind",
                        "date",
                        "recipient",
                        "team_id",
                        "player_id",
                        "recipient_label",
                        "purpose",
                        "method",
                        "amount_cents",
                        "currency",
                        "description",
                        "match_id",
                        "match_payment_id",
                        "reverses_entry_id",
                        "reversed_by_entry_id",
                        "reversal_note",
                        "operator_user_id",
                        "operator_label",
                        "version",
                        "created_at"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "tournament_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "tournament_label": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "season_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "year": {
                          "type": "integer",
                          "minimum": 2000,
                          "maximum": 2999
                        },
                        "number": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "document_number": {
                          "type": "string"
                        },
                        "kind": {
                          "type": "string",
                          "enum": [
                            "receipt",
                            "invoice"
                          ]
                        },
                        "date": {
                          "type": "string",
                          "format": "date"
                        },
                        "recipient": {
                          "type": "string",
                          "enum": [
                            "team",
                            "player"
                          ]
                        },
                        "team_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "player_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "recipient_label": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "purpose": {
                          "type": "string",
                          "enum": [
                            "registration",
                            "match_fees",
                            "deposit",
                            "field",
                            "membership",
                            "sponsorship",
                            "fine",
                            "other"
                          ]
                        },
                        "method": {
                          "type": "string",
                          "enum": [
                            "cash",
                            "bank_transfer",
                            "card",
                            "other"
                          ]
                        },
                        "amount_cents": {
                          "type": "integer"
                        },
                        "currency": {
                          "type": "string",
                          "enum": [
                            "EUR"
                          ]
                        },
                        "description": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "match_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "match_payment_id": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "reverses_entry_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "reversed_by_entry_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "reversal_note": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "operator_user_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "operator_label": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "version": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    },
                    "created": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "Registrato",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "entry",
                    "created"
                  ],
                  "properties": {
                    "entry": {
                      "type": "object",
                      "required": [
                        "id",
                        "tournament_id",
                        "tournament_label",
                        "season_id",
                        "year",
                        "number",
                        "document_number",
                        "kind",
                        "date",
                        "recipient",
                        "team_id",
                        "player_id",
                        "recipient_label",
                        "purpose",
                        "method",
                        "amount_cents",
                        "currency",
                        "description",
                        "match_id",
                        "match_payment_id",
                        "reverses_entry_id",
                        "reversed_by_entry_id",
                        "reversal_note",
                        "operator_user_id",
                        "operator_label",
                        "version",
                        "created_at"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "tournament_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "tournament_label": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "season_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "year": {
                          "type": "integer",
                          "minimum": 2000,
                          "maximum": 2999
                        },
                        "number": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "document_number": {
                          "type": "string"
                        },
                        "kind": {
                          "type": "string",
                          "enum": [
                            "receipt",
                            "invoice"
                          ]
                        },
                        "date": {
                          "type": "string",
                          "format": "date"
                        },
                        "recipient": {
                          "type": "string",
                          "enum": [
                            "team",
                            "player"
                          ]
                        },
                        "team_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "player_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "recipient_label": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "purpose": {
                          "type": "string",
                          "enum": [
                            "registration",
                            "match_fees",
                            "deposit",
                            "field",
                            "membership",
                            "sponsorship",
                            "fine",
                            "other"
                          ]
                        },
                        "method": {
                          "type": "string",
                          "enum": [
                            "cash",
                            "bank_transfer",
                            "card",
                            "other"
                          ]
                        },
                        "amount_cents": {
                          "type": "integer"
                        },
                        "currency": {
                          "type": "string",
                          "enum": [
                            "EUR"
                          ]
                        },
                        "description": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "match_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "match_payment_id": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "reverses_entry_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "reversed_by_entry_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "reversal_note": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "operator_user_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "operator_label": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "version": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    },
                    "created": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/tournaments/{tournamentId}/accounting/reversals": {
      "post": {
        "tags": [
          "admin",
          "accounting"
        ],
        "summary": "Storna un movimento con un movimento opposto e motivato",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "entry_id",
                  "note",
                  "expected_version"
                ],
                "properties": {
                  "entry_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "note": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 500
                  },
                  "expected_version": {
                    "type": "integer",
                    "minimum": 1
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Già stornato",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "reversal",
                    "original",
                    "created"
                  ],
                  "properties": {
                    "reversal": {
                      "type": "object",
                      "required": [
                        "id",
                        "tournament_id",
                        "tournament_label",
                        "season_id",
                        "year",
                        "number",
                        "document_number",
                        "kind",
                        "date",
                        "recipient",
                        "team_id",
                        "player_id",
                        "recipient_label",
                        "purpose",
                        "method",
                        "amount_cents",
                        "currency",
                        "description",
                        "match_id",
                        "match_payment_id",
                        "reverses_entry_id",
                        "reversed_by_entry_id",
                        "reversal_note",
                        "operator_user_id",
                        "operator_label",
                        "version",
                        "created_at"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "tournament_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "tournament_label": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "season_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "year": {
                          "type": "integer",
                          "minimum": 2000,
                          "maximum": 2999
                        },
                        "number": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "document_number": {
                          "type": "string"
                        },
                        "kind": {
                          "type": "string",
                          "enum": [
                            "receipt",
                            "invoice"
                          ]
                        },
                        "date": {
                          "type": "string",
                          "format": "date"
                        },
                        "recipient": {
                          "type": "string",
                          "enum": [
                            "team",
                            "player"
                          ]
                        },
                        "team_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "player_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "recipient_label": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "purpose": {
                          "type": "string",
                          "enum": [
                            "registration",
                            "match_fees",
                            "deposit",
                            "field",
                            "membership",
                            "sponsorship",
                            "fine",
                            "other"
                          ]
                        },
                        "method": {
                          "type": "string",
                          "enum": [
                            "cash",
                            "bank_transfer",
                            "card",
                            "other"
                          ]
                        },
                        "amount_cents": {
                          "type": "integer"
                        },
                        "currency": {
                          "type": "string",
                          "enum": [
                            "EUR"
                          ]
                        },
                        "description": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "match_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "match_payment_id": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "reverses_entry_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "reversed_by_entry_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "reversal_note": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "operator_user_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "operator_label": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "version": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    },
                    "original": {
                      "type": "object",
                      "required": [
                        "id",
                        "tournament_id",
                        "tournament_label",
                        "season_id",
                        "year",
                        "number",
                        "document_number",
                        "kind",
                        "date",
                        "recipient",
                        "team_id",
                        "player_id",
                        "recipient_label",
                        "purpose",
                        "method",
                        "amount_cents",
                        "currency",
                        "description",
                        "match_id",
                        "match_payment_id",
                        "reverses_entry_id",
                        "reversed_by_entry_id",
                        "reversal_note",
                        "operator_user_id",
                        "operator_label",
                        "version",
                        "created_at"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "tournament_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "tournament_label": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "season_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "year": {
                          "type": "integer",
                          "minimum": 2000,
                          "maximum": 2999
                        },
                        "number": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "document_number": {
                          "type": "string"
                        },
                        "kind": {
                          "type": "string",
                          "enum": [
                            "receipt",
                            "invoice"
                          ]
                        },
                        "date": {
                          "type": "string",
                          "format": "date"
                        },
                        "recipient": {
                          "type": "string",
                          "enum": [
                            "team",
                            "player"
                          ]
                        },
                        "team_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "player_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "recipient_label": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "purpose": {
                          "type": "string",
                          "enum": [
                            "registration",
                            "match_fees",
                            "deposit",
                            "field",
                            "membership",
                            "sponsorship",
                            "fine",
                            "other"
                          ]
                        },
                        "method": {
                          "type": "string",
                          "enum": [
                            "cash",
                            "bank_transfer",
                            "card",
                            "other"
                          ]
                        },
                        "amount_cents": {
                          "type": "integer"
                        },
                        "currency": {
                          "type": "string",
                          "enum": [
                            "EUR"
                          ]
                        },
                        "description": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "match_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "match_payment_id": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "reverses_entry_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "reversed_by_entry_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "reversal_note": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "operator_user_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "operator_label": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "version": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    },
                    "created": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "Stornato",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "reversal",
                    "original",
                    "created"
                  ],
                  "properties": {
                    "reversal": {
                      "type": "object",
                      "required": [
                        "id",
                        "tournament_id",
                        "tournament_label",
                        "season_id",
                        "year",
                        "number",
                        "document_number",
                        "kind",
                        "date",
                        "recipient",
                        "team_id",
                        "player_id",
                        "recipient_label",
                        "purpose",
                        "method",
                        "amount_cents",
                        "currency",
                        "description",
                        "match_id",
                        "match_payment_id",
                        "reverses_entry_id",
                        "reversed_by_entry_id",
                        "reversal_note",
                        "operator_user_id",
                        "operator_label",
                        "version",
                        "created_at"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "tournament_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "tournament_label": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "season_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "year": {
                          "type": "integer",
                          "minimum": 2000,
                          "maximum": 2999
                        },
                        "number": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "document_number": {
                          "type": "string"
                        },
                        "kind": {
                          "type": "string",
                          "enum": [
                            "receipt",
                            "invoice"
                          ]
                        },
                        "date": {
                          "type": "string",
                          "format": "date"
                        },
                        "recipient": {
                          "type": "string",
                          "enum": [
                            "team",
                            "player"
                          ]
                        },
                        "team_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "player_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "recipient_label": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "purpose": {
                          "type": "string",
                          "enum": [
                            "registration",
                            "match_fees",
                            "deposit",
                            "field",
                            "membership",
                            "sponsorship",
                            "fine",
                            "other"
                          ]
                        },
                        "method": {
                          "type": "string",
                          "enum": [
                            "cash",
                            "bank_transfer",
                            "card",
                            "other"
                          ]
                        },
                        "amount_cents": {
                          "type": "integer"
                        },
                        "currency": {
                          "type": "string",
                          "enum": [
                            "EUR"
                          ]
                        },
                        "description": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "match_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "match_payment_id": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "reverses_entry_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "reversed_by_entry_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "reversal_note": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "operator_user_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "operator_label": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "version": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    },
                    "original": {
                      "type": "object",
                      "required": [
                        "id",
                        "tournament_id",
                        "tournament_label",
                        "season_id",
                        "year",
                        "number",
                        "document_number",
                        "kind",
                        "date",
                        "recipient",
                        "team_id",
                        "player_id",
                        "recipient_label",
                        "purpose",
                        "method",
                        "amount_cents",
                        "currency",
                        "description",
                        "match_id",
                        "match_payment_id",
                        "reverses_entry_id",
                        "reversed_by_entry_id",
                        "reversal_note",
                        "operator_user_id",
                        "operator_label",
                        "version",
                        "created_at"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "tournament_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "tournament_label": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "season_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "year": {
                          "type": "integer",
                          "minimum": 2000,
                          "maximum": 2999
                        },
                        "number": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "document_number": {
                          "type": "string"
                        },
                        "kind": {
                          "type": "string",
                          "enum": [
                            "receipt",
                            "invoice"
                          ]
                        },
                        "date": {
                          "type": "string",
                          "format": "date"
                        },
                        "recipient": {
                          "type": "string",
                          "enum": [
                            "team",
                            "player"
                          ]
                        },
                        "team_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "player_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "recipient_label": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "purpose": {
                          "type": "string",
                          "enum": [
                            "registration",
                            "match_fees",
                            "deposit",
                            "field",
                            "membership",
                            "sponsorship",
                            "fine",
                            "other"
                          ]
                        },
                        "method": {
                          "type": "string",
                          "enum": [
                            "cash",
                            "bank_transfer",
                            "card",
                            "other"
                          ]
                        },
                        "amount_cents": {
                          "type": "integer"
                        },
                        "currency": {
                          "type": "string",
                          "enum": [
                            "EUR"
                          ]
                        },
                        "description": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "match_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "match_payment_id": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "reverses_entry_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "reversed_by_entry_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "reversal_note": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "operator_user_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "operator_label": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "version": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    },
                    "created": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/tournaments/{tournamentId}/accounting/export.xlsx": {
      "get": {
        "tags": [
          "admin",
          "accounting"
        ],
        "summary": "Export XLSX del registro (colonne del gestionale storico)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "purpose",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "registration",
                "match_fees",
                "deposit",
                "field",
                "membership",
                "sponsorship",
                "fine",
                "other"
              ]
            }
          },
          {
            "name": "operator_user_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "player_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Foglio Excel del registro filtrato",
            "content": {
              "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/tournaments/{tournamentId}/accounting/balances": {
      "get": {
        "tags": [
          "admin",
          "accounting"
        ],
        "summary": "Dovuto per squadra: costi del torneo, pagamenti di partita, multe",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Dovuto per squadra",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "tournament",
                    "costs",
                    "past_deadline",
                    "items",
                    "totals",
                    "next_cursor"
                  ],
                  "properties": {
                    "tournament": {
                      "type": "object",
                      "required": [
                        "id",
                        "label",
                        "season_id"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "label": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "season_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      }
                    },
                    "costs": {
                      "type": "object",
                      "required": [
                        "registration_cents",
                        "deposit_cents",
                        "fields_whole_cents",
                        "field_per_match_cents",
                        "payment_deadline"
                      ],
                      "properties": {
                        "registration_cents": {
                          "oneOf": [
                            {
                              "type": "integer",
                              "minimum": 0
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "deposit_cents": {
                          "oneOf": [
                            {
                              "type": "integer",
                              "minimum": 0
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "fields_whole_cents": {
                          "oneOf": [
                            {
                              "type": "integer",
                              "minimum": 0
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "field_per_match_cents": {
                          "oneOf": [
                            {
                              "type": "integer",
                              "minimum": 0
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "payment_deadline": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "date"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      }
                    },
                    "past_deadline": {
                      "type": "boolean"
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "team_id",
                          "team_label",
                          "registered",
                          "registration_cents",
                          "deposit_cents",
                          "fields_whole_cents",
                          "match_fees_cents",
                          "fines_cents",
                          "due_cents",
                          "paid_cents",
                          "balance_cents",
                          "overdue"
                        ],
                        "properties": {
                          "team_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "team_label": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "registered": {
                            "type": "boolean"
                          },
                          "registration_cents": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "deposit_cents": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "fields_whole_cents": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "match_fees_cents": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "fines_cents": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "due_cents": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "paid_cents": {
                            "type": "integer"
                          },
                          "balance_cents": {
                            "type": "integer"
                          },
                          "overdue": {
                            "type": "boolean"
                          }
                        }
                      }
                    },
                    "totals": {
                      "type": "object",
                      "required": [
                        "due_cents",
                        "paid_cents",
                        "balance_cents",
                        "currency"
                      ],
                      "properties": {
                        "due_cents": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "paid_cents": {
                          "type": "integer"
                        },
                        "balance_cents": {
                          "type": "integer"
                        },
                        "currency": {
                          "type": "string",
                          "enum": [
                            "EUR"
                          ]
                        }
                      }
                    },
                    "next_cursor": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/matches/{matchId}/payments": {
      "get": {
        "tags": [
          "admin",
          "accounting"
        ],
        "summary": "Pagamenti della partita (casa, ospite, arbitro)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Pagamenti della partita",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "match",
                    "proposed_amount_cents",
                    "items"
                  ],
                  "properties": {
                    "match": {
                      "type": "object",
                      "required": [
                        "match_id",
                        "tournament_id",
                        "tournament_label",
                        "match_day",
                        "teams",
                        "referees"
                      ],
                      "properties": {
                        "match_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "tournament_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "tournament_label": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "match_day": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "date"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "teams": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "team_id",
                              "side",
                              "label"
                            ],
                            "properties": {
                              "team_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "side": {
                                "type": "string",
                                "enum": [
                                  "home",
                                  "away"
                                ]
                              },
                              "label": {
                                "oneOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            }
                          }
                        },
                        "referees": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "user_id",
                              "label"
                            ],
                            "properties": {
                              "user_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "label": {
                                "oneOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            }
                          }
                        }
                      }
                    },
                    "proposed_amount_cents": {
                      "oneOf": [
                        {
                          "type": "integer",
                          "minimum": 0
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "match_id",
                          "tournament_id",
                          "subject",
                          "team_id",
                          "referee_user_id",
                          "amount_cents",
                          "currency",
                          "method",
                          "status",
                          "entry_id",
                          "version",
                          "updated_at"
                        ],
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "match_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "tournament_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "subject": {
                            "type": "string",
                            "enum": [
                              "home",
                              "away",
                              "referee"
                            ]
                          },
                          "team_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "referee_user_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "amount_cents": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 100000000
                          },
                          "currency": {
                            "type": "string",
                            "enum": [
                              "EUR"
                            ]
                          },
                          "method": {
                            "oneOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "cash",
                                  "bank_transfer",
                                  "card",
                                  "other"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "due",
                              "paid"
                            ]
                          },
                          "entry_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 1
                          },
                          "updated_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "admin",
          "accounting"
        ],
        "summary": "Salva il pagamento di un soggetto della partita",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "subject",
                  "amount_cents",
                  "paid",
                  "expected_version"
                ],
                "properties": {
                  "subject": {
                    "type": "string",
                    "enum": [
                      "home",
                      "away",
                      "referee"
                    ]
                  },
                  "amount_cents": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100000000
                  },
                  "method": {
                    "oneOf": [
                      {
                        "type": "string",
                        "enum": [
                          "cash",
                          "bank_transfer",
                          "card",
                          "other"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "paid": {
                    "type": "boolean"
                  },
                  "expected_version": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "note": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 500
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Salvato (o già in questo stato)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "match_id",
                    "tournament_id",
                    "subject",
                    "team_id",
                    "referee_user_id",
                    "amount_cents",
                    "currency",
                    "method",
                    "status",
                    "entry_id",
                    "version",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "match_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "subject": {
                      "type": "string",
                      "enum": [
                        "home",
                        "away",
                        "referee"
                      ]
                    },
                    "team_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "referee_user_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "amount_cents": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 100000000
                    },
                    "currency": {
                      "type": "string",
                      "enum": [
                        "EUR"
                      ]
                    },
                    "method": {
                      "oneOf": [
                        {
                          "type": "string",
                          "enum": [
                            "cash",
                            "bank_transfer",
                            "card",
                            "other"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "due",
                        "paid"
                      ]
                    },
                    "entry_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/teams/{teamId}/receipts": {
      "get": {
        "tags": [
          "admin",
          "accounting"
        ],
        "summary": "Ricevute della squadra, filtrabili per stagione",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "season_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Movimenti del destinatario",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "recipient",
                    "recipient_id",
                    "items",
                    "totals",
                    "next_cursor"
                  ],
                  "properties": {
                    "recipient": {
                      "type": "string",
                      "enum": [
                        "team",
                        "player"
                      ]
                    },
                    "recipient_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "tournament_id",
                          "tournament_label",
                          "season_id",
                          "year",
                          "number",
                          "document_number",
                          "kind",
                          "date",
                          "recipient",
                          "team_id",
                          "player_id",
                          "recipient_label",
                          "purpose",
                          "method",
                          "amount_cents",
                          "currency",
                          "description",
                          "match_id",
                          "match_payment_id",
                          "reverses_entry_id",
                          "reversed_by_entry_id",
                          "reversal_note",
                          "operator_user_id",
                          "operator_label",
                          "version",
                          "created_at"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "tournament_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "tournament_label": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "season_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "year": {
                            "type": "integer",
                            "minimum": 2000,
                            "maximum": 2999
                          },
                          "number": {
                            "type": "integer",
                            "minimum": 1
                          },
                          "document_number": {
                            "type": "string"
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "receipt",
                              "invoice"
                            ]
                          },
                          "date": {
                            "type": "string",
                            "format": "date"
                          },
                          "recipient": {
                            "type": "string",
                            "enum": [
                              "team",
                              "player"
                            ]
                          },
                          "team_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "player_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "recipient_label": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "purpose": {
                            "type": "string",
                            "enum": [
                              "registration",
                              "match_fees",
                              "deposit",
                              "field",
                              "membership",
                              "sponsorship",
                              "fine",
                              "other"
                            ]
                          },
                          "method": {
                            "type": "string",
                            "enum": [
                              "cash",
                              "bank_transfer",
                              "card",
                              "other"
                            ]
                          },
                          "amount_cents": {
                            "type": "integer"
                          },
                          "currency": {
                            "type": "string",
                            "enum": [
                              "EUR"
                            ]
                          },
                          "description": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "match_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "match_payment_id": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "reverses_entry_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "reversed_by_entry_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "reversal_note": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "operator_user_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "operator_label": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 1
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    },
                    "totals": {
                      "type": "object",
                      "required": [
                        "entries_count",
                        "total_cents",
                        "currency"
                      ],
                      "properties": {
                        "entries_count": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "total_cents": {
                          "type": "integer"
                        },
                        "currency": {
                          "type": "string",
                          "enum": [
                            "EUR"
                          ]
                        }
                      }
                    },
                    "next_cursor": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/players/{playerId}/receipts": {
      "get": {
        "tags": [
          "admin",
          "accounting"
        ],
        "summary": "Ricevute del giocatore, filtrabili per stagione",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "playerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "season_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Movimenti del destinatario",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "recipient",
                    "recipient_id",
                    "items",
                    "totals",
                    "next_cursor"
                  ],
                  "properties": {
                    "recipient": {
                      "type": "string",
                      "enum": [
                        "team",
                        "player"
                      ]
                    },
                    "recipient_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "tournament_id",
                          "tournament_label",
                          "season_id",
                          "year",
                          "number",
                          "document_number",
                          "kind",
                          "date",
                          "recipient",
                          "team_id",
                          "player_id",
                          "recipient_label",
                          "purpose",
                          "method",
                          "amount_cents",
                          "currency",
                          "description",
                          "match_id",
                          "match_payment_id",
                          "reverses_entry_id",
                          "reversed_by_entry_id",
                          "reversal_note",
                          "operator_user_id",
                          "operator_label",
                          "version",
                          "created_at"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "tournament_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "tournament_label": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "season_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "year": {
                            "type": "integer",
                            "minimum": 2000,
                            "maximum": 2999
                          },
                          "number": {
                            "type": "integer",
                            "minimum": 1
                          },
                          "document_number": {
                            "type": "string"
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "receipt",
                              "invoice"
                            ]
                          },
                          "date": {
                            "type": "string",
                            "format": "date"
                          },
                          "recipient": {
                            "type": "string",
                            "enum": [
                              "team",
                              "player"
                            ]
                          },
                          "team_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "player_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "recipient_label": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "purpose": {
                            "type": "string",
                            "enum": [
                              "registration",
                              "match_fees",
                              "deposit",
                              "field",
                              "membership",
                              "sponsorship",
                              "fine",
                              "other"
                            ]
                          },
                          "method": {
                            "type": "string",
                            "enum": [
                              "cash",
                              "bank_transfer",
                              "card",
                              "other"
                            ]
                          },
                          "amount_cents": {
                            "type": "integer"
                          },
                          "currency": {
                            "type": "string",
                            "enum": [
                              "EUR"
                            ]
                          },
                          "description": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "match_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "match_payment_id": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "reverses_entry_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "reversed_by_entry_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "reversal_note": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "operator_user_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "operator_label": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 1
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    },
                    "totals": {
                      "type": "object",
                      "required": [
                        "entries_count",
                        "total_cents",
                        "currency"
                      ],
                      "properties": {
                        "entries_count": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "total_cents": {
                          "type": "integer"
                        },
                        "currency": {
                          "type": "string",
                          "enum": [
                            "EUR"
                          ]
                        }
                      }
                    },
                    "next_cursor": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/me/team-area/receipts": {
      "get": {
        "tags": [
          "team-area",
          "accounting"
        ],
        "summary": "Ricevute della propria squadra (staff e capitano)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_bound",
        "x-privacy-classification": "tenant_internal",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "team_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "season_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Movimenti della squadra",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "recipient",
                    "recipient_id",
                    "items",
                    "totals",
                    "next_cursor"
                  ],
                  "properties": {
                    "recipient": {
                      "type": "string",
                      "enum": [
                        "team",
                        "player"
                      ]
                    },
                    "recipient_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "tournament_id",
                          "tournament_label",
                          "season_id",
                          "year",
                          "number",
                          "document_number",
                          "kind",
                          "date",
                          "recipient",
                          "team_id",
                          "player_id",
                          "recipient_label",
                          "purpose",
                          "method",
                          "amount_cents",
                          "currency",
                          "description",
                          "match_id",
                          "match_payment_id",
                          "reverses_entry_id",
                          "reversed_by_entry_id",
                          "reversal_note",
                          "operator_user_id",
                          "operator_label",
                          "version",
                          "created_at"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "tournament_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "tournament_label": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "season_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "year": {
                            "type": "integer",
                            "minimum": 2000,
                            "maximum": 2999
                          },
                          "number": {
                            "type": "integer",
                            "minimum": 1
                          },
                          "document_number": {
                            "type": "string"
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "receipt",
                              "invoice"
                            ]
                          },
                          "date": {
                            "type": "string",
                            "format": "date"
                          },
                          "recipient": {
                            "type": "string",
                            "enum": [
                              "team",
                              "player"
                            ]
                          },
                          "team_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "player_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "recipient_label": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "purpose": {
                            "type": "string",
                            "enum": [
                              "registration",
                              "match_fees",
                              "deposit",
                              "field",
                              "membership",
                              "sponsorship",
                              "fine",
                              "other"
                            ]
                          },
                          "method": {
                            "type": "string",
                            "enum": [
                              "cash",
                              "bank_transfer",
                              "card",
                              "other"
                            ]
                          },
                          "amount_cents": {
                            "type": "integer"
                          },
                          "currency": {
                            "type": "string",
                            "enum": [
                              "EUR"
                            ]
                          },
                          "description": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "match_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "match_payment_id": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "reverses_entry_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "reversed_by_entry_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "reversal_note": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "operator_user_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "operator_label": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 1
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    },
                    "totals": {
                      "type": "object",
                      "required": [
                        "entries_count",
                        "total_cents",
                        "currency"
                      ],
                      "properties": {
                        "entries_count": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "total_cents": {
                          "type": "integer"
                        },
                        "currency": {
                          "type": "string",
                          "enum": [
                            "EUR"
                          ]
                        }
                      }
                    },
                    "next_cursor": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/archive/match-events/import": {
      "post": {
        "tags": [
          "admin",
          "archive-match-events"
        ],
        "summary": "Archivio — importa le schede di al massimo 100 partite (tabellino, presenze, decisione a tavolino) lette dalle pagine pubbliche. Prova generale di default (dry_run true); ogni riga sostituisce la scheda intera; replay identico = invariato. Permesso archive_public.manage.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "organization_id",
                  "source_system",
                  "rows"
                ],
                "properties": {
                  "organization_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "source_system": {
                    "type": "string"
                  },
                  "dry_run": {
                    "type": "boolean",
                    "default": true
                  },
                  "rows": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "match_id",
                        "source_match_id",
                        "home",
                        "away",
                        "source_public_proof"
                      ],
                      "properties": {
                        "match_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "source_match_id": {
                          "type": "string",
                          "pattern": "^\\d{1,12}$"
                        },
                        "source_tournament_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "pattern": "^\\d{1,12}$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "home": {
                          "type": "object",
                          "required": [
                            "entries"
                          ],
                          "properties": {
                            "source_team_label": {
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "source_group_team_id": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "pattern": "^\\d{1,12}$"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "entries": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "required": [
                                  "source_registration_id"
                                ],
                                "properties": {
                                  "source_registration_id": {
                                    "type": "string",
                                    "pattern": "^\\d{1,12}$"
                                  },
                                  "statistics": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "required": [
                                        "source_label"
                                      ],
                                      "properties": {
                                        "source_label": {
                                          "type": "string"
                                        },
                                        "count": {
                                          "type": "integer",
                                          "minimum": 1,
                                          "maximum": 30
                                        }
                                      }
                                    },
                                    "maxItems": 8
                                  },
                                  "rating": {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 10
                                  }
                                }
                              },
                              "maxItems": 64
                            }
                          }
                        },
                        "away": {
                          "type": "object",
                          "required": [
                            "entries"
                          ],
                          "properties": {
                            "source_team_label": {
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "source_group_team_id": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "pattern": "^\\d{1,12}$"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "entries": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "required": [
                                  "source_registration_id"
                                ],
                                "properties": {
                                  "source_registration_id": {
                                    "type": "string",
                                    "pattern": "^\\d{1,12}$"
                                  },
                                  "statistics": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "required": [
                                        "source_label"
                                      ],
                                      "properties": {
                                        "source_label": {
                                          "type": "string"
                                        },
                                        "count": {
                                          "type": "integer",
                                          "minimum": 1,
                                          "maximum": 30
                                        }
                                      }
                                    },
                                    "maxItems": 8
                                  },
                                  "rating": {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 10
                                  }
                                }
                              },
                              "maxItems": 64
                            }
                          }
                        },
                        "status_text": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "printed_score": {
                          "oneOf": [
                            {
                              "type": "object",
                              "required": [
                                "home",
                                "away"
                              ],
                              "properties": {
                                "home": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "away": {
                                  "type": "integer",
                                  "minimum": 0
                                }
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "source_public_proof": {
                          "type": "object",
                          "required": [
                            "url",
                            "sha256",
                            "captured_at"
                          ],
                          "properties": {
                            "url": {
                              "type": "string",
                              "format": "uri"
                            },
                            "sha256": {
                              "type": "string",
                              "pattern": "^[0-9a-f]{64}$"
                            },
                            "captured_at": {
                              "type": "string",
                              "format": "date-time"
                            }
                          }
                        },
                        "expected_source_revision": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    },
                    "maxItems": 100,
                    "minItems": 1
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Esito del lotto",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "dry_run",
                    "received",
                    "created",
                    "replaced",
                    "unchanged",
                    "rejected",
                    "outcomes",
                    "events",
                    "appearances"
                  ],
                  "properties": {
                    "dry_run": {
                      "type": "boolean"
                    },
                    "received": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "created": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "replaced": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "unchanged": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "rejected": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "match_id",
                          "source_match_id",
                          "reason"
                        ],
                        "properties": {
                          "match_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "source_match_id": {
                            "type": "string",
                            "pattern": "^\\d{1,12}$"
                          },
                          "reason": {
                            "type": "string",
                            "enum": [
                              "match_not_found",
                              "proof_url_mismatch",
                              "unknown_statistic_label",
                              "duplicate_registration",
                              "score_mismatch",
                              "source_match_claimed",
                              "match_claimed_by_other_source",
                              "revision_conflict",
                              "stale_capture"
                            ]
                          }
                        }
                      }
                    },
                    "outcomes": {
                      "type": "object",
                      "required": [
                        "none",
                        "desk_decision",
                        "suspended",
                        "postponed",
                        "other_status"
                      ],
                      "properties": {
                        "none": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "desk_decision": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "suspended": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "postponed": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "other_status": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    },
                    "events": {
                      "type": "object",
                      "required": [
                        "goal",
                        "own_goal",
                        "caution",
                        "sending_off"
                      ],
                      "properties": {
                        "goal": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "own_goal": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "caution": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "sending_off": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    },
                    "appearances": {
                      "type": "integer",
                      "minimum": 0
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Richiesta non valida"
          },
          "401": {
            "description": "Sessione assente o scaduta"
          },
          "403": {
            "description": "Permesso mancante"
          },
          "404": {
            "description": "Non trovato nel tenant (o fuori dall’ambito della sessione)"
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/archive/match-events/{matchId}": {
      "get": {
        "tags": [
          "admin",
          "archive-match-events"
        ],
        "summary": "Archivio — la scheda d’archivio salvata di una partita, con revisione e prova di origine. Permesso archive_public.read.",
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Scheda d’archivio",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "organization_id",
                    "match_id",
                    "source_system",
                    "source_match_id",
                    "source_tournament_id",
                    "sides",
                    "outcome",
                    "source_public_proof",
                    "source_digest",
                    "source_revision",
                    "created_at",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "organization_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "match_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "source_system": {
                      "type": "string"
                    },
                    "source_match_id": {
                      "type": "string",
                      "pattern": "^\\d{1,12}$"
                    },
                    "source_tournament_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "pattern": "^\\d{1,12}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "sides": {
                      "type": "object",
                      "required": [
                        "home",
                        "away"
                      ],
                      "properties": {
                        "home": {
                          "type": "object",
                          "required": [
                            "source_team_label",
                            "source_group_team_id",
                            "entries"
                          ],
                          "properties": {
                            "source_team_label": {
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "source_group_team_id": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "pattern": "^\\d{1,12}$"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "entries": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "required": [
                                  "source_registration_id",
                                  "statistics"
                                ],
                                "properties": {
                                  "source_registration_id": {
                                    "type": "string",
                                    "pattern": "^\\d{1,12}$"
                                  },
                                  "statistics": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "required": [
                                        "kind",
                                        "source_label",
                                        "count"
                                      ],
                                      "properties": {
                                        "kind": {
                                          "type": "string",
                                          "enum": [
                                            "goal",
                                            "own_goal",
                                            "caution",
                                            "sending_off"
                                          ]
                                        },
                                        "source_label": {
                                          "type": "string"
                                        },
                                        "count": {
                                          "type": "integer",
                                          "minimum": 0
                                        }
                                      }
                                    }
                                  },
                                  "rating": {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 10
                                  }
                                }
                              }
                            }
                          }
                        },
                        "away": {
                          "type": "object",
                          "required": [
                            "source_team_label",
                            "source_group_team_id",
                            "entries"
                          ],
                          "properties": {
                            "source_team_label": {
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "source_group_team_id": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "pattern": "^\\d{1,12}$"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "entries": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "required": [
                                  "source_registration_id",
                                  "statistics"
                                ],
                                "properties": {
                                  "source_registration_id": {
                                    "type": "string",
                                    "pattern": "^\\d{1,12}$"
                                  },
                                  "statistics": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "required": [
                                        "kind",
                                        "source_label",
                                        "count"
                                      ],
                                      "properties": {
                                        "kind": {
                                          "type": "string",
                                          "enum": [
                                            "goal",
                                            "own_goal",
                                            "caution",
                                            "sending_off"
                                          ]
                                        },
                                        "source_label": {
                                          "type": "string"
                                        },
                                        "count": {
                                          "type": "integer",
                                          "minimum": 0
                                        }
                                      }
                                    }
                                  },
                                  "rating": {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 10
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    },
                    "outcome": {
                      "type": "object",
                      "required": [
                        "kind",
                        "status_text",
                        "penalized_side",
                        "printed_score"
                      ],
                      "properties": {
                        "kind": {
                          "type": "string",
                          "enum": [
                            "none",
                            "desk_decision",
                            "suspended",
                            "postponed",
                            "other_status"
                          ]
                        },
                        "status_text": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "penalized_side": {
                          "oneOf": [
                            {
                              "type": "string",
                              "enum": [
                                "home",
                                "away"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "printed_score": {
                          "oneOf": [
                            {
                              "type": "object",
                              "required": [
                                "home",
                                "away"
                              ],
                              "properties": {
                                "home": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "away": {
                                  "type": "integer",
                                  "minimum": 0
                                }
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      }
                    },
                    "source_public_proof": {
                      "type": "object",
                      "required": [
                        "url",
                        "sha256",
                        "captured_at"
                      ],
                      "properties": {
                        "url": {
                          "type": "string",
                          "format": "uri"
                        },
                        "sha256": {
                          "type": "string",
                          "pattern": "^[0-9a-f]{64}$"
                        },
                        "captured_at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    },
                    "source_digest": {
                      "type": "string",
                      "pattern": "^[0-9a-f]{64}$"
                    },
                    "source_revision": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Richiesta non valida"
          },
          "401": {
            "description": "Sessione assente o scaduta"
          },
          "403": {
            "description": "Permesso mancante"
          },
          "404": {
            "description": "Non trovato nel tenant (o fuori dall’ambito della sessione)"
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/public/matches/{matchId}/archive-events": {
      "get": {
        "tags": [
          "public",
          "archive-match-events"
        ],
        "summary": "Dato d’archivio — tabellino e presenze di una partita storica come il sito della Lega li pubblicava. I nomi compaiono solo per le registrazioni d’archivio pubblicate; sheet null se l’archivio non ha la partita.",
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Scheda d’archivio della partita",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "match_id",
                    "sheet"
                  ],
                  "properties": {
                    "match_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "sheet": {
                      "oneOf": [
                        {
                          "type": "object",
                          "required": [
                            "origin",
                            "outcome",
                            "events",
                            "sides",
                            "scorers_incomplete",
                            "source"
                          ],
                          "properties": {
                            "origin": {
                              "type": "string",
                              "enum": [
                                "archive"
                              ]
                            },
                            "outcome": {
                              "type": "object",
                              "required": [
                                "kind",
                                "status_text",
                                "penalized_side",
                                "decision_score"
                              ],
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "none",
                                    "desk_decision",
                                    "suspended",
                                    "postponed",
                                    "other_status"
                                  ]
                                },
                                "status_text": {
                                  "oneOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "penalized_side": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "enum": [
                                        "home",
                                        "away"
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "decision_score": {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "required": [
                                        "home",
                                        "away"
                                      ],
                                      "properties": {
                                        "home": {
                                          "type": "integer",
                                          "minimum": 0
                                        },
                                        "away": {
                                          "type": "integer",
                                          "minimum": 0
                                        }
                                      }
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              }
                            },
                            "events": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "required": [
                                  "side",
                                  "kind",
                                  "source_label",
                                  "count",
                                  "person"
                                ],
                                "properties": {
                                  "side": {
                                    "type": "string",
                                    "enum": [
                                      "home",
                                      "away"
                                    ]
                                  },
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "goal",
                                      "own_goal",
                                      "caution",
                                      "sending_off"
                                    ]
                                  },
                                  "source_label": {
                                    "type": "string"
                                  },
                                  "count": {
                                    "type": "integer",
                                    "minimum": 1
                                  },
                                  "person": {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "required": [
                                          "registration_id",
                                          "display_name"
                                        ],
                                        "properties": {
                                          "registration_id": {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          "display_name": {
                                            "type": "string"
                                          }
                                        }
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                }
                              }
                            },
                            "sides": {
                              "type": "object",
                              "required": [
                                "home",
                                "away"
                              ],
                              "properties": {
                                "home": {
                                  "type": "object",
                                  "required": [
                                    "source_team_label",
                                    "lineup",
                                    "listed_goals_for"
                                  ],
                                  "properties": {
                                    "source_team_label": {
                                      "oneOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "lineup": {
                                      "type": "array",
                                      "items": {
                                        "oneOf": [
                                          {
                                            "type": "object",
                                            "required": [
                                              "registration_id",
                                              "display_name"
                                            ],
                                            "properties": {
                                              "registration_id": {
                                                "type": "string",
                                                "format": "uuid"
                                              },
                                              "display_name": {
                                                "type": "string"
                                              }
                                            }
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "ratings": {
                                      "type": "array",
                                      "items": {
                                        "oneOf": [
                                          {
                                            "type": "number",
                                            "minimum": 0,
                                            "maximum": 10
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "listed_goals_for": {
                                      "type": "integer",
                                      "minimum": 0
                                    }
                                  }
                                },
                                "away": {
                                  "type": "object",
                                  "required": [
                                    "source_team_label",
                                    "lineup",
                                    "listed_goals_for"
                                  ],
                                  "properties": {
                                    "source_team_label": {
                                      "oneOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "lineup": {
                                      "type": "array",
                                      "items": {
                                        "oneOf": [
                                          {
                                            "type": "object",
                                            "required": [
                                              "registration_id",
                                              "display_name"
                                            ],
                                            "properties": {
                                              "registration_id": {
                                                "type": "string",
                                                "format": "uuid"
                                              },
                                              "display_name": {
                                                "type": "string"
                                              }
                                            }
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "ratings": {
                                      "type": "array",
                                      "items": {
                                        "oneOf": [
                                          {
                                            "type": "number",
                                            "minimum": 0,
                                            "maximum": 10
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "listed_goals_for": {
                                      "type": "integer",
                                      "minimum": 0
                                    }
                                  }
                                }
                              }
                            },
                            "scorers_incomplete": {
                              "type": "boolean"
                            },
                            "source": {
                              "type": "object",
                              "required": [
                                "system",
                                "url",
                                "captured_at"
                              ],
                              "properties": {
                                "system": {
                                  "type": "string"
                                },
                                "url": {
                                  "type": "string",
                                  "format": "uri"
                                },
                                "captured_at": {
                                  "type": "string",
                                  "format": "date-time"
                                }
                              }
                            }
                          }
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Partita inesistente o competizione non pubblicata"
          }
        },
        "security": [
          {
            "ApiKey": [
              "read:public.matches"
            ]
          }
        ],
        "x-tenant-scope": "public_scoped",
        "x-rate-limit-tier": "public",
        "x-audit-required": false,
        "x-privacy-classification": "personal_data"
      }
    },
    "/admin/tournaments/{tournamentId}/phases/{phaseId}/settings": {
      "get": {
        "tags": [
          "admin",
          "phase-settings"
        ],
        "summary": "Configurazione della fase (salvata o di partenza) e criteri in vigore",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          },
          {
            "name": "phaseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Configurazione della fase",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "tournament_id",
                    "phase_id",
                    "phase_label",
                    "phase_kind",
                    "version",
                    "stored",
                    "settings",
                    "updated_at",
                    "updated_by",
                    "tiebreakers",
                    "calendar",
                    "official_matches"
                  ],
                  "properties": {
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "phase_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "phase_label": {
                      "type": "string"
                    },
                    "phase_kind": {
                      "type": "string",
                      "enum": [
                        "group_stage",
                        "league",
                        "knockout",
                        "placement"
                      ]
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "stored": {
                      "type": "boolean"
                    },
                    "settings": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "round_type",
                        "repetitions",
                        "knockout_size",
                        "knockout_rounds",
                        "third_place_final",
                        "third_place_legs",
                        "tie_allowed",
                        "extra_time_minutes",
                        "penalties",
                        "tiebreakers",
                        "points_import_phase_id"
                      ],
                      "properties": {
                        "round_type": {
                          "type": "string",
                          "enum": [
                            "single_leg",
                            "double_leg",
                            "repeated",
                            "knockout",
                            "special_points_import"
                          ]
                        },
                        "repetitions": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": 2,
                              "maximum": 10
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "knockout_size": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "enum": [
                                2,
                                4,
                                8,
                                16,
                                32,
                                64,
                                128,
                                256
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "knockout_rounds": {
                          "anyOf": [
                            {
                              "type": "array",
                              "maxItems": 8,
                              "items": {
                                "type": "object",
                                "additionalProperties": false,
                                "required": [
                                  "matches_in_round",
                                  "legs"
                                ],
                                "properties": {
                                  "matches_in_round": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 128
                                  },
                                  "legs": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 2
                                  }
                                }
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "third_place_final": {
                          "type": "boolean"
                        },
                        "third_place_legs": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 2
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "tie_allowed": {
                          "type": "boolean"
                        },
                        "extra_time_minutes": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 30
                        },
                        "penalties": {
                          "type": "boolean"
                        },
                        "tiebreakers": {
                          "anyOf": [
                            {
                              "type": "array",
                              "minItems": 1,
                              "maxItems": 6,
                              "items": {
                                "type": "string",
                                "enum": [
                                  "head_to_head",
                                  "head_to_head_goals_for",
                                  "goal_difference",
                                  "goals_for",
                                  "wins",
                                  "disciplinary"
                                ]
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "points_import_phase_id": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "points_import_mode": {
                          "type": "string",
                          "enum": [
                            "full",
                            "half_up",
                            "half_down",
                            "none"
                          ]
                        }
                      }
                    },
                    "updated_at": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "updated_by": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "tiebreakers": {
                      "type": "object",
                      "required": [
                        "chain",
                        "source",
                        "to_confirm"
                      ],
                      "properties": {
                        "chain": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "source": {
                          "type": "string",
                          "enum": [
                            "phase",
                            "tournament_rule",
                            "none"
                          ]
                        },
                        "to_confirm": {
                          "type": "boolean"
                        }
                      }
                    },
                    "calendar": {
                      "anyOf": [
                        {
                          "type": "object",
                          "required": [
                            "phase_type",
                            "repetitions"
                          ],
                          "properties": {
                            "phase_type": {
                              "type": "string",
                              "enum": [
                                "single_leg",
                                "double_leg",
                                "repeated"
                              ]
                            },
                            "repetitions": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 10
                            }
                          }
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "official_matches": {
                      "type": "integer",
                      "minimum": 0
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "admin",
          "phase-settings"
        ],
        "summary": "Salva la configurazione della fase (con gare omologate: anteprima e motivo se cambia la classifica)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          },
          {
            "name": "phaseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "round_type",
                  "repetitions",
                  "knockout_size",
                  "knockout_rounds",
                  "third_place_final",
                  "third_place_legs",
                  "tie_allowed",
                  "extra_time_minutes",
                  "penalties",
                  "tiebreakers",
                  "points_import_phase_id",
                  "expected_version"
                ],
                "properties": {
                  "round_type": {
                    "type": "string",
                    "enum": [
                      "single_leg",
                      "double_leg",
                      "repeated",
                      "knockout",
                      "special_points_import"
                    ]
                  },
                  "repetitions": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 2,
                        "maximum": 10
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "knockout_size": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "enum": [
                          2,
                          4,
                          8,
                          16,
                          32,
                          64,
                          128,
                          256
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "knockout_rounds": {
                    "anyOf": [
                      {
                        "type": "array",
                        "maxItems": 8,
                        "items": {
                          "type": "object",
                          "additionalProperties": false,
                          "required": [
                            "matches_in_round",
                            "legs"
                          ],
                          "properties": {
                            "matches_in_round": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 128
                            },
                            "legs": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 2
                            }
                          }
                        }
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "third_place_final": {
                    "type": "boolean"
                  },
                  "third_place_legs": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 2
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "tie_allowed": {
                    "type": "boolean"
                  },
                  "extra_time_minutes": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 30
                  },
                  "penalties": {
                    "type": "boolean"
                  },
                  "tiebreakers": {
                    "anyOf": [
                      {
                        "type": "array",
                        "minItems": 1,
                        "maxItems": 6,
                        "items": {
                          "type": "string",
                          "enum": [
                            "head_to_head",
                            "head_to_head_goals_for",
                            "goal_difference",
                            "goals_for",
                            "wins",
                            "disciplinary"
                          ]
                        }
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "points_import_phase_id": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "points_import_mode": {
                    "type": "string",
                    "enum": [
                      "full",
                      "half_up",
                      "half_down",
                      "none"
                    ]
                  },
                  "expected_version": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 500
                  },
                  "preview_token": {
                    "type": "string",
                    "pattern": "^[0-9a-f]{64}$"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Configurazione salvata (o già uguale)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "tournament_id",
                    "phase_id",
                    "phase_label",
                    "phase_kind",
                    "version",
                    "stored",
                    "settings",
                    "updated_at",
                    "updated_by",
                    "tiebreakers",
                    "calendar",
                    "official_matches"
                  ],
                  "properties": {
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "phase_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "phase_label": {
                      "type": "string"
                    },
                    "phase_kind": {
                      "type": "string",
                      "enum": [
                        "group_stage",
                        "league",
                        "knockout",
                        "placement"
                      ]
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "stored": {
                      "type": "boolean"
                    },
                    "settings": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "round_type",
                        "repetitions",
                        "knockout_size",
                        "knockout_rounds",
                        "third_place_final",
                        "third_place_legs",
                        "tie_allowed",
                        "extra_time_minutes",
                        "penalties",
                        "tiebreakers",
                        "points_import_phase_id"
                      ],
                      "properties": {
                        "round_type": {
                          "type": "string",
                          "enum": [
                            "single_leg",
                            "double_leg",
                            "repeated",
                            "knockout",
                            "special_points_import"
                          ]
                        },
                        "repetitions": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": 2,
                              "maximum": 10
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "knockout_size": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "enum": [
                                2,
                                4,
                                8,
                                16,
                                32,
                                64,
                                128,
                                256
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "knockout_rounds": {
                          "anyOf": [
                            {
                              "type": "array",
                              "maxItems": 8,
                              "items": {
                                "type": "object",
                                "additionalProperties": false,
                                "required": [
                                  "matches_in_round",
                                  "legs"
                                ],
                                "properties": {
                                  "matches_in_round": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 128
                                  },
                                  "legs": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 2
                                  }
                                }
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "third_place_final": {
                          "type": "boolean"
                        },
                        "third_place_legs": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 2
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "tie_allowed": {
                          "type": "boolean"
                        },
                        "extra_time_minutes": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 30
                        },
                        "penalties": {
                          "type": "boolean"
                        },
                        "tiebreakers": {
                          "anyOf": [
                            {
                              "type": "array",
                              "minItems": 1,
                              "maxItems": 6,
                              "items": {
                                "type": "string",
                                "enum": [
                                  "head_to_head",
                                  "head_to_head_goals_for",
                                  "goal_difference",
                                  "goals_for",
                                  "wins",
                                  "disciplinary"
                                ]
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "points_import_phase_id": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "points_import_mode": {
                          "type": "string",
                          "enum": [
                            "full",
                            "half_up",
                            "half_down",
                            "none"
                          ]
                        }
                      }
                    },
                    "updated_at": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "updated_by": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "tiebreakers": {
                      "type": "object",
                      "required": [
                        "chain",
                        "source",
                        "to_confirm"
                      ],
                      "properties": {
                        "chain": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "source": {
                          "type": "string",
                          "enum": [
                            "phase",
                            "tournament_rule",
                            "none"
                          ]
                        },
                        "to_confirm": {
                          "type": "boolean"
                        }
                      }
                    },
                    "calendar": {
                      "anyOf": [
                        {
                          "type": "object",
                          "required": [
                            "phase_type",
                            "repetitions"
                          ],
                          "properties": {
                            "phase_type": {
                              "type": "string",
                              "enum": [
                                "single_leg",
                                "double_leg",
                                "repeated"
                              ]
                            },
                            "repetitions": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 10
                            }
                          }
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "official_matches": {
                      "type": "integer",
                      "minimum": 0
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/tournaments/{tournamentId}/phases/{phaseId}/settings/preview": {
      "post": {
        "tags": [
          "admin",
          "phase-settings"
        ],
        "summary": "Anteprima dell’effetto di una configurazione sulle classifiche della fase",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          },
          {
            "name": "phaseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "round_type",
                  "repetitions",
                  "knockout_size",
                  "knockout_rounds",
                  "third_place_final",
                  "third_place_legs",
                  "tie_allowed",
                  "extra_time_minutes",
                  "penalties",
                  "tiebreakers",
                  "points_import_phase_id"
                ],
                "properties": {
                  "round_type": {
                    "type": "string",
                    "enum": [
                      "single_leg",
                      "double_leg",
                      "repeated",
                      "knockout",
                      "special_points_import"
                    ]
                  },
                  "repetitions": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 2,
                        "maximum": 10
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "knockout_size": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "enum": [
                          2,
                          4,
                          8,
                          16,
                          32,
                          64,
                          128,
                          256
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "knockout_rounds": {
                    "anyOf": [
                      {
                        "type": "array",
                        "maxItems": 8,
                        "items": {
                          "type": "object",
                          "additionalProperties": false,
                          "required": [
                            "matches_in_round",
                            "legs"
                          ],
                          "properties": {
                            "matches_in_round": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 128
                            },
                            "legs": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 2
                            }
                          }
                        }
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "third_place_final": {
                    "type": "boolean"
                  },
                  "third_place_legs": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 2
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "tie_allowed": {
                    "type": "boolean"
                  },
                  "extra_time_minutes": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 30
                  },
                  "penalties": {
                    "type": "boolean"
                  },
                  "tiebreakers": {
                    "anyOf": [
                      {
                        "type": "array",
                        "minItems": 1,
                        "maxItems": 6,
                        "items": {
                          "type": "string",
                          "enum": [
                            "head_to_head",
                            "head_to_head_goals_for",
                            "goal_difference",
                            "goals_for",
                            "wins",
                            "disciplinary"
                          ]
                        }
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "points_import_phase_id": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "points_import_mode": {
                    "type": "string",
                    "enum": [
                      "full",
                      "half_up",
                      "half_down",
                      "none"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Classifiche prima e dopo",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "tournament_id",
                    "phase_id",
                    "groups",
                    "summary",
                    "preview_token",
                    "confirmation_required"
                  ],
                  "properties": {
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "phase_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "groups": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "group_id",
                          "group_label",
                          "rows"
                        ],
                        "properties": {
                          "group_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "group_label": {
                            "type": "string"
                          },
                          "rows": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "team_id",
                                "team_name",
                                "before",
                                "after"
                              ],
                              "properties": {
                                "team_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "team_name": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "before": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "required": [
                                        "position",
                                        "points",
                                        "pending"
                                      ],
                                      "properties": {
                                        "position": {
                                          "type": "integer",
                                          "minimum": 1
                                        },
                                        "points": {
                                          "type": "integer"
                                        },
                                        "pending": {
                                          "type": "boolean"
                                        }
                                      }
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "after": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "required": [
                                        "position",
                                        "points",
                                        "pending"
                                      ],
                                      "properties": {
                                        "position": {
                                          "type": "integer",
                                          "minimum": 1
                                        },
                                        "points": {
                                          "type": "integer"
                                        },
                                        "pending": {
                                          "type": "boolean"
                                        }
                                      }
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              }
                            }
                          }
                        }
                      }
                    },
                    "summary": {
                      "type": "object",
                      "required": [
                        "groups_changed",
                        "teams_changed",
                        "official_matches"
                      ],
                      "properties": {
                        "groups_changed": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "teams_changed": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "official_matches": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    },
                    "preview_token": {
                      "type": "string",
                      "pattern": "^[0-9a-f]{64}$"
                    },
                    "confirmation_required": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/tournaments/{tournamentId}/phases/{phaseId}/groups/{groupId}/adjustments": {
      "get": {
        "tags": [
          "admin",
          "phase-settings"
        ],
        "summary": "Quadro del girone: stato delle squadre, bonus/malus, penalizzazioni disciplinari",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          },
          {
            "name": "phaseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          },
          {
            "name": "groupId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Quadro del girone",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "tournament_id",
                    "phase_id",
                    "group_id",
                    "group_label",
                    "teams",
                    "adjustments",
                    "discipline_adjustments",
                    "official_matches"
                  ],
                  "properties": {
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "phase_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "group_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "group_label": {
                      "type": "string"
                    },
                    "teams": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "team_id",
                          "team_name",
                          "status",
                          "effect",
                          "replaced_by_team_id",
                          "replaces_team_id",
                          "unplayed_matches",
                          "version",
                          "history"
                        ],
                        "properties": {
                          "team_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "team_name": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "active",
                              "withdrawn",
                              "replaced"
                            ]
                          },
                          "effect": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "keep_played",
                                  "void_all"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "replaced_by_team_id": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "replaces_team_id": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "unplayed_matches": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "history": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "status",
                                "effect",
                                "reason",
                                "at",
                                "by"
                              ],
                              "properties": {
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "active",
                                    "withdrawn",
                                    "replaced"
                                  ]
                                },
                                "effect": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "enum": [
                                        "keep_played",
                                        "void_all"
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "reason": {
                                  "type": "string"
                                },
                                "at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "by": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              }
                            }
                          }
                        }
                      }
                    },
                    "adjustments": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "team_id",
                          "team_name",
                          "points_delta",
                          "reason",
                          "source",
                          "source_ref",
                          "public_note",
                          "created_at",
                          "created_by",
                          "removed_at",
                          "removed_by",
                          "removal_reason"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "team_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "team_name": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "points_delta": {
                            "type": "integer"
                          },
                          "reason": {
                            "type": "string"
                          },
                          "source": {
                            "type": "string",
                            "enum": [
                              "manual",
                              "fine",
                              "decision"
                            ]
                          },
                          "source_ref": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "public_note": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "created_by": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "removed_at": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "removed_by": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "removal_reason": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        }
                      }
                    },
                    "discipline_adjustments": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "team_id",
                          "points_delta",
                          "reason"
                        ],
                        "properties": {
                          "team_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "points_delta": {
                            "type": "integer"
                          },
                          "reason": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "official_matches": {
                      "type": "integer",
                      "minimum": 0
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "admin",
          "phase-settings"
        ],
        "summary": "Aggiunge un bonus/malus in classifica (idempotente sull’id scelto dal client)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          },
          {
            "name": "phaseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          },
          {
            "name": "groupId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "adjustment_id",
                  "team_id",
                  "points_delta",
                  "reason",
                  "source",
                  "source_ref",
                  "public_note"
                ],
                "properties": {
                  "adjustment_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "team_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "points_delta": {
                    "type": "integer",
                    "minimum": -100,
                    "maximum": 100,
                    "not": {
                      "const": 0
                    }
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 500
                  },
                  "source": {
                    "type": "string",
                    "enum": [
                      "manual",
                      "fine",
                      "decision"
                    ]
                  },
                  "source_ref": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "public_note": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 3,
                        "maxLength": 140
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "preview_token": {
                    "type": "string",
                    "pattern": "^[0-9a-f]{64}$"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Quadro del girone aggiornato",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "tournament_id",
                    "phase_id",
                    "group_id",
                    "group_label",
                    "teams",
                    "adjustments",
                    "discipline_adjustments",
                    "official_matches"
                  ],
                  "properties": {
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "phase_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "group_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "group_label": {
                      "type": "string"
                    },
                    "teams": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "team_id",
                          "team_name",
                          "status",
                          "effect",
                          "replaced_by_team_id",
                          "replaces_team_id",
                          "unplayed_matches",
                          "version",
                          "history"
                        ],
                        "properties": {
                          "team_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "team_name": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "active",
                              "withdrawn",
                              "replaced"
                            ]
                          },
                          "effect": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "keep_played",
                                  "void_all"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "replaced_by_team_id": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "replaces_team_id": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "unplayed_matches": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "history": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "status",
                                "effect",
                                "reason",
                                "at",
                                "by"
                              ],
                              "properties": {
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "active",
                                    "withdrawn",
                                    "replaced"
                                  ]
                                },
                                "effect": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "enum": [
                                        "keep_played",
                                        "void_all"
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "reason": {
                                  "type": "string"
                                },
                                "at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "by": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              }
                            }
                          }
                        }
                      }
                    },
                    "adjustments": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "team_id",
                          "team_name",
                          "points_delta",
                          "reason",
                          "source",
                          "source_ref",
                          "public_note",
                          "created_at",
                          "created_by",
                          "removed_at",
                          "removed_by",
                          "removal_reason"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "team_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "team_name": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "points_delta": {
                            "type": "integer"
                          },
                          "reason": {
                            "type": "string"
                          },
                          "source": {
                            "type": "string",
                            "enum": [
                              "manual",
                              "fine",
                              "decision"
                            ]
                          },
                          "source_ref": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "public_note": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "created_by": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "removed_at": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "removed_by": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "removal_reason": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        }
                      }
                    },
                    "discipline_adjustments": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "team_id",
                          "points_delta",
                          "reason"
                        ],
                        "properties": {
                          "team_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "points_delta": {
                            "type": "integer"
                          },
                          "reason": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "official_matches": {
                      "type": "integer",
                      "minimum": 0
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/tournaments/{tournamentId}/phases/{phaseId}/groups/{groupId}/adjustments/{adjustmentId}": {
      "delete": {
        "tags": [
          "admin",
          "phase-settings"
        ],
        "summary": "Toglie un bonus/malus (resta nella storia con il motivo)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          },
          {
            "name": "phaseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          },
          {
            "name": "groupId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          },
          {
            "name": "adjustmentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "reason"
                ],
                "properties": {
                  "reason": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 500
                  },
                  "preview_token": {
                    "type": "string",
                    "pattern": "^[0-9a-f]{64}$"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Quadro del girone aggiornato",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "tournament_id",
                    "phase_id",
                    "group_id",
                    "group_label",
                    "teams",
                    "adjustments",
                    "discipline_adjustments",
                    "official_matches"
                  ],
                  "properties": {
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "phase_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "group_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "group_label": {
                      "type": "string"
                    },
                    "teams": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "team_id",
                          "team_name",
                          "status",
                          "effect",
                          "replaced_by_team_id",
                          "replaces_team_id",
                          "unplayed_matches",
                          "version",
                          "history"
                        ],
                        "properties": {
                          "team_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "team_name": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "active",
                              "withdrawn",
                              "replaced"
                            ]
                          },
                          "effect": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "keep_played",
                                  "void_all"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "replaced_by_team_id": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "replaces_team_id": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "unplayed_matches": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "history": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "status",
                                "effect",
                                "reason",
                                "at",
                                "by"
                              ],
                              "properties": {
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "active",
                                    "withdrawn",
                                    "replaced"
                                  ]
                                },
                                "effect": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "enum": [
                                        "keep_played",
                                        "void_all"
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "reason": {
                                  "type": "string"
                                },
                                "at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "by": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              }
                            }
                          }
                        }
                      }
                    },
                    "adjustments": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "team_id",
                          "team_name",
                          "points_delta",
                          "reason",
                          "source",
                          "source_ref",
                          "public_note",
                          "created_at",
                          "created_by",
                          "removed_at",
                          "removed_by",
                          "removal_reason"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "team_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "team_name": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "points_delta": {
                            "type": "integer"
                          },
                          "reason": {
                            "type": "string"
                          },
                          "source": {
                            "type": "string",
                            "enum": [
                              "manual",
                              "fine",
                              "decision"
                            ]
                          },
                          "source_ref": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "public_note": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "created_by": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "removed_at": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "removed_by": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "removal_reason": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        }
                      }
                    },
                    "discipline_adjustments": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "team_id",
                          "points_delta",
                          "reason"
                        ],
                        "properties": {
                          "team_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "points_delta": {
                            "type": "integer"
                          },
                          "reason": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "official_matches": {
                      "type": "integer",
                      "minimum": 0
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/tournaments/{tournamentId}/phases/{phaseId}/groups/{groupId}/preview": {
      "post": {
        "tags": [
          "admin",
          "phase-settings"
        ],
        "summary": "Anteprima dell’effetto di un ritiro, reintegro, sostituzione o bonus/malus",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          },
          {
            "name": "phaseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          },
          {
            "name": "groupId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "operation"
                ],
                "properties": {
                  "operation": {
                    "type": "string",
                    "enum": [
                      "withdraw",
                      "reinstate",
                      "replace",
                      "adjustment_add",
                      "adjustment_remove"
                    ]
                  },
                  "team_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "effect": {
                    "type": "string",
                    "enum": [
                      "keep_played",
                      "void_all"
                    ]
                  },
                  "replacement_team_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "points_delta": {
                    "type": "integer",
                    "minimum": -100,
                    "maximum": 100
                  },
                  "adjustment_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Classifica prima e dopo",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "tournament_id",
                    "phase_id",
                    "groups",
                    "summary",
                    "preview_token",
                    "confirmation_required"
                  ],
                  "properties": {
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "phase_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "groups": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "group_id",
                          "group_label",
                          "rows"
                        ],
                        "properties": {
                          "group_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "group_label": {
                            "type": "string"
                          },
                          "rows": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "team_id",
                                "team_name",
                                "before",
                                "after"
                              ],
                              "properties": {
                                "team_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "team_name": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "before": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "required": [
                                        "position",
                                        "points",
                                        "pending"
                                      ],
                                      "properties": {
                                        "position": {
                                          "type": "integer",
                                          "minimum": 1
                                        },
                                        "points": {
                                          "type": "integer"
                                        },
                                        "pending": {
                                          "type": "boolean"
                                        }
                                      }
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "after": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "required": [
                                        "position",
                                        "points",
                                        "pending"
                                      ],
                                      "properties": {
                                        "position": {
                                          "type": "integer",
                                          "minimum": 1
                                        },
                                        "points": {
                                          "type": "integer"
                                        },
                                        "pending": {
                                          "type": "boolean"
                                        }
                                      }
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              }
                            }
                          }
                        }
                      }
                    },
                    "summary": {
                      "type": "object",
                      "required": [
                        "groups_changed",
                        "teams_changed",
                        "official_matches"
                      ],
                      "properties": {
                        "groups_changed": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "teams_changed": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "official_matches": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    },
                    "preview_token": {
                      "type": "string",
                      "pattern": "^[0-9a-f]{64}$"
                    },
                    "confirmation_required": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/tournaments/{tournamentId}/phases/{phaseId}/groups/{groupId}/teams/{teamId}/withdraw": {
      "post": {
        "tags": [
          "admin",
          "phase-settings"
        ],
        "summary": "Ritira la squadra dal girone (N-23: effetto congelato sulla classifica)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          },
          {
            "name": "phaseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          },
          {
            "name": "groupId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          },
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "reason",
                  "expected_version"
                ],
                "properties": {
                  "reason": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 500
                  },
                  "expected_version": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "preview_token": {
                    "type": "string",
                    "pattern": "^[0-9a-f]{64}$"
                  },
                  "effect": {
                    "type": "string",
                    "enum": [
                      "keep_played",
                      "void_all"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Quadro del girone aggiornato",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "tournament_id",
                    "phase_id",
                    "group_id",
                    "group_label",
                    "teams",
                    "adjustments",
                    "discipline_adjustments",
                    "official_matches"
                  ],
                  "properties": {
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "phase_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "group_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "group_label": {
                      "type": "string"
                    },
                    "teams": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "team_id",
                          "team_name",
                          "status",
                          "effect",
                          "replaced_by_team_id",
                          "replaces_team_id",
                          "unplayed_matches",
                          "version",
                          "history"
                        ],
                        "properties": {
                          "team_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "team_name": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "active",
                              "withdrawn",
                              "replaced"
                            ]
                          },
                          "effect": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "keep_played",
                                  "void_all"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "replaced_by_team_id": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "replaces_team_id": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "unplayed_matches": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "history": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "status",
                                "effect",
                                "reason",
                                "at",
                                "by"
                              ],
                              "properties": {
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "active",
                                    "withdrawn",
                                    "replaced"
                                  ]
                                },
                                "effect": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "enum": [
                                        "keep_played",
                                        "void_all"
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "reason": {
                                  "type": "string"
                                },
                                "at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "by": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              }
                            }
                          }
                        }
                      }
                    },
                    "adjustments": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "team_id",
                          "team_name",
                          "points_delta",
                          "reason",
                          "source",
                          "source_ref",
                          "public_note",
                          "created_at",
                          "created_by",
                          "removed_at",
                          "removed_by",
                          "removal_reason"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "team_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "team_name": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "points_delta": {
                            "type": "integer"
                          },
                          "reason": {
                            "type": "string"
                          },
                          "source": {
                            "type": "string",
                            "enum": [
                              "manual",
                              "fine",
                              "decision"
                            ]
                          },
                          "source_ref": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "public_note": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "created_by": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "removed_at": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "removed_by": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "removal_reason": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        }
                      }
                    },
                    "discipline_adjustments": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "team_id",
                          "points_delta",
                          "reason"
                        ],
                        "properties": {
                          "team_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "points_delta": {
                            "type": "integer"
                          },
                          "reason": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "official_matches": {
                      "type": "integer",
                      "minimum": 0
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/tournaments/{tournamentId}/phases/{phaseId}/groups/{groupId}/teams/{teamId}/reinstate": {
      "post": {
        "tags": [
          "admin",
          "phase-settings"
        ],
        "summary": "Reintegra una squadra ritirata",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          },
          {
            "name": "phaseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          },
          {
            "name": "groupId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          },
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "reason",
                  "expected_version"
                ],
                "properties": {
                  "reason": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 500
                  },
                  "expected_version": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "preview_token": {
                    "type": "string",
                    "pattern": "^[0-9a-f]{64}$"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Quadro del girone aggiornato",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "tournament_id",
                    "phase_id",
                    "group_id",
                    "group_label",
                    "teams",
                    "adjustments",
                    "discipline_adjustments",
                    "official_matches"
                  ],
                  "properties": {
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "phase_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "group_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "group_label": {
                      "type": "string"
                    },
                    "teams": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "team_id",
                          "team_name",
                          "status",
                          "effect",
                          "replaced_by_team_id",
                          "replaces_team_id",
                          "unplayed_matches",
                          "version",
                          "history"
                        ],
                        "properties": {
                          "team_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "team_name": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "active",
                              "withdrawn",
                              "replaced"
                            ]
                          },
                          "effect": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "keep_played",
                                  "void_all"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "replaced_by_team_id": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "replaces_team_id": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "unplayed_matches": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "history": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "status",
                                "effect",
                                "reason",
                                "at",
                                "by"
                              ],
                              "properties": {
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "active",
                                    "withdrawn",
                                    "replaced"
                                  ]
                                },
                                "effect": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "enum": [
                                        "keep_played",
                                        "void_all"
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "reason": {
                                  "type": "string"
                                },
                                "at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "by": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              }
                            }
                          }
                        }
                      }
                    },
                    "adjustments": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "team_id",
                          "team_name",
                          "points_delta",
                          "reason",
                          "source",
                          "source_ref",
                          "public_note",
                          "created_at",
                          "created_by",
                          "removed_at",
                          "removed_by",
                          "removal_reason"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "team_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "team_name": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "points_delta": {
                            "type": "integer"
                          },
                          "reason": {
                            "type": "string"
                          },
                          "source": {
                            "type": "string",
                            "enum": [
                              "manual",
                              "fine",
                              "decision"
                            ]
                          },
                          "source_ref": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "public_note": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "created_by": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "removed_at": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "removed_by": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "removal_reason": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        }
                      }
                    },
                    "discipline_adjustments": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "team_id",
                          "points_delta",
                          "reason"
                        ],
                        "properties": {
                          "team_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "points_delta": {
                            "type": "integer"
                          },
                          "reason": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "official_matches": {
                      "type": "integer",
                      "minimum": 0
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/tournaments/{tournamentId}/phases/{phaseId}/groups/{groupId}/teams/{teamId}/replace": {
      "post": {
        "tags": [
          "admin",
          "phase-settings"
        ],
        "summary": "Sostituisce la squadra: la subentrante eredita le gare non disputate, non i punti",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          },
          {
            "name": "phaseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          },
          {
            "name": "groupId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          },
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "reason",
                  "expected_version",
                  "replacement_team_id"
                ],
                "properties": {
                  "reason": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 500
                  },
                  "expected_version": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "preview_token": {
                    "type": "string",
                    "pattern": "^[0-9a-f]{64}$"
                  },
                  "replacement_team_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Quadro del girone aggiornato",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "tournament_id",
                    "phase_id",
                    "group_id",
                    "group_label",
                    "teams",
                    "adjustments",
                    "discipline_adjustments",
                    "official_matches"
                  ],
                  "properties": {
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "phase_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "group_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "group_label": {
                      "type": "string"
                    },
                    "teams": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "team_id",
                          "team_name",
                          "status",
                          "effect",
                          "replaced_by_team_id",
                          "replaces_team_id",
                          "unplayed_matches",
                          "version",
                          "history"
                        ],
                        "properties": {
                          "team_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "team_name": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "active",
                              "withdrawn",
                              "replaced"
                            ]
                          },
                          "effect": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "keep_played",
                                  "void_all"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "replaced_by_team_id": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "replaces_team_id": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "unplayed_matches": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "history": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "status",
                                "effect",
                                "reason",
                                "at",
                                "by"
                              ],
                              "properties": {
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "active",
                                    "withdrawn",
                                    "replaced"
                                  ]
                                },
                                "effect": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "enum": [
                                        "keep_played",
                                        "void_all"
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "reason": {
                                  "type": "string"
                                },
                                "at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "by": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              }
                            }
                          }
                        }
                      }
                    },
                    "adjustments": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "team_id",
                          "team_name",
                          "points_delta",
                          "reason",
                          "source",
                          "source_ref",
                          "public_note",
                          "created_at",
                          "created_by",
                          "removed_at",
                          "removed_by",
                          "removal_reason"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "team_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "team_name": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "points_delta": {
                            "type": "integer"
                          },
                          "reason": {
                            "type": "string"
                          },
                          "source": {
                            "type": "string",
                            "enum": [
                              "manual",
                              "fine",
                              "decision"
                            ]
                          },
                          "source_ref": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "public_note": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "created_by": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "removed_at": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "removed_by": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "removal_reason": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        }
                      }
                    },
                    "discipline_adjustments": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "team_id",
                          "points_delta",
                          "reason"
                        ],
                        "properties": {
                          "team_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "points_delta": {
                            "type": "integer"
                          },
                          "reason": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "official_matches": {
                      "type": "integer",
                      "minimum": 0
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/tournaments/{tournamentId}/phases/{phaseId}/rosters/{teamId}": {
      "get": {
        "tags": [
          "admin",
          "phase-settings"
        ],
        "summary": "Rosa della squadra per la fase (null: vale la rosa della squadra)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          },
          {
            "name": "phaseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          },
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Rosa di fase",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "tournament_id",
                    "phase_id",
                    "team_id",
                    "player_ids",
                    "version",
                    "updated_at"
                  ],
                  "properties": {
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "phase_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "team_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "player_ids": {
                      "anyOf": [
                        {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "format": "uuid"
                          }
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updated_at": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "admin",
          "phase-settings"
        ],
        "summary": "Salva la rosa di fase (vuota: nessuna rosa propria)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          },
          {
            "name": "phaseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          },
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "player_ids",
                  "expected_version"
                ],
                "properties": {
                  "player_ids": {
                    "type": "array",
                    "maxItems": 60,
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "expected_version": {
                    "type": "integer",
                    "minimum": 0
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Rosa di fase salvata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "tournament_id",
                    "phase_id",
                    "team_id",
                    "player_ids",
                    "version",
                    "updated_at"
                  ],
                  "properties": {
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "phase_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "team_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "player_ids": {
                      "anyOf": [
                        {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "format": "uuid"
                          }
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updated_at": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/tournaments/{tournamentId}/phase-policy": {
      "get": {
        "tags": [
          "admin",
          "phase-settings"
        ],
        "summary": "Effetto di default dei ritiri nel torneo (N-23)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Politica dei ritiri",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "tournament_id",
                    "withdrawal_effect",
                    "source",
                    "version"
                  ],
                  "properties": {
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "withdrawal_effect": {
                      "type": "string",
                      "enum": [
                        "keep_played",
                        "void_all"
                      ]
                    },
                    "source": {
                      "type": "string",
                      "enum": [
                        "tournament",
                        "default"
                      ]
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "admin",
          "phase-settings"
        ],
        "summary": "Salva l’effetto di default dei ritiri (vale per i ritiri futuri)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "withdrawal_effect",
                  "expected_version"
                ],
                "properties": {
                  "withdrawal_effect": {
                    "type": "string",
                    "enum": [
                      "keep_played",
                      "void_all"
                    ]
                  },
                  "expected_version": {
                    "type": "integer",
                    "minimum": 0
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Politica dei ritiri salvata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "tournament_id",
                    "withdrawal_effect",
                    "source",
                    "version"
                  ],
                  "properties": {
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "withdrawal_effect": {
                      "type": "string",
                      "enum": [
                        "keep_played",
                        "void_all"
                      ]
                    },
                    "source": {
                      "type": "string",
                      "enum": [
                        "tournament",
                        "default"
                      ]
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/public/tournaments/{tournamentId}/groups/{groupId}/standings-notes": {
      "get": {
        "tags": [
          "public",
          "phase-settings"
        ],
        "summary": "Note sotto la classifica del girone: criteri, ritiri e bonus/malus",
        "security": [
          {
            "ApiKey": [
              "read:public.standings"
            ]
          }
        ],
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          },
          {
            "name": "groupId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "public",
        "x-rate-limit-tier": "public_widget",
        "x-audit-required": false,
        "responses": {
          "200": {
            "description": "Note della classifica",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "tournament_id",
                    "group_id",
                    "tiebreakers",
                    "teams",
                    "adjustments"
                  ],
                  "properties": {
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "group_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "tiebreakers": {
                      "type": "object",
                      "required": [
                        "chain",
                        "to_confirm"
                      ],
                      "properties": {
                        "chain": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "to_confirm": {
                          "type": "boolean"
                        }
                      }
                    },
                    "teams": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "team_id",
                          "team_name",
                          "status",
                          "effect",
                          "replaced_by_team_name"
                        ],
                        "properties": {
                          "team_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "team_name": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "withdrawn",
                              "replaced"
                            ]
                          },
                          "effect": {
                            "type": "string",
                            "enum": [
                              "keep_played",
                              "void_all"
                            ]
                          },
                          "replaced_by_team_name": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        }
                      }
                    },
                    "adjustments": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "team_id",
                          "team_name",
                          "points_delta",
                          "note"
                        ],
                        "properties": {
                          "team_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "team_name": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "points_delta": {
                            "type": "integer"
                          },
                          "note": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/tournaments/{tournamentId}/phases/{phaseId}/calendar/preview": {
      "post": {
        "summary": "Admin preview — per-group calendar of a phase (Berger, legs, byes, conflicts **, soft warnings *) and its preview_token; no writes.",
        "tags": [
          "admin",
          "sport",
          "tournament",
          "calendar"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "phaseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "phase_type": {
                    "type": "string",
                    "enum": [
                      "single_leg",
                      "double_leg",
                      "repeated",
                      "knockout"
                    ]
                  },
                  "repetitions": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10
                  },
                  "group_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "mode": {
                    "type": "string",
                    "enum": [
                      "generate",
                      "fill"
                    ]
                  },
                  "start_date": {
                    "type": "string",
                    "format": "date"
                  },
                  "matchday_interval_days": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 30
                  },
                  "kickoff_slots": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "time": {
                          "type": "string"
                        },
                        "field_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "time",
                        "field_id"
                      ]
                    }
                  },
                  "timezone_offset": {
                    "type": "string"
                  },
                  "blackout_dates": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "date"
                    }
                  },
                  "team_blackouts": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "team_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "date": {
                          "type": "string",
                          "format": "date"
                        },
                        "reason": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "team_id",
                        "date"
                      ]
                    }
                  },
                  "field_blackouts": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "field_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "date": {
                          "type": "string",
                          "format": "date"
                        },
                        "reason": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "field_id",
                        "date"
                      ]
                    }
                  },
                  "pause_weekdays": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 7
                    }
                  },
                  "team_preferences": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "team_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "weekdays": {
                          "type": "array",
                          "items": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 7
                          }
                        },
                        "field_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "team_id"
                      ]
                    }
                  }
                },
                "required": [
                  "phase_type",
                  "start_date",
                  "matchday_interval_days",
                  "kickoff_slots"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "phase_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "phase_label": {
                      "type": "string"
                    },
                    "mode": {
                      "type": "string",
                      "enum": [
                        "generate",
                        "fill"
                      ]
                    },
                    "phase_type": {
                      "type": "string",
                      "enum": [
                        "single_leg",
                        "double_leg",
                        "repeated",
                        "knockout"
                      ]
                    },
                    "legs": {
                      "type": "integer"
                    },
                    "generated_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "preview_token": {
                      "type": "string"
                    },
                    "groups": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "group_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "label": {
                            "type": "string"
                          },
                          "team_ids": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "format": "uuid"
                            }
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "empty",
                              "generated",
                              "locked"
                            ]
                          },
                          "existing_match_count": {
                            "type": "integer"
                          },
                          "played_match_count": {
                            "type": "integer"
                          },
                          "planned": {
                            "type": "boolean"
                          },
                          "skip_reason": {
                            "oneOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "not_enough_teams",
                                  "already_generated"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "group_id",
                          "label",
                          "team_ids",
                          "status",
                          "existing_match_count",
                          "played_match_count",
                          "planned",
                          "skip_reason"
                        ]
                      }
                    },
                    "matchdays": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "round_index": {
                            "type": "integer"
                          },
                          "leg_index": {
                            "type": "integer"
                          },
                          "label": {
                            "type": "string"
                          },
                          "scheduled_date": {
                            "type": "string",
                            "format": "date"
                          },
                          "soft_flags": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "pause_weekday",
                                "home_preference"
                              ]
                            }
                          }
                        },
                        "required": [
                          "round_index",
                          "leg_index",
                          "label",
                          "scheduled_date",
                          "soft_flags"
                        ]
                      }
                    },
                    "fixtures": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "sequence": {
                            "type": "integer"
                          },
                          "round_index": {
                            "type": "integer"
                          },
                          "leg_index": {
                            "type": "integer"
                          },
                          "group_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "home_team_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "away_team_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "scheduled_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "field_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "conflict_codes": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "soft_flags": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "pause_weekday",
                                "home_preference"
                              ]
                            }
                          }
                        },
                        "required": [
                          "sequence",
                          "round_index",
                          "leg_index",
                          "group_id",
                          "home_team_id",
                          "away_team_id",
                          "scheduled_at",
                          "field_id",
                          "conflict_codes",
                          "soft_flags"
                        ]
                      }
                    },
                    "byes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "round_index": {
                            "type": "integer"
                          },
                          "group_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "team_id": {
                            "type": "string",
                            "format": "uuid"
                          }
                        },
                        "required": [
                          "round_index",
                          "group_id",
                          "team_id"
                        ]
                      }
                    },
                    "home_away_balance": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "team_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "group_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "home": {
                            "type": "integer"
                          },
                          "away": {
                            "type": "integer"
                          },
                          "byes": {
                            "type": "integer"
                          }
                        },
                        "required": [
                          "team_id",
                          "group_id",
                          "home",
                          "away",
                          "byes"
                        ]
                      }
                    },
                    "conflicts": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AdminTournamentCalendarPreviewConflict"
                      }
                    },
                    "consequences": {
                      "type": "object",
                      "properties": {
                        "creates_matches": {
                          "type": "integer"
                        },
                        "removes_matches": {
                          "type": "integer"
                        },
                        "creates_rounds": {
                          "type": "integer"
                        },
                        "requires_confirmation": {
                          "type": "boolean"
                        },
                        "blocked_by_played_matches": {
                          "type": "boolean"
                        },
                        "hard_conflicts": {
                          "type": "integer"
                        },
                        "soft_warnings": {
                          "type": "integer"
                        }
                      },
                      "required": [
                        "creates_matches",
                        "removes_matches",
                        "creates_rounds",
                        "requires_confirmation",
                        "blocked_by_played_matches",
                        "hard_conflicts",
                        "soft_warnings"
                      ]
                    }
                  },
                  "required": [
                    "tournament_id",
                    "phase_id",
                    "phase_label",
                    "mode",
                    "phase_type",
                    "legs",
                    "generated_at",
                    "preview_token",
                    "groups",
                    "matchdays",
                    "fixtures",
                    "byes",
                    "home_away_balance",
                    "conflicts",
                    "consequences"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Lacks tournament.manage",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Tournament, phase or group not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Stale preview, played or reported matches, regeneration or conflicts not confirmed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Knockout phase, groups without teams, nothing to fill",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/tournaments/{tournamentId}/phases/{phaseId}/calendar/generate": {
      "post": {
        "summary": "Admin generate — write the previewed phase calendar (matches with group_id and phase rounds). Replaces only unplayed matches, with confirm_regenerate.",
        "tags": [
          "admin",
          "sport",
          "tournament",
          "calendar"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "phaseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "phase_type": {
                    "type": "string",
                    "enum": [
                      "single_leg",
                      "double_leg",
                      "repeated",
                      "knockout"
                    ]
                  },
                  "repetitions": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10
                  },
                  "group_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "start_date": {
                    "type": "string",
                    "format": "date"
                  },
                  "matchday_interval_days": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 30
                  },
                  "kickoff_slots": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "time": {
                          "type": "string"
                        },
                        "field_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "time",
                        "field_id"
                      ]
                    }
                  },
                  "timezone_offset": {
                    "type": "string"
                  },
                  "blackout_dates": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "date"
                    }
                  },
                  "team_blackouts": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "team_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "date": {
                          "type": "string",
                          "format": "date"
                        },
                        "reason": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "team_id",
                        "date"
                      ]
                    }
                  },
                  "field_blackouts": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "field_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "date": {
                          "type": "string",
                          "format": "date"
                        },
                        "reason": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "field_id",
                        "date"
                      ]
                    }
                  },
                  "pause_weekdays": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 7
                    }
                  },
                  "team_preferences": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "team_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "weekdays": {
                          "type": "array",
                          "items": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 7
                          }
                        },
                        "field_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "team_id"
                      ]
                    }
                  },
                  "preview_token": {
                    "type": "string",
                    "pattern": "^[0-9a-f]{64}$"
                  },
                  "confirm_regenerate": {
                    "type": "boolean"
                  },
                  "accept_conflicts": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "phase_type",
                  "start_date",
                  "matchday_interval_days",
                  "kickoff_slots",
                  "preview_token"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "preview": {
                      "type": "object",
                      "properties": {
                        "tournament_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "phase_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "phase_label": {
                          "type": "string"
                        },
                        "mode": {
                          "type": "string",
                          "enum": [
                            "generate",
                            "fill"
                          ]
                        },
                        "phase_type": {
                          "type": "string",
                          "enum": [
                            "single_leg",
                            "double_leg",
                            "repeated",
                            "knockout"
                          ]
                        },
                        "legs": {
                          "type": "integer"
                        },
                        "generated_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "preview_token": {
                          "type": "string"
                        },
                        "groups": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "group_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "label": {
                                "type": "string"
                              },
                              "team_ids": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "format": "uuid"
                                }
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "empty",
                                  "generated",
                                  "locked"
                                ]
                              },
                              "existing_match_count": {
                                "type": "integer"
                              },
                              "played_match_count": {
                                "type": "integer"
                              },
                              "planned": {
                                "type": "boolean"
                              },
                              "skip_reason": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "enum": [
                                      "not_enough_teams",
                                      "already_generated"
                                    ]
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "group_id",
                              "label",
                              "team_ids",
                              "status",
                              "existing_match_count",
                              "played_match_count",
                              "planned",
                              "skip_reason"
                            ]
                          }
                        },
                        "matchdays": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "round_index": {
                                "type": "integer"
                              },
                              "leg_index": {
                                "type": "integer"
                              },
                              "label": {
                                "type": "string"
                              },
                              "scheduled_date": {
                                "type": "string",
                                "format": "date"
                              },
                              "soft_flags": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "pause_weekday",
                                    "home_preference"
                                  ]
                                }
                              }
                            },
                            "required": [
                              "round_index",
                              "leg_index",
                              "label",
                              "scheduled_date",
                              "soft_flags"
                            ]
                          }
                        },
                        "fixtures": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "sequence": {
                                "type": "integer"
                              },
                              "round_index": {
                                "type": "integer"
                              },
                              "leg_index": {
                                "type": "integer"
                              },
                              "group_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "home_team_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "away_team_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "scheduled_at": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "field_id": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "conflict_codes": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "soft_flags": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "pause_weekday",
                                    "home_preference"
                                  ]
                                }
                              }
                            },
                            "required": [
                              "sequence",
                              "round_index",
                              "leg_index",
                              "group_id",
                              "home_team_id",
                              "away_team_id",
                              "scheduled_at",
                              "field_id",
                              "conflict_codes",
                              "soft_flags"
                            ]
                          }
                        },
                        "byes": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "round_index": {
                                "type": "integer"
                              },
                              "group_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "team_id": {
                                "type": "string",
                                "format": "uuid"
                              }
                            },
                            "required": [
                              "round_index",
                              "group_id",
                              "team_id"
                            ]
                          }
                        },
                        "home_away_balance": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "team_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "group_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "home": {
                                "type": "integer"
                              },
                              "away": {
                                "type": "integer"
                              },
                              "byes": {
                                "type": "integer"
                              }
                            },
                            "required": [
                              "team_id",
                              "group_id",
                              "home",
                              "away",
                              "byes"
                            ]
                          }
                        },
                        "conflicts": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/AdminTournamentCalendarPreviewConflict"
                          }
                        },
                        "consequences": {
                          "type": "object",
                          "properties": {
                            "creates_matches": {
                              "type": "integer"
                            },
                            "removes_matches": {
                              "type": "integer"
                            },
                            "creates_rounds": {
                              "type": "integer"
                            },
                            "requires_confirmation": {
                              "type": "boolean"
                            },
                            "blocked_by_played_matches": {
                              "type": "boolean"
                            },
                            "hard_conflicts": {
                              "type": "integer"
                            },
                            "soft_warnings": {
                              "type": "integer"
                            }
                          },
                          "required": [
                            "creates_matches",
                            "removes_matches",
                            "creates_rounds",
                            "requires_confirmation",
                            "blocked_by_played_matches",
                            "hard_conflicts",
                            "soft_warnings"
                          ]
                        }
                      },
                      "required": [
                        "tournament_id",
                        "phase_id",
                        "phase_label",
                        "mode",
                        "phase_type",
                        "legs",
                        "generated_at",
                        "preview_token",
                        "groups",
                        "matchdays",
                        "fixtures",
                        "byes",
                        "home_away_balance",
                        "conflicts",
                        "consequences"
                      ]
                    },
                    "rounds": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AdminTournamentRoundRow"
                      }
                    },
                    "created_fixtures": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AdminFixtureRow"
                      }
                    },
                    "removed_match_ids": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "format": "uuid"
                      }
                    },
                    "skipped": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AdminTournamentCalendarSkippedFixture"
                      }
                    }
                  },
                  "required": [
                    "preview",
                    "rounds",
                    "created_fixtures",
                    "removed_match_ids",
                    "skipped"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Lacks tournament.manage",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Tournament, phase or group not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Stale preview, played or reported matches, regeneration or conflicts not confirmed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Knockout phase, groups without teams, nothing to fill",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/tournaments/{tournamentId}/phases/{phaseId}/calendar/fill": {
      "post": {
        "summary": "Admin fill — generate the pairings of the phase groups that still have no calendar; never touches existing matches.",
        "tags": [
          "admin",
          "sport",
          "tournament",
          "calendar"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "phaseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "phase_type": {
                    "type": "string",
                    "enum": [
                      "single_leg",
                      "double_leg",
                      "repeated",
                      "knockout"
                    ]
                  },
                  "repetitions": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10
                  },
                  "group_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "start_date": {
                    "type": "string",
                    "format": "date"
                  },
                  "matchday_interval_days": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 30
                  },
                  "kickoff_slots": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "time": {
                          "type": "string"
                        },
                        "field_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "time",
                        "field_id"
                      ]
                    }
                  },
                  "timezone_offset": {
                    "type": "string"
                  },
                  "blackout_dates": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "date"
                    }
                  },
                  "team_blackouts": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "team_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "date": {
                          "type": "string",
                          "format": "date"
                        },
                        "reason": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "team_id",
                        "date"
                      ]
                    }
                  },
                  "field_blackouts": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "field_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "date": {
                          "type": "string",
                          "format": "date"
                        },
                        "reason": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "field_id",
                        "date"
                      ]
                    }
                  },
                  "pause_weekdays": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 7
                    }
                  },
                  "team_preferences": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "team_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "weekdays": {
                          "type": "array",
                          "items": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 7
                          }
                        },
                        "field_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "team_id"
                      ]
                    }
                  },
                  "preview_token": {
                    "type": "string",
                    "pattern": "^[0-9a-f]{64}$"
                  },
                  "confirm_regenerate": {
                    "type": "boolean"
                  },
                  "accept_conflicts": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "phase_type",
                  "start_date",
                  "matchday_interval_days",
                  "kickoff_slots",
                  "preview_token"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "preview": {
                      "type": "object",
                      "properties": {
                        "tournament_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "phase_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "phase_label": {
                          "type": "string"
                        },
                        "mode": {
                          "type": "string",
                          "enum": [
                            "generate",
                            "fill"
                          ]
                        },
                        "phase_type": {
                          "type": "string",
                          "enum": [
                            "single_leg",
                            "double_leg",
                            "repeated",
                            "knockout"
                          ]
                        },
                        "legs": {
                          "type": "integer"
                        },
                        "generated_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "preview_token": {
                          "type": "string"
                        },
                        "groups": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "group_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "label": {
                                "type": "string"
                              },
                              "team_ids": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "format": "uuid"
                                }
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "empty",
                                  "generated",
                                  "locked"
                                ]
                              },
                              "existing_match_count": {
                                "type": "integer"
                              },
                              "played_match_count": {
                                "type": "integer"
                              },
                              "planned": {
                                "type": "boolean"
                              },
                              "skip_reason": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "enum": [
                                      "not_enough_teams",
                                      "already_generated"
                                    ]
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "group_id",
                              "label",
                              "team_ids",
                              "status",
                              "existing_match_count",
                              "played_match_count",
                              "planned",
                              "skip_reason"
                            ]
                          }
                        },
                        "matchdays": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "round_index": {
                                "type": "integer"
                              },
                              "leg_index": {
                                "type": "integer"
                              },
                              "label": {
                                "type": "string"
                              },
                              "scheduled_date": {
                                "type": "string",
                                "format": "date"
                              },
                              "soft_flags": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "pause_weekday",
                                    "home_preference"
                                  ]
                                }
                              }
                            },
                            "required": [
                              "round_index",
                              "leg_index",
                              "label",
                              "scheduled_date",
                              "soft_flags"
                            ]
                          }
                        },
                        "fixtures": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "sequence": {
                                "type": "integer"
                              },
                              "round_index": {
                                "type": "integer"
                              },
                              "leg_index": {
                                "type": "integer"
                              },
                              "group_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "home_team_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "away_team_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "scheduled_at": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "field_id": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "conflict_codes": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "soft_flags": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "pause_weekday",
                                    "home_preference"
                                  ]
                                }
                              }
                            },
                            "required": [
                              "sequence",
                              "round_index",
                              "leg_index",
                              "group_id",
                              "home_team_id",
                              "away_team_id",
                              "scheduled_at",
                              "field_id",
                              "conflict_codes",
                              "soft_flags"
                            ]
                          }
                        },
                        "byes": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "round_index": {
                                "type": "integer"
                              },
                              "group_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "team_id": {
                                "type": "string",
                                "format": "uuid"
                              }
                            },
                            "required": [
                              "round_index",
                              "group_id",
                              "team_id"
                            ]
                          }
                        },
                        "home_away_balance": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "team_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "group_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "home": {
                                "type": "integer"
                              },
                              "away": {
                                "type": "integer"
                              },
                              "byes": {
                                "type": "integer"
                              }
                            },
                            "required": [
                              "team_id",
                              "group_id",
                              "home",
                              "away",
                              "byes"
                            ]
                          }
                        },
                        "conflicts": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/AdminTournamentCalendarPreviewConflict"
                          }
                        },
                        "consequences": {
                          "type": "object",
                          "properties": {
                            "creates_matches": {
                              "type": "integer"
                            },
                            "removes_matches": {
                              "type": "integer"
                            },
                            "creates_rounds": {
                              "type": "integer"
                            },
                            "requires_confirmation": {
                              "type": "boolean"
                            },
                            "blocked_by_played_matches": {
                              "type": "boolean"
                            },
                            "hard_conflicts": {
                              "type": "integer"
                            },
                            "soft_warnings": {
                              "type": "integer"
                            }
                          },
                          "required": [
                            "creates_matches",
                            "removes_matches",
                            "creates_rounds",
                            "requires_confirmation",
                            "blocked_by_played_matches",
                            "hard_conflicts",
                            "soft_warnings"
                          ]
                        }
                      },
                      "required": [
                        "tournament_id",
                        "phase_id",
                        "phase_label",
                        "mode",
                        "phase_type",
                        "legs",
                        "generated_at",
                        "preview_token",
                        "groups",
                        "matchdays",
                        "fixtures",
                        "byes",
                        "home_away_balance",
                        "conflicts",
                        "consequences"
                      ]
                    },
                    "rounds": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AdminTournamentRoundRow"
                      }
                    },
                    "created_fixtures": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AdminFixtureRow"
                      }
                    },
                    "removed_match_ids": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "format": "uuid"
                      }
                    },
                    "skipped": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AdminTournamentCalendarSkippedFixture"
                      }
                    }
                  },
                  "required": [
                    "preview",
                    "rounds",
                    "created_fixtures",
                    "removed_match_ids",
                    "skipped"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired bearer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Lacks tournament.manage",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Tournament, phase or group not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Stale preview, played or reported matches, regeneration or conflicts not confirmed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Knockout phase, groups without teams, nothing to fill",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/tournaments/{tournamentId}/phases/{phaseId}/rounds": {
      "get": {
        "tags": [
          "admin",
          "calendar-ops"
        ],
        "summary": "Admin — matchdays of a phase: date, matches, played and recoveries per matchday; groups and free-calendar state.",
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "phaseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "tournament_id",
                    "phase_id",
                    "phase_label",
                    "phase_kind",
                    "groups",
                    "free_scopes",
                    "rounds"
                  ],
                  "properties": {
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "phase_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "phase_label": {
                      "type": "string"
                    },
                    "phase_kind": {
                      "type": "string",
                      "enum": [
                        "group_stage",
                        "league",
                        "knockout",
                        "placement"
                      ]
                    },
                    "groups": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "group_id",
                          "label",
                          "team_count",
                          "free"
                        ],
                        "properties": {
                          "group_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "label": {
                            "type": "string"
                          },
                          "team_count": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "free": {
                            "type": "boolean"
                          }
                        }
                      }
                    },
                    "free_scopes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "tournament_id",
                          "phase_id",
                          "group_id",
                          "switched_at",
                          "reason"
                        ],
                        "properties": {
                          "tournament_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "phase_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "group_id": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "switched_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "reason": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "rounds": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "number",
                          "round_id",
                          "label",
                          "date",
                          "matches",
                          "played",
                          "recoveries"
                        ],
                        "properties": {
                          "number": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "round_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "label": {
                            "type": "string"
                          },
                          "date": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "date"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "matches": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "played": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "recoveries": {
                            "type": "integer",
                            "minimum": 0
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/tournaments/{tournamentId}/phases/{phaseId}/rounds/structure": {
      "post": {
        "tags": [
          "admin",
          "calendar-ops"
        ],
        "summary": "Admin — create the empty matchdays of a round-robin phase to fill by hand (N-1 per leg, N when the group is odd). Existing matchdays are kept.",
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "phaseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "legs",
                  "first_date"
                ],
                "properties": {
                  "legs": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 4
                  },
                  "rounds": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 60
                  },
                  "first_date": {
                    "type": "string",
                    "format": "date"
                  },
                  "every_days": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 28
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "tournament_id",
                    "phase_id",
                    "rounds_per_leg",
                    "created",
                    "existing"
                  ],
                  "properties": {
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "phase_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "rounds_per_leg": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "created": {
                      "type": "array",
                      "items": {
                        "type": "integer",
                        "minimum": 1
                      }
                    },
                    "existing": {
                      "type": "array",
                      "items": {
                        "type": "integer",
                        "minimum": 1
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/tournaments/{tournamentId}/phases/{phaseId}/rounds/{roundNumber}/datetime": {
      "put": {
        "tags": [
          "admin",
          "calendar-ops"
        ],
        "summary": "Admin — set the date (and optionally the time) of a matchday on all its unplayed matches. Without preview_token answers the preview.",
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "phaseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "roundNumber",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 999
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "date"
                ],
                "properties": {
                  "date": {
                    "type": "string",
                    "format": "date"
                  },
                  "time": {
                    "type": "string",
                    "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
                  },
                  "group_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "preview_token": {
                    "type": "string",
                    "pattern": "^[0-9a-f]{64}$"
                  },
                  "accept_conflicts": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "preview",
                    "applied",
                    "affected_match_ids"
                  ],
                  "properties": {
                    "preview": {
                      "type": "object",
                      "required": [
                        "operation",
                        "tournament_id",
                        "phase_id",
                        "group_id",
                        "changes",
                        "skipped",
                        "consequences",
                        "preview_token"
                      ],
                      "properties": {
                        "operation": {
                          "type": "string",
                          "enum": [
                            "round_datetime",
                            "round_swap",
                            "assign_field",
                            "schedule_dates",
                            "reset",
                            "add_repetition",
                            "remove_repetition"
                          ]
                        },
                        "tournament_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "phase_id": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "group_id": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "changes": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "kind",
                              "match_id",
                              "group_id",
                              "home_team_id",
                              "away_team_id",
                              "from",
                              "to",
                              "conflicts",
                              "warnings"
                            ],
                            "properties": {
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "update",
                                  "create",
                                  "remove"
                                ]
                              },
                              "match_id": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "group_id": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "home_team_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "away_team_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "from": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "required": [
                                      "round_id",
                                      "scheduled_at",
                                      "field_id"
                                    ],
                                    "properties": {
                                      "round_id": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "scheduled_at": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "format": "date-time"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "field_id": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    }
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "to": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "required": [
                                      "round_id",
                                      "scheduled_at",
                                      "field_id"
                                    ],
                                    "properties": {
                                      "round_id": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "scheduled_at": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "format": "date-time"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "field_id": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    }
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "conflicts": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "existing_slot_conflict",
                                    "proposed_slot_conflict",
                                    "field_closed_hours",
                                    "field_dayoff",
                                    "team_double_booked"
                                  ]
                                }
                              },
                              "warnings": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "hours_not_recorded",
                                    "pause_weekday",
                                    "home_preference"
                                  ]
                                }
                              }
                            }
                          }
                        },
                        "skipped": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "match_id",
                              "reason"
                            ],
                            "properties": {
                              "match_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "reason": {
                                "type": "string",
                                "enum": [
                                  "played_or_reported",
                                  "recovery",
                                  "postponed",
                                  "bracket_linked",
                                  "past_date"
                                ]
                              }
                            }
                          }
                        },
                        "consequences": {
                          "type": "object",
                          "required": [
                            "updates",
                            "creations",
                            "removals",
                            "blocking",
                            "conflicts",
                            "warnings"
                          ],
                          "properties": {
                            "updates": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "creations": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "removals": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "blocking": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "conflicts": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "warnings": {
                              "type": "integer",
                              "minimum": 0
                            }
                          }
                        },
                        "preview_token": {
                          "type": "string",
                          "pattern": "^[0-9a-f]{64}$"
                        }
                      }
                    },
                    "applied": {
                      "type": "boolean"
                    },
                    "affected_match_ids": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "format": "uuid"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/tournaments/{tournamentId}/phases/{phaseId}/rounds/{roundNumber}/swap": {
      "post": {
        "tags": [
          "admin",
          "calendar-ops"
        ],
        "summary": "Admin — swap two matchdays of a phase (recoveries keep their original matchday). Without preview_token answers the preview.",
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "phaseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "roundNumber",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 999
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "with_round"
                ],
                "properties": {
                  "with_round": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 999
                  },
                  "group_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "preview_token": {
                    "type": "string",
                    "pattern": "^[0-9a-f]{64}$"
                  },
                  "accept_conflicts": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "preview",
                    "applied",
                    "affected_match_ids"
                  ],
                  "properties": {
                    "preview": {
                      "type": "object",
                      "required": [
                        "operation",
                        "tournament_id",
                        "phase_id",
                        "group_id",
                        "changes",
                        "skipped",
                        "consequences",
                        "preview_token"
                      ],
                      "properties": {
                        "operation": {
                          "type": "string",
                          "enum": [
                            "round_datetime",
                            "round_swap",
                            "assign_field",
                            "schedule_dates",
                            "reset",
                            "add_repetition",
                            "remove_repetition"
                          ]
                        },
                        "tournament_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "phase_id": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "group_id": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "changes": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "kind",
                              "match_id",
                              "group_id",
                              "home_team_id",
                              "away_team_id",
                              "from",
                              "to",
                              "conflicts",
                              "warnings"
                            ],
                            "properties": {
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "update",
                                  "create",
                                  "remove"
                                ]
                              },
                              "match_id": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "group_id": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "home_team_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "away_team_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "from": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "required": [
                                      "round_id",
                                      "scheduled_at",
                                      "field_id"
                                    ],
                                    "properties": {
                                      "round_id": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "scheduled_at": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "format": "date-time"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "field_id": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    }
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "to": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "required": [
                                      "round_id",
                                      "scheduled_at",
                                      "field_id"
                                    ],
                                    "properties": {
                                      "round_id": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "scheduled_at": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "format": "date-time"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "field_id": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    }
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "conflicts": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "existing_slot_conflict",
                                    "proposed_slot_conflict",
                                    "field_closed_hours",
                                    "field_dayoff",
                                    "team_double_booked"
                                  ]
                                }
                              },
                              "warnings": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "hours_not_recorded",
                                    "pause_weekday",
                                    "home_preference"
                                  ]
                                }
                              }
                            }
                          }
                        },
                        "skipped": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "match_id",
                              "reason"
                            ],
                            "properties": {
                              "match_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "reason": {
                                "type": "string",
                                "enum": [
                                  "played_or_reported",
                                  "recovery",
                                  "postponed",
                                  "bracket_linked",
                                  "past_date"
                                ]
                              }
                            }
                          }
                        },
                        "consequences": {
                          "type": "object",
                          "required": [
                            "updates",
                            "creations",
                            "removals",
                            "blocking",
                            "conflicts",
                            "warnings"
                          ],
                          "properties": {
                            "updates": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "creations": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "removals": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "blocking": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "conflicts": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "warnings": {
                              "type": "integer",
                              "minimum": 0
                            }
                          }
                        },
                        "preview_token": {
                          "type": "string",
                          "pattern": "^[0-9a-f]{64}$"
                        }
                      }
                    },
                    "applied": {
                      "type": "boolean"
                    },
                    "affected_match_ids": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "format": "uuid"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/tournaments/{tournamentId}/phases/{phaseId}/rounds/{roundNumber}/matches": {
      "post": {
        "tags": [
          "admin",
          "calendar-ops"
        ],
        "summary": "Admin — add one match to a matchday of the phase.",
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "phaseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "roundNumber",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 999
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "group_id",
                  "home_team_id",
                  "away_team_id",
                  "date",
                  "time",
                  "field_id"
                ],
                "properties": {
                  "group_id": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "home_team_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "away_team_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "date": {
                    "type": "string",
                    "format": "date"
                  },
                  "time": {
                    "type": "string",
                    "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
                  },
                  "field_id": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "accept_conflicts": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "match",
                    "conflicts",
                    "warnings"
                  ],
                  "properties": {
                    "match": {
                      "type": "object",
                      "required": [
                        "match_id",
                        "tenant_id",
                        "tournament_id",
                        "round_id",
                        "group_id",
                        "field_id",
                        "scheduled_at",
                        "schedule_precision",
                        "scheduled_on",
                        "state",
                        "home_team_id",
                        "away_team_id",
                        "version",
                        "etag"
                      ],
                      "properties": {
                        "match_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "tenant_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "tournament_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "round_id": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "group_id": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "field_id": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "scheduled_at": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "date-time"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "schedule_precision": {
                          "type": "string",
                          "enum": [
                            "exact",
                            "date_only",
                            "unknown"
                          ]
                        },
                        "scheduled_on": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "date"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "scheduled",
                            "live",
                            "ended",
                            "report_draft",
                            "report_submitted",
                            "report_official",
                            "corrected",
                            "cancelled",
                            "postponed"
                          ]
                        },
                        "home_team_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "away_team_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "version": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "etag": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    },
                    "conflicts": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "existing_slot_conflict",
                          "proposed_slot_conflict",
                          "field_closed_hours",
                          "field_dayoff",
                          "team_double_booked"
                        ]
                      }
                    },
                    "warnings": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "hours_not_recorded",
                          "pause_weekday",
                          "home_preference"
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/tournaments/{tournamentId}/phases/{phaseId}/repetitions": {
      "post": {
        "tags": [
          "admin",
          "calendar-ops"
        ],
        "summary": "Admin — add a repetition (one more leg, home and away reversed) to the phase groups. Without preview_token answers the preview.",
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "phaseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [],
                "properties": {
                  "start_date": {
                    "type": "string",
                    "format": "date"
                  },
                  "matchday_interval_days": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 30
                  },
                  "group_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "minItems": 1,
                    "maxItems": 64
                  },
                  "preview_token": {
                    "type": "string",
                    "pattern": "^[0-9a-f]{64}$"
                  },
                  "accept_conflicts": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "preview",
                    "applied",
                    "affected_match_ids"
                  ],
                  "properties": {
                    "preview": {
                      "type": "object",
                      "required": [
                        "operation",
                        "tournament_id",
                        "phase_id",
                        "group_id",
                        "changes",
                        "skipped",
                        "consequences",
                        "preview_token"
                      ],
                      "properties": {
                        "operation": {
                          "type": "string",
                          "enum": [
                            "round_datetime",
                            "round_swap",
                            "assign_field",
                            "schedule_dates",
                            "reset",
                            "add_repetition",
                            "remove_repetition"
                          ]
                        },
                        "tournament_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "phase_id": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "group_id": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "changes": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "kind",
                              "match_id",
                              "group_id",
                              "home_team_id",
                              "away_team_id",
                              "from",
                              "to",
                              "conflicts",
                              "warnings"
                            ],
                            "properties": {
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "update",
                                  "create",
                                  "remove"
                                ]
                              },
                              "match_id": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "group_id": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "home_team_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "away_team_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "from": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "required": [
                                      "round_id",
                                      "scheduled_at",
                                      "field_id"
                                    ],
                                    "properties": {
                                      "round_id": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "scheduled_at": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "format": "date-time"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "field_id": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    }
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "to": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "required": [
                                      "round_id",
                                      "scheduled_at",
                                      "field_id"
                                    ],
                                    "properties": {
                                      "round_id": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "scheduled_at": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "format": "date-time"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "field_id": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    }
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "conflicts": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "existing_slot_conflict",
                                    "proposed_slot_conflict",
                                    "field_closed_hours",
                                    "field_dayoff",
                                    "team_double_booked"
                                  ]
                                }
                              },
                              "warnings": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "hours_not_recorded",
                                    "pause_weekday",
                                    "home_preference"
                                  ]
                                }
                              }
                            }
                          }
                        },
                        "skipped": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "match_id",
                              "reason"
                            ],
                            "properties": {
                              "match_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "reason": {
                                "type": "string",
                                "enum": [
                                  "played_or_reported",
                                  "recovery",
                                  "postponed",
                                  "bracket_linked",
                                  "past_date"
                                ]
                              }
                            }
                          }
                        },
                        "consequences": {
                          "type": "object",
                          "required": [
                            "updates",
                            "creations",
                            "removals",
                            "blocking",
                            "conflicts",
                            "warnings"
                          ],
                          "properties": {
                            "updates": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "creations": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "removals": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "blocking": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "conflicts": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "warnings": {
                              "type": "integer",
                              "minimum": 0
                            }
                          }
                        },
                        "preview_token": {
                          "type": "string",
                          "pattern": "^[0-9a-f]{64}$"
                        }
                      }
                    },
                    "applied": {
                      "type": "boolean"
                    },
                    "affected_match_ids": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "format": "uuid"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      },
      "delete": {
        "tags": [
          "admin",
          "calendar-ops"
        ],
        "summary": "Admin — remove the last repetition of the phase groups, only if none of its matches was played. Without preview_token answers the preview.",
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "phaseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [],
                "properties": {
                  "group_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "minItems": 1,
                    "maxItems": 64
                  },
                  "preview_token": {
                    "type": "string",
                    "pattern": "^[0-9a-f]{64}$"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "preview",
                    "applied",
                    "affected_match_ids"
                  ],
                  "properties": {
                    "preview": {
                      "type": "object",
                      "required": [
                        "operation",
                        "tournament_id",
                        "phase_id",
                        "group_id",
                        "changes",
                        "skipped",
                        "consequences",
                        "preview_token"
                      ],
                      "properties": {
                        "operation": {
                          "type": "string",
                          "enum": [
                            "round_datetime",
                            "round_swap",
                            "assign_field",
                            "schedule_dates",
                            "reset",
                            "add_repetition",
                            "remove_repetition"
                          ]
                        },
                        "tournament_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "phase_id": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "group_id": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "changes": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "kind",
                              "match_id",
                              "group_id",
                              "home_team_id",
                              "away_team_id",
                              "from",
                              "to",
                              "conflicts",
                              "warnings"
                            ],
                            "properties": {
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "update",
                                  "create",
                                  "remove"
                                ]
                              },
                              "match_id": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "group_id": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "home_team_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "away_team_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "from": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "required": [
                                      "round_id",
                                      "scheduled_at",
                                      "field_id"
                                    ],
                                    "properties": {
                                      "round_id": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "scheduled_at": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "format": "date-time"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "field_id": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    }
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "to": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "required": [
                                      "round_id",
                                      "scheduled_at",
                                      "field_id"
                                    ],
                                    "properties": {
                                      "round_id": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "scheduled_at": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "format": "date-time"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "field_id": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    }
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "conflicts": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "existing_slot_conflict",
                                    "proposed_slot_conflict",
                                    "field_closed_hours",
                                    "field_dayoff",
                                    "team_double_booked"
                                  ]
                                }
                              },
                              "warnings": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "hours_not_recorded",
                                    "pause_weekday",
                                    "home_preference"
                                  ]
                                }
                              }
                            }
                          }
                        },
                        "skipped": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "match_id",
                              "reason"
                            ],
                            "properties": {
                              "match_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "reason": {
                                "type": "string",
                                "enum": [
                                  "played_or_reported",
                                  "recovery",
                                  "postponed",
                                  "bracket_linked",
                                  "past_date"
                                ]
                              }
                            }
                          }
                        },
                        "consequences": {
                          "type": "object",
                          "required": [
                            "updates",
                            "creations",
                            "removals",
                            "blocking",
                            "conflicts",
                            "warnings"
                          ],
                          "properties": {
                            "updates": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "creations": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "removals": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "blocking": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "conflicts": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "warnings": {
                              "type": "integer",
                              "minimum": 0
                            }
                          }
                        },
                        "preview_token": {
                          "type": "string",
                          "pattern": "^[0-9a-f]{64}$"
                        }
                      }
                    },
                    "applied": {
                      "type": "boolean"
                    },
                    "affected_match_ids": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "format": "uuid"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/tournaments/{tournamentId}/phases/{phaseId}/assign-field": {
      "post": {
        "tags": [
          "admin",
          "calendar-ops"
        ],
        "summary": "Admin — assign a field of the tournament to all unplayed matches of the phase, of a group or of chosen matches. Without preview_token answers the preview.",
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "phaseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "field_id"
                ],
                "properties": {
                  "field_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "group_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "match_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "minItems": 1,
                    "maxItems": 100
                  },
                  "preview_token": {
                    "type": "string",
                    "pattern": "^[0-9a-f]{64}$"
                  },
                  "accept_conflicts": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "preview",
                    "applied",
                    "affected_match_ids"
                  ],
                  "properties": {
                    "preview": {
                      "type": "object",
                      "required": [
                        "operation",
                        "tournament_id",
                        "phase_id",
                        "group_id",
                        "changes",
                        "skipped",
                        "consequences",
                        "preview_token"
                      ],
                      "properties": {
                        "operation": {
                          "type": "string",
                          "enum": [
                            "round_datetime",
                            "round_swap",
                            "assign_field",
                            "schedule_dates",
                            "reset",
                            "add_repetition",
                            "remove_repetition"
                          ]
                        },
                        "tournament_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "phase_id": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "group_id": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "changes": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "kind",
                              "match_id",
                              "group_id",
                              "home_team_id",
                              "away_team_id",
                              "from",
                              "to",
                              "conflicts",
                              "warnings"
                            ],
                            "properties": {
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "update",
                                  "create",
                                  "remove"
                                ]
                              },
                              "match_id": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "group_id": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "home_team_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "away_team_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "from": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "required": [
                                      "round_id",
                                      "scheduled_at",
                                      "field_id"
                                    ],
                                    "properties": {
                                      "round_id": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "scheduled_at": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "format": "date-time"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "field_id": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    }
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "to": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "required": [
                                      "round_id",
                                      "scheduled_at",
                                      "field_id"
                                    ],
                                    "properties": {
                                      "round_id": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "scheduled_at": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "format": "date-time"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "field_id": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    }
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "conflicts": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "existing_slot_conflict",
                                    "proposed_slot_conflict",
                                    "field_closed_hours",
                                    "field_dayoff",
                                    "team_double_booked"
                                  ]
                                }
                              },
                              "warnings": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "hours_not_recorded",
                                    "pause_weekday",
                                    "home_preference"
                                  ]
                                }
                              }
                            }
                          }
                        },
                        "skipped": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "match_id",
                              "reason"
                            ],
                            "properties": {
                              "match_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "reason": {
                                "type": "string",
                                "enum": [
                                  "played_or_reported",
                                  "recovery",
                                  "postponed",
                                  "bracket_linked",
                                  "past_date"
                                ]
                              }
                            }
                          }
                        },
                        "consequences": {
                          "type": "object",
                          "required": [
                            "updates",
                            "creations",
                            "removals",
                            "blocking",
                            "conflicts",
                            "warnings"
                          ],
                          "properties": {
                            "updates": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "creations": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "removals": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "blocking": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "conflicts": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "warnings": {
                              "type": "integer",
                              "minimum": 0
                            }
                          }
                        },
                        "preview_token": {
                          "type": "string",
                          "pattern": "^[0-9a-f]{64}$"
                        }
                      }
                    },
                    "applied": {
                      "type": "boolean"
                    },
                    "affected_match_ids": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "format": "uuid"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/tournaments/{tournamentId}/phases/{phaseId}/free-calendar": {
      "post": {
        "tags": [
          "admin",
          "calendar-ops"
        ],
        "summary": "Admin — switch a group (or a knockout phase) to the free calendar. Irreversible: requires confirm_irreversible and a reason.",
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "phaseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "confirm_irreversible",
                  "reason"
                ],
                "properties": {
                  "group_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "confirm_irreversible": {
                    "type": "boolean",
                    "enum": [
                      true
                    ]
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 500
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "tournament_id",
                    "phase_id",
                    "group_id",
                    "switched_at",
                    "reason"
                  ],
                  "properties": {
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "phase_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "group_id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "switched_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "reason": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/tournaments/{tournamentId}/phases/{phaseId}/placeholders": {
      "get": {
        "tags": [
          "admin",
          "calendar-ops"
        ],
        "summary": "Admin — placeholders of the teams coming into this phase from previous phases.",
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "phaseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "tournament_id",
                          "target_phase_id",
                          "source",
                          "target",
                          "label",
                          "status",
                          "resolved_team_id",
                          "resolved_at",
                          "version"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "tournament_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "target_phase_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "source": {
                            "oneOf": [
                              {
                                "type": "object",
                                "additionalProperties": false,
                                "required": [
                                  "kind",
                                  "group_id",
                                  "position"
                                ],
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "group_position"
                                    ]
                                  },
                                  "group_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "position": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 64
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "additionalProperties": false,
                                "required": [
                                  "kind",
                                  "match_id",
                                  "outcome"
                                ],
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "match_result"
                                    ]
                                  },
                                  "match_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "outcome": {
                                    "type": "string",
                                    "enum": [
                                      "winner",
                                      "loser"
                                    ]
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "additionalProperties": false,
                                "required": [
                                  "kind",
                                  "group_ids",
                                  "position",
                                  "rank"
                                ],
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "best_of_position"
                                    ]
                                  },
                                  "group_ids": {
                                    "type": "array",
                                    "items": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "minItems": 2,
                                    "maxItems": 32
                                  },
                                  "position": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 64
                                  },
                                  "rank": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 32
                                  }
                                }
                              }
                            ]
                          },
                          "target": {
                            "oneOf": [
                              {
                                "type": "object",
                                "additionalProperties": false,
                                "required": [
                                  "kind",
                                  "group_id"
                                ],
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "group"
                                    ]
                                  },
                                  "group_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "additionalProperties": false,
                                "required": [
                                  "kind",
                                  "seed"
                                ],
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "seed"
                                    ]
                                  },
                                  "seed": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 256
                                  }
                                }
                              }
                            ]
                          },
                          "label": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "configured",
                              "resolved"
                            ]
                          },
                          "resolved_team_id": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "resolved_at": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 0
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      },
      "post": {
        "tags": [
          "admin",
          "calendar-ops"
        ],
        "summary": "Admin — configure a placeholder: group position or match winner/loser of a previous phase, into a group or a seed of this phase.",
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "phaseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "source",
                  "target"
                ],
                "properties": {
                  "source": {
                    "oneOf": [
                      {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                          "kind",
                          "group_id",
                          "position"
                        ],
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "group_position"
                            ]
                          },
                          "group_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "position": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 64
                          }
                        }
                      },
                      {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                          "kind",
                          "match_id",
                          "outcome"
                        ],
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "match_result"
                            ]
                          },
                          "match_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "outcome": {
                            "type": "string",
                            "enum": [
                              "winner",
                              "loser"
                            ]
                          }
                        }
                      },
                      {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                          "kind",
                          "group_ids",
                          "position",
                          "rank"
                        ],
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "best_of_position"
                            ]
                          },
                          "group_ids": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "minItems": 2,
                            "maxItems": 32
                          },
                          "position": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 64
                          },
                          "rank": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 32
                          }
                        }
                      }
                    ]
                  },
                  "target": {
                    "oneOf": [
                      {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                          "kind",
                          "group_id"
                        ],
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "group"
                            ]
                          },
                          "group_id": {
                            "type": "string",
                            "format": "uuid"
                          }
                        }
                      },
                      {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                          "kind",
                          "seed"
                        ],
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "seed"
                            ]
                          },
                          "seed": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 256
                          }
                        }
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "tournament_id",
                    "target_phase_id",
                    "source",
                    "target",
                    "label",
                    "status",
                    "resolved_team_id",
                    "resolved_at",
                    "version"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "target_phase_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "source": {
                      "oneOf": [
                        {
                          "type": "object",
                          "additionalProperties": false,
                          "required": [
                            "kind",
                            "group_id",
                            "position"
                          ],
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "group_position"
                              ]
                            },
                            "group_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "position": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 64
                            }
                          }
                        },
                        {
                          "type": "object",
                          "additionalProperties": false,
                          "required": [
                            "kind",
                            "match_id",
                            "outcome"
                          ],
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "match_result"
                              ]
                            },
                            "match_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "outcome": {
                              "type": "string",
                              "enum": [
                                "winner",
                                "loser"
                              ]
                            }
                          }
                        },
                        {
                          "type": "object",
                          "additionalProperties": false,
                          "required": [
                            "kind",
                            "group_ids",
                            "position",
                            "rank"
                          ],
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "best_of_position"
                              ]
                            },
                            "group_ids": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "minItems": 2,
                              "maxItems": 32
                            },
                            "position": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 64
                            },
                            "rank": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 32
                            }
                          }
                        }
                      ]
                    },
                    "target": {
                      "oneOf": [
                        {
                          "type": "object",
                          "additionalProperties": false,
                          "required": [
                            "kind",
                            "group_id"
                          ],
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "group"
                              ]
                            },
                            "group_id": {
                              "type": "string",
                              "format": "uuid"
                            }
                          }
                        },
                        {
                          "type": "object",
                          "additionalProperties": false,
                          "required": [
                            "kind",
                            "seed"
                          ],
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "seed"
                              ]
                            },
                            "seed": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 256
                            }
                          }
                        }
                      ]
                    },
                    "label": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "configured",
                        "resolved"
                      ]
                    },
                    "resolved_team_id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "resolved_at": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/tournaments/{tournamentId}/phases/{phaseId}/placeholders/{placeholderId}": {
      "delete": {
        "tags": [
          "admin",
          "calendar-ops"
        ],
        "summary": "Admin — remove a placeholder that is still only configured.",
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "phaseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "placeholderId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "tournament_id",
                          "target_phase_id",
                          "source",
                          "target",
                          "label",
                          "status",
                          "resolved_team_id",
                          "resolved_at",
                          "version"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "tournament_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "target_phase_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "source": {
                            "oneOf": [
                              {
                                "type": "object",
                                "additionalProperties": false,
                                "required": [
                                  "kind",
                                  "group_id",
                                  "position"
                                ],
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "group_position"
                                    ]
                                  },
                                  "group_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "position": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 64
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "additionalProperties": false,
                                "required": [
                                  "kind",
                                  "match_id",
                                  "outcome"
                                ],
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "match_result"
                                    ]
                                  },
                                  "match_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "outcome": {
                                    "type": "string",
                                    "enum": [
                                      "winner",
                                      "loser"
                                    ]
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "additionalProperties": false,
                                "required": [
                                  "kind",
                                  "group_ids",
                                  "position",
                                  "rank"
                                ],
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "best_of_position"
                                    ]
                                  },
                                  "group_ids": {
                                    "type": "array",
                                    "items": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "minItems": 2,
                                    "maxItems": 32
                                  },
                                  "position": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 64
                                  },
                                  "rank": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 32
                                  }
                                }
                              }
                            ]
                          },
                          "target": {
                            "oneOf": [
                              {
                                "type": "object",
                                "additionalProperties": false,
                                "required": [
                                  "kind",
                                  "group_id"
                                ],
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "group"
                                    ]
                                  },
                                  "group_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "additionalProperties": false,
                                "required": [
                                  "kind",
                                  "seed"
                                ],
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "seed"
                                    ]
                                  },
                                  "seed": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 256
                                  }
                                }
                              }
                            ]
                          },
                          "label": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "configured",
                              "resolved"
                            ]
                          },
                          "resolved_team_id": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "resolved_at": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 0
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/tournaments/{tournamentId}/phases/{phaseId}/placeholders/split": {
      "post": {
        "tags": [
          "admin",
          "calendar-ops"
        ],
        "summary": "Admin — split a group of an earlier phase in two groups of this phase: the top N go to one, the rest to the other (one placeholder per position).",
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "phaseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "source_group_id",
                  "top",
                  "top_group_id",
                  "bottom_group_id"
                ],
                "properties": {
                  "source_group_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "top": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 63
                  },
                  "top_group_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "bottom_group_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "tournament_id",
                          "target_phase_id",
                          "source",
                          "target",
                          "label",
                          "status",
                          "resolved_team_id",
                          "resolved_at",
                          "version"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "tournament_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "target_phase_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "source": {
                            "oneOf": [
                              {
                                "type": "object",
                                "additionalProperties": false,
                                "required": [
                                  "kind",
                                  "group_id",
                                  "position"
                                ],
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "group_position"
                                    ]
                                  },
                                  "group_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "position": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 64
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "additionalProperties": false,
                                "required": [
                                  "kind",
                                  "match_id",
                                  "outcome"
                                ],
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "match_result"
                                    ]
                                  },
                                  "match_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "outcome": {
                                    "type": "string",
                                    "enum": [
                                      "winner",
                                      "loser"
                                    ]
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "additionalProperties": false,
                                "required": [
                                  "kind",
                                  "group_ids",
                                  "position",
                                  "rank"
                                ],
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "best_of_position"
                                    ]
                                  },
                                  "group_ids": {
                                    "type": "array",
                                    "items": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "minItems": 2,
                                    "maxItems": 32
                                  },
                                  "position": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 64
                                  },
                                  "rank": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 32
                                  }
                                }
                              }
                            ]
                          },
                          "target": {
                            "oneOf": [
                              {
                                "type": "object",
                                "additionalProperties": false,
                                "required": [
                                  "kind",
                                  "group_id"
                                ],
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "group"
                                    ]
                                  },
                                  "group_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "additionalProperties": false,
                                "required": [
                                  "kind",
                                  "seed"
                                ],
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "seed"
                                    ]
                                  },
                                  "seed": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 256
                                  }
                                }
                              }
                            ]
                          },
                          "label": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "configured",
                              "resolved"
                            ]
                          },
                          "resolved_team_id": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "resolved_at": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 0
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/tournaments/{tournamentId}/phases/{phaseId}/placeholders/resolve": {
      "post": {
        "tags": [
          "admin",
          "calendar-ops"
        ],
        "summary": "Admin — resolve the placeholders whose source phase is closed (group standings with the phase policy, homologated results). Without preview_token answers the preview.",
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "phaseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [],
                "properties": {
                  "preview_token": {
                    "type": "string",
                    "pattern": "^[0-9a-f]{64}$"
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 500
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "tournament_id",
                    "phase_id",
                    "items",
                    "preview_token",
                    "applied",
                    "resolved_ids"
                  ],
                  "properties": {
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "phase_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "placeholder_id",
                          "label",
                          "team_id",
                          "blocked"
                        ],
                        "properties": {
                          "placeholder_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "label": {
                            "type": "string"
                          },
                          "team_id": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "blocked": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "source_not_closed",
                                  "standings_tie_unresolved",
                                  "position_missing",
                                  "match_not_decided",
                                  "team_already_in_target",
                                  "standings_unavailable",
                                  "cross_group_comparison_pending"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        }
                      }
                    },
                    "preview_token": {
                      "type": "string",
                      "pattern": "^[0-9a-f]{64}$"
                    },
                    "applied": {
                      "type": "boolean"
                    },
                    "resolved_ids": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "format": "uuid"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/tournaments/{tournamentId}/phases/{phaseId}/placeholder-fixtures": {
      "get": {
        "tags": [
          "admin",
          "calendar-ops"
        ],
        "summary": "Admin — matches of the phase scheduled between placeholders («1ª Girone A – 2ª Girone B»), with what each side is now.",
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "phaseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "tournament_id",
                          "phase_id",
                          "round_id",
                          "group_id",
                          "home",
                          "away",
                          "home_label",
                          "away_label",
                          "scheduled_at",
                          "field_id",
                          "status",
                          "match_id",
                          "version"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "tournament_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "phase_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "round_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "group_id": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "home": {
                            "oneOf": [
                              {
                                "type": "object",
                                "additionalProperties": false,
                                "required": [
                                  "kind",
                                  "team_id"
                                ],
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "team"
                                    ]
                                  },
                                  "team_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "additionalProperties": false,
                                "required": [
                                  "kind",
                                  "placeholder_id"
                                ],
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "placeholder"
                                    ]
                                  },
                                  "placeholder_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  }
                                }
                              }
                            ]
                          },
                          "away": {
                            "oneOf": [
                              {
                                "type": "object",
                                "additionalProperties": false,
                                "required": [
                                  "kind",
                                  "team_id"
                                ],
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "team"
                                    ]
                                  },
                                  "team_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "additionalProperties": false,
                                "required": [
                                  "kind",
                                  "placeholder_id"
                                ],
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "placeholder"
                                    ]
                                  },
                                  "placeholder_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  }
                                }
                              }
                            ]
                          },
                          "home_label": {
                            "type": "string"
                          },
                          "away_label": {
                            "type": "string"
                          },
                          "scheduled_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "field_id": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "scheduled",
                              "materialized"
                            ]
                          },
                          "match_id": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 0
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      },
      "post": {
        "tags": [
          "admin",
          "calendar-ops"
        ],
        "summary": "Admin — schedule a match whose sides are placeholders of the phase (or a known team). It becomes a real match by itself when both teams are known.",
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "phaseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "round",
                  "group_id",
                  "home",
                  "away",
                  "date",
                  "time",
                  "field_id"
                ],
                "properties": {
                  "round": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 999
                  },
                  "group_id": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "home": {
                    "oneOf": [
                      {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                          "kind",
                          "team_id"
                        ],
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "team"
                            ]
                          },
                          "team_id": {
                            "type": "string",
                            "format": "uuid"
                          }
                        }
                      },
                      {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                          "kind",
                          "placeholder_id"
                        ],
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "placeholder"
                            ]
                          },
                          "placeholder_id": {
                            "type": "string",
                            "format": "uuid"
                          }
                        }
                      }
                    ]
                  },
                  "away": {
                    "oneOf": [
                      {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                          "kind",
                          "team_id"
                        ],
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "team"
                            ]
                          },
                          "team_id": {
                            "type": "string",
                            "format": "uuid"
                          }
                        }
                      },
                      {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                          "kind",
                          "placeholder_id"
                        ],
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "placeholder"
                            ]
                          },
                          "placeholder_id": {
                            "type": "string",
                            "format": "uuid"
                          }
                        }
                      }
                    ]
                  },
                  "date": {
                    "type": "string",
                    "format": "date"
                  },
                  "time": {
                    "type": "string",
                    "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
                  },
                  "field_id": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "tournament_id",
                    "phase_id",
                    "round_id",
                    "group_id",
                    "home",
                    "away",
                    "home_label",
                    "away_label",
                    "scheduled_at",
                    "field_id",
                    "status",
                    "match_id",
                    "version"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "phase_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "round_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "group_id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "home": {
                      "oneOf": [
                        {
                          "type": "object",
                          "additionalProperties": false,
                          "required": [
                            "kind",
                            "team_id"
                          ],
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "team"
                              ]
                            },
                            "team_id": {
                              "type": "string",
                              "format": "uuid"
                            }
                          }
                        },
                        {
                          "type": "object",
                          "additionalProperties": false,
                          "required": [
                            "kind",
                            "placeholder_id"
                          ],
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "placeholder"
                              ]
                            },
                            "placeholder_id": {
                              "type": "string",
                              "format": "uuid"
                            }
                          }
                        }
                      ]
                    },
                    "away": {
                      "oneOf": [
                        {
                          "type": "object",
                          "additionalProperties": false,
                          "required": [
                            "kind",
                            "team_id"
                          ],
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "team"
                              ]
                            },
                            "team_id": {
                              "type": "string",
                              "format": "uuid"
                            }
                          }
                        },
                        {
                          "type": "object",
                          "additionalProperties": false,
                          "required": [
                            "kind",
                            "placeholder_id"
                          ],
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "placeholder"
                              ]
                            },
                            "placeholder_id": {
                              "type": "string",
                              "format": "uuid"
                            }
                          }
                        }
                      ]
                    },
                    "home_label": {
                      "type": "string"
                    },
                    "away_label": {
                      "type": "string"
                    },
                    "scheduled_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "field_id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "scheduled",
                        "materialized"
                      ]
                    },
                    "match_id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/tournaments/{tournamentId}/phases/{phaseId}/placeholder-fixtures/{fixtureId}": {
      "delete": {
        "tags": [
          "admin",
          "calendar-ops"
        ],
        "summary": "Admin — remove a placeholder match that is not yet a real match.",
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "phaseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "fixtureId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "tournament_id",
                          "phase_id",
                          "round_id",
                          "group_id",
                          "home",
                          "away",
                          "home_label",
                          "away_label",
                          "scheduled_at",
                          "field_id",
                          "status",
                          "match_id",
                          "version"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "tournament_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "phase_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "round_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "group_id": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "home": {
                            "oneOf": [
                              {
                                "type": "object",
                                "additionalProperties": false,
                                "required": [
                                  "kind",
                                  "team_id"
                                ],
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "team"
                                    ]
                                  },
                                  "team_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "additionalProperties": false,
                                "required": [
                                  "kind",
                                  "placeholder_id"
                                ],
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "placeholder"
                                    ]
                                  },
                                  "placeholder_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  }
                                }
                              }
                            ]
                          },
                          "away": {
                            "oneOf": [
                              {
                                "type": "object",
                                "additionalProperties": false,
                                "required": [
                                  "kind",
                                  "team_id"
                                ],
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "team"
                                    ]
                                  },
                                  "team_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "additionalProperties": false,
                                "required": [
                                  "kind",
                                  "placeholder_id"
                                ],
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "placeholder"
                                    ]
                                  },
                                  "placeholder_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  }
                                }
                              }
                            ]
                          },
                          "home_label": {
                            "type": "string"
                          },
                          "away_label": {
                            "type": "string"
                          },
                          "scheduled_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "field_id": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "scheduled",
                              "materialized"
                            ]
                          },
                          "match_id": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 0
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/tournaments/{tournamentId}/phases/{phaseId}/bracket": {
      "get": {
        "tags": [
          "admin",
          "calendar-ops"
        ],
        "summary": "Admin — knockout bracket of the phase with its saved settings, tie locks, seeds and finals.",
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "phaseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "tournament_id",
                    "phase_id",
                    "settings",
                    "free",
                    "bracket",
                    "ties",
                    "seeds",
                    "finals"
                  ],
                  "properties": {
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "phase_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "settings": {
                      "anyOf": [
                        {
                          "type": "object",
                          "required": [
                            "size",
                            "rounds",
                            "third_place_final",
                            "extra_time_minutes",
                            "penalties"
                          ],
                          "properties": {
                            "size": {
                              "type": "integer",
                              "minimum": 2,
                              "maximum": 256
                            },
                            "rounds": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "required": [
                                  "matches_in_round",
                                  "legs"
                                ],
                                "properties": {
                                  "matches_in_round": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "legs": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 2
                                  }
                                }
                              }
                            },
                            "third_place_final": {
                              "type": "boolean"
                            },
                            "extra_time_minutes": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "penalties": {
                              "type": "boolean"
                            }
                          }
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "free": {
                      "type": "boolean"
                    },
                    "bracket": {
                      "anyOf": [
                        {
                          "type": "object",
                          "required": [
                            "tournament_id",
                            "rounds"
                          ],
                          "properties": {
                            "tournament_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "bracket_revision_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "projection_revision_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "rounds": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "required": [
                                  "id",
                                  "label",
                                  "order_index",
                                  "config",
                                  "ties"
                                ],
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "label": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "order_index": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "config": {
                                    "type": "object",
                                    "required": [
                                      "legs",
                                      "extra_time",
                                      "penalties"
                                    ],
                                    "properties": {
                                      "legs": {
                                        "oneOf": [
                                          {
                                            "type": "number",
                                            "enum": [
                                              1
                                            ]
                                          },
                                          {
                                            "type": "number",
                                            "enum": [
                                              2
                                            ]
                                          }
                                        ]
                                      },
                                      "away_goals_rule": {
                                        "type": "boolean"
                                      },
                                      "extra_time": {
                                        "type": "boolean"
                                      },
                                      "penalties": {
                                        "type": "boolean"
                                      }
                                    }
                                  },
                                  "ties": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "required": [
                                        "id",
                                        "order_index",
                                        "home_slot",
                                        "away_slot",
                                        "bye",
                                        "match_ids",
                                        "winner_team_id"
                                      ],
                                      "properties": {
                                        "id": {
                                          "type": "string",
                                          "format": "uuid"
                                        },
                                        "order_index": {
                                          "type": "integer",
                                          "minimum": 0
                                        },
                                        "home_slot": {
                                          "oneOf": [
                                            {
                                              "type": "object",
                                              "required": [
                                                "kind",
                                                "team_id"
                                              ],
                                              "properties": {
                                                "kind": {
                                                  "type": "string",
                                                  "enum": [
                                                    "team"
                                                  ]
                                                },
                                                "team_id": {
                                                  "type": "string",
                                                  "format": "uuid"
                                                }
                                              }
                                            },
                                            {
                                              "type": "object",
                                              "required": [
                                                "kind",
                                                "tie_id"
                                              ],
                                              "properties": {
                                                "kind": {
                                                  "type": "string",
                                                  "enum": [
                                                    "winner_of_tie"
                                                  ]
                                                },
                                                "tie_id": {
                                                  "type": "string",
                                                  "format": "uuid"
                                                }
                                              }
                                            },
                                            {
                                              "type": "object",
                                              "required": [
                                                "kind"
                                              ],
                                              "properties": {
                                                "kind": {
                                                  "type": "string",
                                                  "enum": [
                                                    "bye"
                                                  ]
                                                }
                                              }
                                            }
                                          ]
                                        },
                                        "away_slot": {
                                          "oneOf": [
                                            {
                                              "type": "object",
                                              "required": [
                                                "kind",
                                                "team_id"
                                              ],
                                              "properties": {
                                                "kind": {
                                                  "type": "string",
                                                  "enum": [
                                                    "team"
                                                  ]
                                                },
                                                "team_id": {
                                                  "type": "string",
                                                  "format": "uuid"
                                                }
                                              }
                                            },
                                            {
                                              "type": "object",
                                              "required": [
                                                "kind",
                                                "tie_id"
                                              ],
                                              "properties": {
                                                "kind": {
                                                  "type": "string",
                                                  "enum": [
                                                    "winner_of_tie"
                                                  ]
                                                },
                                                "tie_id": {
                                                  "type": "string",
                                                  "format": "uuid"
                                                }
                                              }
                                            },
                                            {
                                              "type": "object",
                                              "required": [
                                                "kind"
                                              ],
                                              "properties": {
                                                "kind": {
                                                  "type": "string",
                                                  "enum": [
                                                    "bye"
                                                  ]
                                                }
                                              }
                                            }
                                          ]
                                        },
                                        "bye": {
                                          "type": "boolean"
                                        },
                                        "match_ids": {
                                          "type": "array",
                                          "items": {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          "maxItems": 2
                                        },
                                        "winner_team_id": {
                                          "anyOf": [
                                            {
                                              "type": "string",
                                              "format": "uuid"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "projection_revision_id": {
                                          "type": "string",
                                          "format": "uuid"
                                        },
                                        "bracket_revision_id": {
                                          "type": "string",
                                          "format": "uuid"
                                        },
                                        "aggregate_score_home": {
                                          "anyOf": [
                                            {
                                              "type": "integer",
                                              "minimum": 0
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "aggregate_score_away": {
                                          "anyOf": [
                                            {
                                              "type": "integer",
                                              "minimum": 0
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "extra_time_score_home": {
                                          "anyOf": [
                                            {
                                              "type": "integer",
                                              "minimum": 0
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "extra_time_score_away": {
                                          "anyOf": [
                                            {
                                              "type": "integer",
                                              "minimum": 0
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "penalty_shootout_home": {
                                          "anyOf": [
                                            {
                                              "type": "integer",
                                              "minimum": 0
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "penalty_shootout_away": {
                                          "anyOf": [
                                            {
                                              "type": "integer",
                                              "minimum": 0
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "advancement_reason": {
                                          "anyOf": [
                                            {
                                              "type": "string",
                                              "enum": [
                                                "aggregate",
                                                "extra_time",
                                                "penalties",
                                                "bye",
                                                "committee_decision"
                                              ]
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      }
                                    }
                                  }
                                }
                              }
                            },
                            "shootout_display": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "enum": [
                                    "dcr",
                                    "rig"
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          }
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ties": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "tie_id",
                          "locked",
                          "report_available"
                        ],
                        "properties": {
                          "tie_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "locked": {
                            "type": "boolean"
                          },
                          "report_available": {
                            "type": "boolean"
                          }
                        }
                      }
                    },
                    "seeds": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "seed",
                          "placeholder_id",
                          "label",
                          "team_id"
                        ],
                        "properties": {
                          "seed": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "placeholder_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "label": {
                            "type": "string"
                          },
                          "team_id": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        }
                      }
                    },
                    "finals": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "type",
                          "status",
                          "finalists",
                          "result_winner_team_id",
                          "winner_team_id",
                          "loser_team_id",
                          "proclaimed_at"
                        ],
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "final",
                              "third_place"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "ready",
                              "proclaimed"
                            ]
                          },
                          "finalists": {
                            "type": "array",
                            "items": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "minItems": 2,
                            "maxItems": 2
                          },
                          "result_winner_team_id": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "winner_team_id": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "loser_team_id": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "proclaimed_at": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/tournaments/{tournamentId}/phases/{phaseId}/bracket/generate": {
      "post": {
        "tags": [
          "admin",
          "calendar-ops"
        ],
        "summary": "Admin — generate the bracket from the saved phase settings (size, legs per round, extra time, penalties) and the resolved seeds.",
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "phaseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [],
                "properties": {
                  "seed_order": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "minItems": 2,
                    "maxItems": 256
                  },
                  "confirm_replace": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "tournament_id",
                    "phase_id",
                    "settings",
                    "free",
                    "bracket",
                    "ties",
                    "seeds",
                    "finals"
                  ],
                  "properties": {
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "phase_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "settings": {
                      "anyOf": [
                        {
                          "type": "object",
                          "required": [
                            "size",
                            "rounds",
                            "third_place_final",
                            "extra_time_minutes",
                            "penalties"
                          ],
                          "properties": {
                            "size": {
                              "type": "integer",
                              "minimum": 2,
                              "maximum": 256
                            },
                            "rounds": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "required": [
                                  "matches_in_round",
                                  "legs"
                                ],
                                "properties": {
                                  "matches_in_round": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "legs": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 2
                                  }
                                }
                              }
                            },
                            "third_place_final": {
                              "type": "boolean"
                            },
                            "extra_time_minutes": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "penalties": {
                              "type": "boolean"
                            }
                          }
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "free": {
                      "type": "boolean"
                    },
                    "bracket": {
                      "anyOf": [
                        {
                          "type": "object",
                          "required": [
                            "tournament_id",
                            "rounds"
                          ],
                          "properties": {
                            "tournament_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "bracket_revision_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "projection_revision_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "rounds": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "required": [
                                  "id",
                                  "label",
                                  "order_index",
                                  "config",
                                  "ties"
                                ],
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "label": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "order_index": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "config": {
                                    "type": "object",
                                    "required": [
                                      "legs",
                                      "extra_time",
                                      "penalties"
                                    ],
                                    "properties": {
                                      "legs": {
                                        "oneOf": [
                                          {
                                            "type": "number",
                                            "enum": [
                                              1
                                            ]
                                          },
                                          {
                                            "type": "number",
                                            "enum": [
                                              2
                                            ]
                                          }
                                        ]
                                      },
                                      "away_goals_rule": {
                                        "type": "boolean"
                                      },
                                      "extra_time": {
                                        "type": "boolean"
                                      },
                                      "penalties": {
                                        "type": "boolean"
                                      }
                                    }
                                  },
                                  "ties": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "required": [
                                        "id",
                                        "order_index",
                                        "home_slot",
                                        "away_slot",
                                        "bye",
                                        "match_ids",
                                        "winner_team_id"
                                      ],
                                      "properties": {
                                        "id": {
                                          "type": "string",
                                          "format": "uuid"
                                        },
                                        "order_index": {
                                          "type": "integer",
                                          "minimum": 0
                                        },
                                        "home_slot": {
                                          "oneOf": [
                                            {
                                              "type": "object",
                                              "required": [
                                                "kind",
                                                "team_id"
                                              ],
                                              "properties": {
                                                "kind": {
                                                  "type": "string",
                                                  "enum": [
                                                    "team"
                                                  ]
                                                },
                                                "team_id": {
                                                  "type": "string",
                                                  "format": "uuid"
                                                }
                                              }
                                            },
                                            {
                                              "type": "object",
                                              "required": [
                                                "kind",
                                                "tie_id"
                                              ],
                                              "properties": {
                                                "kind": {
                                                  "type": "string",
                                                  "enum": [
                                                    "winner_of_tie"
                                                  ]
                                                },
                                                "tie_id": {
                                                  "type": "string",
                                                  "format": "uuid"
                                                }
                                              }
                                            },
                                            {
                                              "type": "object",
                                              "required": [
                                                "kind"
                                              ],
                                              "properties": {
                                                "kind": {
                                                  "type": "string",
                                                  "enum": [
                                                    "bye"
                                                  ]
                                                }
                                              }
                                            }
                                          ]
                                        },
                                        "away_slot": {
                                          "oneOf": [
                                            {
                                              "type": "object",
                                              "required": [
                                                "kind",
                                                "team_id"
                                              ],
                                              "properties": {
                                                "kind": {
                                                  "type": "string",
                                                  "enum": [
                                                    "team"
                                                  ]
                                                },
                                                "team_id": {
                                                  "type": "string",
                                                  "format": "uuid"
                                                }
                                              }
                                            },
                                            {
                                              "type": "object",
                                              "required": [
                                                "kind",
                                                "tie_id"
                                              ],
                                              "properties": {
                                                "kind": {
                                                  "type": "string",
                                                  "enum": [
                                                    "winner_of_tie"
                                                  ]
                                                },
                                                "tie_id": {
                                                  "type": "string",
                                                  "format": "uuid"
                                                }
                                              }
                                            },
                                            {
                                              "type": "object",
                                              "required": [
                                                "kind"
                                              ],
                                              "properties": {
                                                "kind": {
                                                  "type": "string",
                                                  "enum": [
                                                    "bye"
                                                  ]
                                                }
                                              }
                                            }
                                          ]
                                        },
                                        "bye": {
                                          "type": "boolean"
                                        },
                                        "match_ids": {
                                          "type": "array",
                                          "items": {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          "maxItems": 2
                                        },
                                        "winner_team_id": {
                                          "anyOf": [
                                            {
                                              "type": "string",
                                              "format": "uuid"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "projection_revision_id": {
                                          "type": "string",
                                          "format": "uuid"
                                        },
                                        "bracket_revision_id": {
                                          "type": "string",
                                          "format": "uuid"
                                        },
                                        "aggregate_score_home": {
                                          "anyOf": [
                                            {
                                              "type": "integer",
                                              "minimum": 0
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "aggregate_score_away": {
                                          "anyOf": [
                                            {
                                              "type": "integer",
                                              "minimum": 0
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "extra_time_score_home": {
                                          "anyOf": [
                                            {
                                              "type": "integer",
                                              "minimum": 0
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "extra_time_score_away": {
                                          "anyOf": [
                                            {
                                              "type": "integer",
                                              "minimum": 0
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "penalty_shootout_home": {
                                          "anyOf": [
                                            {
                                              "type": "integer",
                                              "minimum": 0
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "penalty_shootout_away": {
                                          "anyOf": [
                                            {
                                              "type": "integer",
                                              "minimum": 0
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "advancement_reason": {
                                          "anyOf": [
                                            {
                                              "type": "string",
                                              "enum": [
                                                "aggregate",
                                                "extra_time",
                                                "penalties",
                                                "bye",
                                                "committee_decision"
                                              ]
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      }
                                    }
                                  }
                                }
                              }
                            },
                            "shootout_display": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "enum": [
                                    "dcr",
                                    "rig"
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          }
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ties": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "tie_id",
                          "locked",
                          "report_available"
                        ],
                        "properties": {
                          "tie_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "locked": {
                            "type": "boolean"
                          },
                          "report_available": {
                            "type": "boolean"
                          }
                        }
                      }
                    },
                    "seeds": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "seed",
                          "placeholder_id",
                          "label",
                          "team_id"
                        ],
                        "properties": {
                          "seed": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "placeholder_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "label": {
                            "type": "string"
                          },
                          "team_id": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        }
                      }
                    },
                    "finals": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "type",
                          "status",
                          "finalists",
                          "result_winner_team_id",
                          "winner_team_id",
                          "loser_team_id",
                          "proclaimed_at"
                        ],
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "final",
                              "third_place"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "ready",
                              "proclaimed"
                            ]
                          },
                          "finalists": {
                            "type": "array",
                            "items": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "minItems": 2,
                            "maxItems": 2
                          },
                          "result_winner_team_id": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "winner_team_id": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "loser_team_id": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "proclaimed_at": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/tournaments/{tournamentId}/phases/{phaseId}/bracket/finals/{type}/winner": {
      "post": {
        "tags": [
          "admin",
          "calendar-ops"
        ],
        "summary": "Admin — proclaim the winner of the final or of the third-place final.",
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "phaseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "type",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "final",
                "third_place"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "team_id"
                ],
                "properties": {
                  "team_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 500
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "tournament_id",
                    "phase_id",
                    "settings",
                    "free",
                    "bracket",
                    "ties",
                    "seeds",
                    "finals"
                  ],
                  "properties": {
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "phase_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "settings": {
                      "anyOf": [
                        {
                          "type": "object",
                          "required": [
                            "size",
                            "rounds",
                            "third_place_final",
                            "extra_time_minutes",
                            "penalties"
                          ],
                          "properties": {
                            "size": {
                              "type": "integer",
                              "minimum": 2,
                              "maximum": 256
                            },
                            "rounds": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "required": [
                                  "matches_in_round",
                                  "legs"
                                ],
                                "properties": {
                                  "matches_in_round": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "legs": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 2
                                  }
                                }
                              }
                            },
                            "third_place_final": {
                              "type": "boolean"
                            },
                            "extra_time_minutes": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "penalties": {
                              "type": "boolean"
                            }
                          }
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "free": {
                      "type": "boolean"
                    },
                    "bracket": {
                      "anyOf": [
                        {
                          "type": "object",
                          "required": [
                            "tournament_id",
                            "rounds"
                          ],
                          "properties": {
                            "tournament_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "bracket_revision_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "projection_revision_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "rounds": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "required": [
                                  "id",
                                  "label",
                                  "order_index",
                                  "config",
                                  "ties"
                                ],
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "label": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "order_index": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "config": {
                                    "type": "object",
                                    "required": [
                                      "legs",
                                      "extra_time",
                                      "penalties"
                                    ],
                                    "properties": {
                                      "legs": {
                                        "oneOf": [
                                          {
                                            "type": "number",
                                            "enum": [
                                              1
                                            ]
                                          },
                                          {
                                            "type": "number",
                                            "enum": [
                                              2
                                            ]
                                          }
                                        ]
                                      },
                                      "away_goals_rule": {
                                        "type": "boolean"
                                      },
                                      "extra_time": {
                                        "type": "boolean"
                                      },
                                      "penalties": {
                                        "type": "boolean"
                                      }
                                    }
                                  },
                                  "ties": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "required": [
                                        "id",
                                        "order_index",
                                        "home_slot",
                                        "away_slot",
                                        "bye",
                                        "match_ids",
                                        "winner_team_id"
                                      ],
                                      "properties": {
                                        "id": {
                                          "type": "string",
                                          "format": "uuid"
                                        },
                                        "order_index": {
                                          "type": "integer",
                                          "minimum": 0
                                        },
                                        "home_slot": {
                                          "oneOf": [
                                            {
                                              "type": "object",
                                              "required": [
                                                "kind",
                                                "team_id"
                                              ],
                                              "properties": {
                                                "kind": {
                                                  "type": "string",
                                                  "enum": [
                                                    "team"
                                                  ]
                                                },
                                                "team_id": {
                                                  "type": "string",
                                                  "format": "uuid"
                                                }
                                              }
                                            },
                                            {
                                              "type": "object",
                                              "required": [
                                                "kind",
                                                "tie_id"
                                              ],
                                              "properties": {
                                                "kind": {
                                                  "type": "string",
                                                  "enum": [
                                                    "winner_of_tie"
                                                  ]
                                                },
                                                "tie_id": {
                                                  "type": "string",
                                                  "format": "uuid"
                                                }
                                              }
                                            },
                                            {
                                              "type": "object",
                                              "required": [
                                                "kind"
                                              ],
                                              "properties": {
                                                "kind": {
                                                  "type": "string",
                                                  "enum": [
                                                    "bye"
                                                  ]
                                                }
                                              }
                                            }
                                          ]
                                        },
                                        "away_slot": {
                                          "oneOf": [
                                            {
                                              "type": "object",
                                              "required": [
                                                "kind",
                                                "team_id"
                                              ],
                                              "properties": {
                                                "kind": {
                                                  "type": "string",
                                                  "enum": [
                                                    "team"
                                                  ]
                                                },
                                                "team_id": {
                                                  "type": "string",
                                                  "format": "uuid"
                                                }
                                              }
                                            },
                                            {
                                              "type": "object",
                                              "required": [
                                                "kind",
                                                "tie_id"
                                              ],
                                              "properties": {
                                                "kind": {
                                                  "type": "string",
                                                  "enum": [
                                                    "winner_of_tie"
                                                  ]
                                                },
                                                "tie_id": {
                                                  "type": "string",
                                                  "format": "uuid"
                                                }
                                              }
                                            },
                                            {
                                              "type": "object",
                                              "required": [
                                                "kind"
                                              ],
                                              "properties": {
                                                "kind": {
                                                  "type": "string",
                                                  "enum": [
                                                    "bye"
                                                  ]
                                                }
                                              }
                                            }
                                          ]
                                        },
                                        "bye": {
                                          "type": "boolean"
                                        },
                                        "match_ids": {
                                          "type": "array",
                                          "items": {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          "maxItems": 2
                                        },
                                        "winner_team_id": {
                                          "anyOf": [
                                            {
                                              "type": "string",
                                              "format": "uuid"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "projection_revision_id": {
                                          "type": "string",
                                          "format": "uuid"
                                        },
                                        "bracket_revision_id": {
                                          "type": "string",
                                          "format": "uuid"
                                        },
                                        "aggregate_score_home": {
                                          "anyOf": [
                                            {
                                              "type": "integer",
                                              "minimum": 0
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "aggregate_score_away": {
                                          "anyOf": [
                                            {
                                              "type": "integer",
                                              "minimum": 0
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "extra_time_score_home": {
                                          "anyOf": [
                                            {
                                              "type": "integer",
                                              "minimum": 0
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "extra_time_score_away": {
                                          "anyOf": [
                                            {
                                              "type": "integer",
                                              "minimum": 0
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "penalty_shootout_home": {
                                          "anyOf": [
                                            {
                                              "type": "integer",
                                              "minimum": 0
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "penalty_shootout_away": {
                                          "anyOf": [
                                            {
                                              "type": "integer",
                                              "minimum": 0
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "advancement_reason": {
                                          "anyOf": [
                                            {
                                              "type": "string",
                                              "enum": [
                                                "aggregate",
                                                "extra_time",
                                                "penalties",
                                                "bye",
                                                "committee_decision"
                                              ]
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      }
                                    }
                                  }
                                }
                              }
                            },
                            "shootout_display": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "enum": [
                                    "dcr",
                                    "rig"
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          }
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ties": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "tie_id",
                          "locked",
                          "report_available"
                        ],
                        "properties": {
                          "tie_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "locked": {
                            "type": "boolean"
                          },
                          "report_available": {
                            "type": "boolean"
                          }
                        }
                      }
                    },
                    "seeds": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "seed",
                          "placeholder_id",
                          "label",
                          "team_id"
                        ],
                        "properties": {
                          "seed": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "placeholder_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "label": {
                            "type": "string"
                          },
                          "team_id": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        }
                      }
                    },
                    "finals": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "type",
                          "status",
                          "finalists",
                          "result_winner_team_id",
                          "winner_team_id",
                          "loser_team_id",
                          "proclaimed_at"
                        ],
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "final",
                              "third_place"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "ready",
                              "proclaimed"
                            ]
                          },
                          "finalists": {
                            "type": "array",
                            "items": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "minItems": 2,
                            "maxItems": 2
                          },
                          "result_winner_team_id": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "winner_team_id": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "loser_team_id": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "proclaimed_at": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      },
      "delete": {
        "tags": [
          "admin",
          "calendar-ops"
        ],
        "summary": "Admin — annul the proclaimed winner of a final (kept in the history).",
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "phaseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "type",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "final",
                "third_place"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "reason"
                ],
                "properties": {
                  "reason": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 500
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "tournament_id",
                    "phase_id",
                    "settings",
                    "free",
                    "bracket",
                    "ties",
                    "seeds",
                    "finals"
                  ],
                  "properties": {
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "phase_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "settings": {
                      "anyOf": [
                        {
                          "type": "object",
                          "required": [
                            "size",
                            "rounds",
                            "third_place_final",
                            "extra_time_minutes",
                            "penalties"
                          ],
                          "properties": {
                            "size": {
                              "type": "integer",
                              "minimum": 2,
                              "maximum": 256
                            },
                            "rounds": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "required": [
                                  "matches_in_round",
                                  "legs"
                                ],
                                "properties": {
                                  "matches_in_round": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "legs": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 2
                                  }
                                }
                              }
                            },
                            "third_place_final": {
                              "type": "boolean"
                            },
                            "extra_time_minutes": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "penalties": {
                              "type": "boolean"
                            }
                          }
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "free": {
                      "type": "boolean"
                    },
                    "bracket": {
                      "anyOf": [
                        {
                          "type": "object",
                          "required": [
                            "tournament_id",
                            "rounds"
                          ],
                          "properties": {
                            "tournament_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "bracket_revision_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "projection_revision_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "rounds": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "required": [
                                  "id",
                                  "label",
                                  "order_index",
                                  "config",
                                  "ties"
                                ],
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "label": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "order_index": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "config": {
                                    "type": "object",
                                    "required": [
                                      "legs",
                                      "extra_time",
                                      "penalties"
                                    ],
                                    "properties": {
                                      "legs": {
                                        "oneOf": [
                                          {
                                            "type": "number",
                                            "enum": [
                                              1
                                            ]
                                          },
                                          {
                                            "type": "number",
                                            "enum": [
                                              2
                                            ]
                                          }
                                        ]
                                      },
                                      "away_goals_rule": {
                                        "type": "boolean"
                                      },
                                      "extra_time": {
                                        "type": "boolean"
                                      },
                                      "penalties": {
                                        "type": "boolean"
                                      }
                                    }
                                  },
                                  "ties": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "required": [
                                        "id",
                                        "order_index",
                                        "home_slot",
                                        "away_slot",
                                        "bye",
                                        "match_ids",
                                        "winner_team_id"
                                      ],
                                      "properties": {
                                        "id": {
                                          "type": "string",
                                          "format": "uuid"
                                        },
                                        "order_index": {
                                          "type": "integer",
                                          "minimum": 0
                                        },
                                        "home_slot": {
                                          "oneOf": [
                                            {
                                              "type": "object",
                                              "required": [
                                                "kind",
                                                "team_id"
                                              ],
                                              "properties": {
                                                "kind": {
                                                  "type": "string",
                                                  "enum": [
                                                    "team"
                                                  ]
                                                },
                                                "team_id": {
                                                  "type": "string",
                                                  "format": "uuid"
                                                }
                                              }
                                            },
                                            {
                                              "type": "object",
                                              "required": [
                                                "kind",
                                                "tie_id"
                                              ],
                                              "properties": {
                                                "kind": {
                                                  "type": "string",
                                                  "enum": [
                                                    "winner_of_tie"
                                                  ]
                                                },
                                                "tie_id": {
                                                  "type": "string",
                                                  "format": "uuid"
                                                }
                                              }
                                            },
                                            {
                                              "type": "object",
                                              "required": [
                                                "kind"
                                              ],
                                              "properties": {
                                                "kind": {
                                                  "type": "string",
                                                  "enum": [
                                                    "bye"
                                                  ]
                                                }
                                              }
                                            }
                                          ]
                                        },
                                        "away_slot": {
                                          "oneOf": [
                                            {
                                              "type": "object",
                                              "required": [
                                                "kind",
                                                "team_id"
                                              ],
                                              "properties": {
                                                "kind": {
                                                  "type": "string",
                                                  "enum": [
                                                    "team"
                                                  ]
                                                },
                                                "team_id": {
                                                  "type": "string",
                                                  "format": "uuid"
                                                }
                                              }
                                            },
                                            {
                                              "type": "object",
                                              "required": [
                                                "kind",
                                                "tie_id"
                                              ],
                                              "properties": {
                                                "kind": {
                                                  "type": "string",
                                                  "enum": [
                                                    "winner_of_tie"
                                                  ]
                                                },
                                                "tie_id": {
                                                  "type": "string",
                                                  "format": "uuid"
                                                }
                                              }
                                            },
                                            {
                                              "type": "object",
                                              "required": [
                                                "kind"
                                              ],
                                              "properties": {
                                                "kind": {
                                                  "type": "string",
                                                  "enum": [
                                                    "bye"
                                                  ]
                                                }
                                              }
                                            }
                                          ]
                                        },
                                        "bye": {
                                          "type": "boolean"
                                        },
                                        "match_ids": {
                                          "type": "array",
                                          "items": {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          "maxItems": 2
                                        },
                                        "winner_team_id": {
                                          "anyOf": [
                                            {
                                              "type": "string",
                                              "format": "uuid"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "projection_revision_id": {
                                          "type": "string",
                                          "format": "uuid"
                                        },
                                        "bracket_revision_id": {
                                          "type": "string",
                                          "format": "uuid"
                                        },
                                        "aggregate_score_home": {
                                          "anyOf": [
                                            {
                                              "type": "integer",
                                              "minimum": 0
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "aggregate_score_away": {
                                          "anyOf": [
                                            {
                                              "type": "integer",
                                              "minimum": 0
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "extra_time_score_home": {
                                          "anyOf": [
                                            {
                                              "type": "integer",
                                              "minimum": 0
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "extra_time_score_away": {
                                          "anyOf": [
                                            {
                                              "type": "integer",
                                              "minimum": 0
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "penalty_shootout_home": {
                                          "anyOf": [
                                            {
                                              "type": "integer",
                                              "minimum": 0
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "penalty_shootout_away": {
                                          "anyOf": [
                                            {
                                              "type": "integer",
                                              "minimum": 0
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "advancement_reason": {
                                          "anyOf": [
                                            {
                                              "type": "string",
                                              "enum": [
                                                "aggregate",
                                                "extra_time",
                                                "penalties",
                                                "bye",
                                                "committee_decision"
                                              ]
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      }
                                    }
                                  }
                                }
                              }
                            },
                            "shootout_display": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "enum": [
                                    "dcr",
                                    "rig"
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          }
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ties": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "tie_id",
                          "locked",
                          "report_available"
                        ],
                        "properties": {
                          "tie_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "locked": {
                            "type": "boolean"
                          },
                          "report_available": {
                            "type": "boolean"
                          }
                        }
                      }
                    },
                    "seeds": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "seed",
                          "placeholder_id",
                          "label",
                          "team_id"
                        ],
                        "properties": {
                          "seed": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "placeholder_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "label": {
                            "type": "string"
                          },
                          "team_id": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        }
                      }
                    },
                    "finals": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "type",
                          "status",
                          "finalists",
                          "result_winner_team_id",
                          "winner_team_id",
                          "loser_team_id",
                          "proclaimed_at"
                        ],
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "final",
                              "third_place"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "ready",
                              "proclaimed"
                            ]
                          },
                          "finalists": {
                            "type": "array",
                            "items": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "minItems": 2,
                            "maxItems": 2
                          },
                          "result_winner_team_id": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "winner_team_id": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "loser_team_id": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "proclaimed_at": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/tournaments/{tournamentId}/calendar/reset": {
      "post": {
        "tags": [
          "admin",
          "calendar-ops"
        ],
        "summary": "Admin — reset the calendar of the tournament, of a phase or of a group: removes only matches never played and without a report. Without preview_token answers the preview.",
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [],
                "properties": {
                  "phase_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "group_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "match_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "minItems": 1,
                    "maxItems": 100
                  },
                  "preview_token": {
                    "type": "string",
                    "pattern": "^[0-9a-f]{64}$"
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 500
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "preview",
                    "applied",
                    "affected_match_ids"
                  ],
                  "properties": {
                    "preview": {
                      "type": "object",
                      "required": [
                        "operation",
                        "tournament_id",
                        "phase_id",
                        "group_id",
                        "changes",
                        "skipped",
                        "consequences",
                        "preview_token"
                      ],
                      "properties": {
                        "operation": {
                          "type": "string",
                          "enum": [
                            "round_datetime",
                            "round_swap",
                            "assign_field",
                            "schedule_dates",
                            "reset",
                            "add_repetition",
                            "remove_repetition"
                          ]
                        },
                        "tournament_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "phase_id": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "group_id": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "changes": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "kind",
                              "match_id",
                              "group_id",
                              "home_team_id",
                              "away_team_id",
                              "from",
                              "to",
                              "conflicts",
                              "warnings"
                            ],
                            "properties": {
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "update",
                                  "create",
                                  "remove"
                                ]
                              },
                              "match_id": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "group_id": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "home_team_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "away_team_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "from": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "required": [
                                      "round_id",
                                      "scheduled_at",
                                      "field_id"
                                    ],
                                    "properties": {
                                      "round_id": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "scheduled_at": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "format": "date-time"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "field_id": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    }
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "to": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "required": [
                                      "round_id",
                                      "scheduled_at",
                                      "field_id"
                                    ],
                                    "properties": {
                                      "round_id": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "scheduled_at": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "format": "date-time"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "field_id": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    }
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "conflicts": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "existing_slot_conflict",
                                    "proposed_slot_conflict",
                                    "field_closed_hours",
                                    "field_dayoff",
                                    "team_double_booked"
                                  ]
                                }
                              },
                              "warnings": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "hours_not_recorded",
                                    "pause_weekday",
                                    "home_preference"
                                  ]
                                }
                              }
                            }
                          }
                        },
                        "skipped": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "match_id",
                              "reason"
                            ],
                            "properties": {
                              "match_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "reason": {
                                "type": "string",
                                "enum": [
                                  "played_or_reported",
                                  "recovery",
                                  "postponed",
                                  "bracket_linked",
                                  "past_date"
                                ]
                              }
                            }
                          }
                        },
                        "consequences": {
                          "type": "object",
                          "required": [
                            "updates",
                            "creations",
                            "removals",
                            "blocking",
                            "conflicts",
                            "warnings"
                          ],
                          "properties": {
                            "updates": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "creations": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "removals": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "blocking": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "conflicts": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "warnings": {
                              "type": "integer",
                              "minimum": 0
                            }
                          }
                        },
                        "preview_token": {
                          "type": "string",
                          "pattern": "^[0-9a-f]{64}$"
                        }
                      }
                    },
                    "applied": {
                      "type": "boolean"
                    },
                    "affected_match_ids": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "format": "uuid"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/tournaments/{tournamentId}/calendar/schedule-dates": {
      "post": {
        "tags": [
          "admin",
          "calendar-ops"
        ],
        "summary": "Admin — plan dates, times and fields of the unplayed matches of the chosen phases (knockout and group phases never together). Without preview_token answers the preview.",
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "phase_ids",
                  "start_date",
                  "matchday_interval_days",
                  "kickoff_slots"
                ],
                "properties": {
                  "phase_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "minItems": 1,
                    "maxItems": 16
                  },
                  "start_date": {
                    "type": "string",
                    "format": "date"
                  },
                  "matchday_interval_days": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 30
                  },
                  "kickoff_slots": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "time",
                        "field_id"
                      ],
                      "properties": {
                        "time": {
                          "type": "string",
                          "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
                        },
                        "field_id": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      }
                    },
                    "minItems": 1,
                    "maxItems": 32
                  },
                  "blackout_dates": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "date"
                    },
                    "maxItems": 100
                  },
                  "pause_weekdays": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 7
                    },
                    "maxItems": 7
                  },
                  "team_preferences": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "team_id"
                      ],
                      "properties": {
                        "team_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "weekdays": {
                          "type": "array",
                          "items": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 7
                          },
                          "maxItems": 7
                        },
                        "field_id": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      }
                    },
                    "maxItems": 256
                  },
                  "preview_token": {
                    "type": "string",
                    "pattern": "^[0-9a-f]{64}$"
                  },
                  "accept_conflicts": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "preview",
                    "applied",
                    "affected_match_ids"
                  ],
                  "properties": {
                    "preview": {
                      "type": "object",
                      "required": [
                        "operation",
                        "tournament_id",
                        "phase_id",
                        "group_id",
                        "changes",
                        "skipped",
                        "consequences",
                        "preview_token"
                      ],
                      "properties": {
                        "operation": {
                          "type": "string",
                          "enum": [
                            "round_datetime",
                            "round_swap",
                            "assign_field",
                            "schedule_dates",
                            "reset",
                            "add_repetition",
                            "remove_repetition"
                          ]
                        },
                        "tournament_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "phase_id": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "group_id": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "changes": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "kind",
                              "match_id",
                              "group_id",
                              "home_team_id",
                              "away_team_id",
                              "from",
                              "to",
                              "conflicts",
                              "warnings"
                            ],
                            "properties": {
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "update",
                                  "create",
                                  "remove"
                                ]
                              },
                              "match_id": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "group_id": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "home_team_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "away_team_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "from": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "required": [
                                      "round_id",
                                      "scheduled_at",
                                      "field_id"
                                    ],
                                    "properties": {
                                      "round_id": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "scheduled_at": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "format": "date-time"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "field_id": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    }
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "to": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "required": [
                                      "round_id",
                                      "scheduled_at",
                                      "field_id"
                                    ],
                                    "properties": {
                                      "round_id": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "scheduled_at": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "format": "date-time"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "field_id": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    }
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "conflicts": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "existing_slot_conflict",
                                    "proposed_slot_conflict",
                                    "field_closed_hours",
                                    "field_dayoff",
                                    "team_double_booked"
                                  ]
                                }
                              },
                              "warnings": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "hours_not_recorded",
                                    "pause_weekday",
                                    "home_preference"
                                  ]
                                }
                              }
                            }
                          }
                        },
                        "skipped": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "match_id",
                              "reason"
                            ],
                            "properties": {
                              "match_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "reason": {
                                "type": "string",
                                "enum": [
                                  "played_or_reported",
                                  "recovery",
                                  "postponed",
                                  "bracket_linked",
                                  "past_date"
                                ]
                              }
                            }
                          }
                        },
                        "consequences": {
                          "type": "object",
                          "required": [
                            "updates",
                            "creations",
                            "removals",
                            "blocking",
                            "conflicts",
                            "warnings"
                          ],
                          "properties": {
                            "updates": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "creations": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "removals": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "blocking": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "conflicts": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "warnings": {
                              "type": "integer",
                              "minimum": 0
                            }
                          }
                        },
                        "preview_token": {
                          "type": "string",
                          "pattern": "^[0-9a-f]{64}$"
                        }
                      }
                    },
                    "applied": {
                      "type": "boolean"
                    },
                    "affected_match_ids": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "format": "uuid"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/tournaments/{tournamentId}/calendar/export.xlsx": {
      "get": {
        "tags": [
          "admin",
          "calendar-ops"
        ],
        "summary": "Admin — calendar of the tournament as a spreadsheet (optionally one phase or group).",
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "phase_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "group_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/tournaments/{tournamentId}/bracket/ties/{tieId}/slot": {
      "put": {
        "tags": [
          "admin",
          "calendar-ops"
        ],
        "summary": "Admin — put a team in a slot of a locked tie (first round only, unless the phase is on the free calendar).",
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "tieId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "phase_id",
                  "side",
                  "team_id"
                ],
                "properties": {
                  "phase_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "side": {
                    "type": "string",
                    "enum": [
                      "home",
                      "away"
                    ]
                  },
                  "team_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "tournament_id",
                    "phase_id",
                    "settings",
                    "free",
                    "bracket",
                    "ties",
                    "seeds",
                    "finals"
                  ],
                  "properties": {
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "phase_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "settings": {
                      "anyOf": [
                        {
                          "type": "object",
                          "required": [
                            "size",
                            "rounds",
                            "third_place_final",
                            "extra_time_minutes",
                            "penalties"
                          ],
                          "properties": {
                            "size": {
                              "type": "integer",
                              "minimum": 2,
                              "maximum": 256
                            },
                            "rounds": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "required": [
                                  "matches_in_round",
                                  "legs"
                                ],
                                "properties": {
                                  "matches_in_round": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "legs": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 2
                                  }
                                }
                              }
                            },
                            "third_place_final": {
                              "type": "boolean"
                            },
                            "extra_time_minutes": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "penalties": {
                              "type": "boolean"
                            }
                          }
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "free": {
                      "type": "boolean"
                    },
                    "bracket": {
                      "anyOf": [
                        {
                          "type": "object",
                          "required": [
                            "tournament_id",
                            "rounds"
                          ],
                          "properties": {
                            "tournament_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "bracket_revision_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "projection_revision_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "rounds": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "required": [
                                  "id",
                                  "label",
                                  "order_index",
                                  "config",
                                  "ties"
                                ],
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "label": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "order_index": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "config": {
                                    "type": "object",
                                    "required": [
                                      "legs",
                                      "extra_time",
                                      "penalties"
                                    ],
                                    "properties": {
                                      "legs": {
                                        "oneOf": [
                                          {
                                            "type": "number",
                                            "enum": [
                                              1
                                            ]
                                          },
                                          {
                                            "type": "number",
                                            "enum": [
                                              2
                                            ]
                                          }
                                        ]
                                      },
                                      "away_goals_rule": {
                                        "type": "boolean"
                                      },
                                      "extra_time": {
                                        "type": "boolean"
                                      },
                                      "penalties": {
                                        "type": "boolean"
                                      }
                                    }
                                  },
                                  "ties": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "required": [
                                        "id",
                                        "order_index",
                                        "home_slot",
                                        "away_slot",
                                        "bye",
                                        "match_ids",
                                        "winner_team_id"
                                      ],
                                      "properties": {
                                        "id": {
                                          "type": "string",
                                          "format": "uuid"
                                        },
                                        "order_index": {
                                          "type": "integer",
                                          "minimum": 0
                                        },
                                        "home_slot": {
                                          "oneOf": [
                                            {
                                              "type": "object",
                                              "required": [
                                                "kind",
                                                "team_id"
                                              ],
                                              "properties": {
                                                "kind": {
                                                  "type": "string",
                                                  "enum": [
                                                    "team"
                                                  ]
                                                },
                                                "team_id": {
                                                  "type": "string",
                                                  "format": "uuid"
                                                }
                                              }
                                            },
                                            {
                                              "type": "object",
                                              "required": [
                                                "kind",
                                                "tie_id"
                                              ],
                                              "properties": {
                                                "kind": {
                                                  "type": "string",
                                                  "enum": [
                                                    "winner_of_tie"
                                                  ]
                                                },
                                                "tie_id": {
                                                  "type": "string",
                                                  "format": "uuid"
                                                }
                                              }
                                            },
                                            {
                                              "type": "object",
                                              "required": [
                                                "kind"
                                              ],
                                              "properties": {
                                                "kind": {
                                                  "type": "string",
                                                  "enum": [
                                                    "bye"
                                                  ]
                                                }
                                              }
                                            }
                                          ]
                                        },
                                        "away_slot": {
                                          "oneOf": [
                                            {
                                              "type": "object",
                                              "required": [
                                                "kind",
                                                "team_id"
                                              ],
                                              "properties": {
                                                "kind": {
                                                  "type": "string",
                                                  "enum": [
                                                    "team"
                                                  ]
                                                },
                                                "team_id": {
                                                  "type": "string",
                                                  "format": "uuid"
                                                }
                                              }
                                            },
                                            {
                                              "type": "object",
                                              "required": [
                                                "kind",
                                                "tie_id"
                                              ],
                                              "properties": {
                                                "kind": {
                                                  "type": "string",
                                                  "enum": [
                                                    "winner_of_tie"
                                                  ]
                                                },
                                                "tie_id": {
                                                  "type": "string",
                                                  "format": "uuid"
                                                }
                                              }
                                            },
                                            {
                                              "type": "object",
                                              "required": [
                                                "kind"
                                              ],
                                              "properties": {
                                                "kind": {
                                                  "type": "string",
                                                  "enum": [
                                                    "bye"
                                                  ]
                                                }
                                              }
                                            }
                                          ]
                                        },
                                        "bye": {
                                          "type": "boolean"
                                        },
                                        "match_ids": {
                                          "type": "array",
                                          "items": {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          "maxItems": 2
                                        },
                                        "winner_team_id": {
                                          "anyOf": [
                                            {
                                              "type": "string",
                                              "format": "uuid"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "projection_revision_id": {
                                          "type": "string",
                                          "format": "uuid"
                                        },
                                        "bracket_revision_id": {
                                          "type": "string",
                                          "format": "uuid"
                                        },
                                        "aggregate_score_home": {
                                          "anyOf": [
                                            {
                                              "type": "integer",
                                              "minimum": 0
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "aggregate_score_away": {
                                          "anyOf": [
                                            {
                                              "type": "integer",
                                              "minimum": 0
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "extra_time_score_home": {
                                          "anyOf": [
                                            {
                                              "type": "integer",
                                              "minimum": 0
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "extra_time_score_away": {
                                          "anyOf": [
                                            {
                                              "type": "integer",
                                              "minimum": 0
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "penalty_shootout_home": {
                                          "anyOf": [
                                            {
                                              "type": "integer",
                                              "minimum": 0
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "penalty_shootout_away": {
                                          "anyOf": [
                                            {
                                              "type": "integer",
                                              "minimum": 0
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "advancement_reason": {
                                          "anyOf": [
                                            {
                                              "type": "string",
                                              "enum": [
                                                "aggregate",
                                                "extra_time",
                                                "penalties",
                                                "bye",
                                                "committee_decision"
                                              ]
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      }
                                    }
                                  }
                                }
                              }
                            },
                            "shootout_display": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "enum": [
                                    "dcr",
                                    "rig"
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          }
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ties": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "tie_id",
                          "locked",
                          "report_available"
                        ],
                        "properties": {
                          "tie_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "locked": {
                            "type": "boolean"
                          },
                          "report_available": {
                            "type": "boolean"
                          }
                        }
                      }
                    },
                    "seeds": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "seed",
                          "placeholder_id",
                          "label",
                          "team_id"
                        ],
                        "properties": {
                          "seed": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "placeholder_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "label": {
                            "type": "string"
                          },
                          "team_id": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        }
                      }
                    },
                    "finals": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "type",
                          "status",
                          "finalists",
                          "result_winner_team_id",
                          "winner_team_id",
                          "loser_team_id",
                          "proclaimed_at"
                        ],
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "final",
                              "third_place"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "ready",
                              "proclaimed"
                            ]
                          },
                          "finalists": {
                            "type": "array",
                            "items": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "minItems": 2,
                            "maxItems": 2
                          },
                          "result_winner_team_id": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "winner_team_id": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "loser_team_id": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "proclaimed_at": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/tournaments/{tournamentId}/bracket/ties/{tieId}/lock": {
      "post": {
        "tags": [
          "admin",
          "calendar-ops"
        ],
        "summary": "Admin — lock a tie of the bracket: its report is not exposed.",
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "tieId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [],
                "properties": {
                  "expected_version": {
                    "type": "integer",
                    "minimum": 0
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "tie_id",
                    "locked",
                    "version"
                  ],
                  "properties": {
                    "tie_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "locked": {
                      "type": "boolean"
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/tournaments/{tournamentId}/bracket/ties/{tieId}/unlock": {
      "post": {
        "tags": [
          "admin",
          "calendar-ops"
        ],
        "summary": "Admin — unlock a tie of the bracket: its report becomes available.",
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "tieId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [],
                "properties": {
                  "expected_version": {
                    "type": "integer",
                    "minimum": 0
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "tie_id",
                    "locked",
                    "version"
                  ],
                  "properties": {
                    "tie_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "locked": {
                      "type": "boolean"
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/calendar/matches": {
      "get": {
        "tags": [
          "admin",
          "calendar-ops"
        ],
        "summary": "Admin — all matches with filters (tournament, phase, group, matchday, dates, facility, designations), conflicts ** and home preferences *; cursor pagination.",
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "tournament_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "phase_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "group_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "round_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "facility_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "field_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "referee_user_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "coverage",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "covered",
                "pending",
                "uncovered"
              ]
            }
          },
          {
            "name": "conflicts_only",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "next_cursor",
                    "coverage"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "match_id",
                          "tournament_id",
                          "tournament_label",
                          "phase",
                          "group",
                          "round",
                          "home_team_id",
                          "away_team_id",
                          "home_team_name",
                          "away_team_name",
                          "scheduled_at",
                          "field_id",
                          "field_label",
                          "facility",
                          "state",
                          "played",
                          "conflict",
                          "home_preference",
                          "coverage",
                          "etag"
                        ],
                        "properties": {
                          "match_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "tournament_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "tournament_label": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "phase": {
                            "anyOf": [
                              {
                                "type": "object",
                                "required": [
                                  "id",
                                  "label"
                                ],
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "label": {
                                    "type": "string"
                                  }
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "group": {
                            "anyOf": [
                              {
                                "type": "object",
                                "required": [
                                  "id",
                                  "label"
                                ],
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "label": {
                                    "type": "string"
                                  }
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "round": {
                            "anyOf": [
                              {
                                "type": "object",
                                "required": [
                                  "id",
                                  "label"
                                ],
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "label": {
                                    "type": "string"
                                  }
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "home_team_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "away_team_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "home_team_name": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "away_team_name": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "scheduled_at": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "field_id": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "field_label": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "facility": {
                            "anyOf": [
                              {
                                "type": "object",
                                "required": [
                                  "id",
                                  "name"
                                ],
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "state": {
                            "type": "string",
                            "enum": [
                              "scheduled",
                              "live",
                              "ended",
                              "report_draft",
                              "report_submitted",
                              "report_official",
                              "corrected",
                              "cancelled",
                              "postponed"
                            ]
                          },
                          "played": {
                            "type": "boolean"
                          },
                          "conflict": {
                            "type": "boolean"
                          },
                          "home_preference": {
                            "type": "string",
                            "enum": [
                              "respected",
                              "not_respected",
                              "not_recorded"
                            ]
                          },
                          "coverage": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "covered",
                                  "pending",
                                  "uncovered"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "etag": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "next_cursor": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "coverage": {
                      "type": "string",
                      "enum": [
                        "ready",
                        "not_permitted"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/calendar/matches/export.xlsx": {
      "get": {
        "tags": [
          "admin",
          "calendar-ops"
        ],
        "summary": "Admin — the filtered match list as a spreadsheet.",
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "tournament_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "phase_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "group_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "round_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "facility_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "field_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "referee_user_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "coverage",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "covered",
                "pending",
                "uncovered"
              ]
            }
          },
          {
            "name": "conflicts_only",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/fixtures/{matchId}": {
      "patch": {
        "tags": [
          "admin",
          "calendar-ops"
        ],
        "summary": "Admin — swap home and away of an unplayed match.",
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "swap_home_away",
                  "reason"
                ],
                "properties": {
                  "swap_home_away": {
                    "type": "boolean",
                    "enum": [
                      true
                    ]
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 500
                  },
                  "expected_etag": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "match"
                  ],
                  "properties": {
                    "match": {
                      "type": "object",
                      "required": [
                        "match_id",
                        "tenant_id",
                        "tournament_id",
                        "round_id",
                        "group_id",
                        "field_id",
                        "scheduled_at",
                        "schedule_precision",
                        "scheduled_on",
                        "state",
                        "home_team_id",
                        "away_team_id",
                        "version",
                        "etag"
                      ],
                      "properties": {
                        "match_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "tenant_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "tournament_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "round_id": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "group_id": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "field_id": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "scheduled_at": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "date-time"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "schedule_precision": {
                          "type": "string",
                          "enum": [
                            "exact",
                            "date_only",
                            "unknown"
                          ]
                        },
                        "scheduled_on": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "date"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "scheduled",
                            "live",
                            "ended",
                            "report_draft",
                            "report_submitted",
                            "report_official",
                            "corrected",
                            "cancelled",
                            "postponed"
                          ]
                        },
                        "home_team_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "away_team_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "version": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "etag": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/fixtures/{matchId}/teams": {
      "post": {
        "tags": [
          "admin",
          "calendar-ops"
        ],
        "summary": "Admin — change the teams of an unplayed group match (OP-005), optionally on its mirrored matches.",
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "tournament_id",
                  "home_team_id",
                  "away_team_id",
                  "reason"
                ],
                "properties": {
                  "tournament_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "home_team_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "away_team_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "propagate_mirrors": {
                    "type": "boolean"
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 500
                  },
                  "expected_etag": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "match",
                    "mirrors",
                    "mirrors_skipped"
                  ],
                  "properties": {
                    "match": {
                      "type": "object",
                      "required": [
                        "match_id",
                        "tenant_id",
                        "tournament_id",
                        "round_id",
                        "group_id",
                        "field_id",
                        "scheduled_at",
                        "schedule_precision",
                        "scheduled_on",
                        "state",
                        "home_team_id",
                        "away_team_id",
                        "version",
                        "etag"
                      ],
                      "properties": {
                        "match_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "tenant_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "tournament_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "round_id": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "group_id": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "field_id": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "scheduled_at": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "date-time"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "schedule_precision": {
                          "type": "string",
                          "enum": [
                            "exact",
                            "date_only",
                            "unknown"
                          ]
                        },
                        "scheduled_on": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "date"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "scheduled",
                            "live",
                            "ended",
                            "report_draft",
                            "report_submitted",
                            "report_official",
                            "corrected",
                            "cancelled",
                            "postponed"
                          ]
                        },
                        "home_team_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "away_team_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "version": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "etag": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    },
                    "mirrors": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "match_id",
                          "tenant_id",
                          "tournament_id",
                          "round_id",
                          "group_id",
                          "field_id",
                          "scheduled_at",
                          "schedule_precision",
                          "scheduled_on",
                          "state",
                          "home_team_id",
                          "away_team_id",
                          "version",
                          "etag"
                        ],
                        "properties": {
                          "match_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "tournament_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "round_id": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "group_id": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "field_id": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "scheduled_at": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "schedule_precision": {
                            "type": "string",
                            "enum": [
                              "exact",
                              "date_only",
                              "unknown"
                            ]
                          },
                          "scheduled_on": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "date"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "state": {
                            "type": "string",
                            "enum": [
                              "scheduled",
                              "live",
                              "ended",
                              "report_draft",
                              "report_submitted",
                              "report_official",
                              "corrected",
                              "cancelled",
                              "postponed"
                            ]
                          },
                          "home_team_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "away_team_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "etag": {
                            "type": "string",
                            "minLength": 1
                          }
                        }
                      }
                    },
                    "mirrors_skipped": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "match_id",
                          "reason"
                        ],
                        "properties": {
                          "match_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "reason": {
                            "type": "string",
                            "enum": [
                              "played_or_reported",
                              "team_already_in_round"
                            ]
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/tournaments/{tournamentId}/communiques": {
      "get": {
        "tags": [
          "admin",
          "communiques"
        ],
        "summary": "Elenca i comunicati del torneo, a cursore",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 300
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Pagina comunicati",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "next_cursor"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "tournament_id",
                          "season_id",
                          "number",
                          "issue_date",
                          "subject",
                          "match_period",
                          "next_match_period",
                          "origin",
                          "status",
                          "filename",
                          "byte_size",
                          "sha256",
                          "replaces_communique_id",
                          "replaced_by_communique_id",
                          "published_at",
                          "withdrawn_at",
                          "withdrawn_reason",
                          "version",
                          "created_at",
                          "updated_at"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "tournament_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "season_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "number": {
                            "type": "integer",
                            "minimum": 1
                          },
                          "issue_date": {
                            "type": "string",
                            "format": "date"
                          },
                          "subject": {
                            "type": "string"
                          },
                          "match_period": {
                            "oneOf": [
                              {
                                "type": "object",
                                "required": [
                                  "from",
                                  "to"
                                ],
                                "properties": {
                                  "from": {
                                    "type": "string",
                                    "format": "date"
                                  },
                                  "to": {
                                    "type": "string",
                                    "format": "date"
                                  }
                                },
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "next_match_period": {
                            "oneOf": [
                              {
                                "type": "object",
                                "required": [
                                  "from",
                                  "to"
                                ],
                                "properties": {
                                  "from": {
                                    "type": "string",
                                    "format": "date"
                                  },
                                  "to": {
                                    "type": "string",
                                    "format": "date"
                                  }
                                },
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "origin": {
                            "type": "string",
                            "enum": [
                              "uploaded",
                              "generated"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "draft",
                              "published",
                              "withdrawn",
                              "replaced"
                            ]
                          },
                          "filename": {
                            "type": "string"
                          },
                          "byte_size": {
                            "type": "integer",
                            "minimum": 1
                          },
                          "sha256": {
                            "type": "string",
                            "pattern": "^[0-9a-f]{64}$"
                          },
                          "replaces_communique_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "replaced_by_communique_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "published_at": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "withdrawn_at": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "withdrawn_reason": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 1
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updated_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    },
                    "next_cursor": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "413": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/tournaments/{tournamentId}/communiques/upload": {
      "post": {
        "tags": [
          "admin",
          "communiques"
        ],
        "summary": "Carica un PDF in bozza e restituisce l’anteprima",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "request_id",
                  "issue_date",
                  "subject",
                  "filename",
                  "content_base64"
                ],
                "properties": {
                  "request_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "issue_date": {
                    "type": "string",
                    "format": "date"
                  },
                  "subject": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 180
                  },
                  "replaces_communique_id": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "filename": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 160
                  },
                  "content_base64": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 4200000
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Replay",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "communique",
                    "preview",
                    "created"
                  ],
                  "properties": {
                    "communique": {
                      "type": "object",
                      "required": [
                        "id",
                        "tournament_id",
                        "season_id",
                        "number",
                        "issue_date",
                        "subject",
                        "match_period",
                        "next_match_period",
                        "origin",
                        "status",
                        "filename",
                        "byte_size",
                        "sha256",
                        "replaces_communique_id",
                        "replaced_by_communique_id",
                        "published_at",
                        "withdrawn_at",
                        "withdrawn_reason",
                        "version",
                        "created_at",
                        "updated_at"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "tournament_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "season_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "number": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "issue_date": {
                          "type": "string",
                          "format": "date"
                        },
                        "subject": {
                          "type": "string"
                        },
                        "match_period": {
                          "oneOf": [
                            {
                              "type": "object",
                              "required": [
                                "from",
                                "to"
                              ],
                              "properties": {
                                "from": {
                                  "type": "string",
                                  "format": "date"
                                },
                                "to": {
                                  "type": "string",
                                  "format": "date"
                                }
                              },
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "next_match_period": {
                          "oneOf": [
                            {
                              "type": "object",
                              "required": [
                                "from",
                                "to"
                              ],
                              "properties": {
                                "from": {
                                  "type": "string",
                                  "format": "date"
                                },
                                "to": {
                                  "type": "string",
                                  "format": "date"
                                }
                              },
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "origin": {
                          "type": "string",
                          "enum": [
                            "uploaded",
                            "generated"
                          ]
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "draft",
                            "published",
                            "withdrawn",
                            "replaced"
                          ]
                        },
                        "filename": {
                          "type": "string"
                        },
                        "byte_size": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "sha256": {
                          "type": "string",
                          "pattern": "^[0-9a-f]{64}$"
                        },
                        "replaces_communique_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "replaced_by_communique_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "published_at": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "date-time"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "withdrawn_at": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "date-time"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "withdrawn_reason": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "version": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updated_at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    },
                    "preview": {
                      "type": "object",
                      "required": [
                        "download_url",
                        "expires_at"
                      ],
                      "properties": {
                        "download_url": {
                          "type": "string",
                          "format": "uri"
                        },
                        "expires_at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    },
                    "created": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "Bozza creata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "communique",
                    "preview",
                    "created"
                  ],
                  "properties": {
                    "communique": {
                      "type": "object",
                      "required": [
                        "id",
                        "tournament_id",
                        "season_id",
                        "number",
                        "issue_date",
                        "subject",
                        "match_period",
                        "next_match_period",
                        "origin",
                        "status",
                        "filename",
                        "byte_size",
                        "sha256",
                        "replaces_communique_id",
                        "replaced_by_communique_id",
                        "published_at",
                        "withdrawn_at",
                        "withdrawn_reason",
                        "version",
                        "created_at",
                        "updated_at"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "tournament_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "season_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "number": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "issue_date": {
                          "type": "string",
                          "format": "date"
                        },
                        "subject": {
                          "type": "string"
                        },
                        "match_period": {
                          "oneOf": [
                            {
                              "type": "object",
                              "required": [
                                "from",
                                "to"
                              ],
                              "properties": {
                                "from": {
                                  "type": "string",
                                  "format": "date"
                                },
                                "to": {
                                  "type": "string",
                                  "format": "date"
                                }
                              },
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "next_match_period": {
                          "oneOf": [
                            {
                              "type": "object",
                              "required": [
                                "from",
                                "to"
                              ],
                              "properties": {
                                "from": {
                                  "type": "string",
                                  "format": "date"
                                },
                                "to": {
                                  "type": "string",
                                  "format": "date"
                                }
                              },
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "origin": {
                          "type": "string",
                          "enum": [
                            "uploaded",
                            "generated"
                          ]
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "draft",
                            "published",
                            "withdrawn",
                            "replaced"
                          ]
                        },
                        "filename": {
                          "type": "string"
                        },
                        "byte_size": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "sha256": {
                          "type": "string",
                          "pattern": "^[0-9a-f]{64}$"
                        },
                        "replaces_communique_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "replaced_by_communique_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "published_at": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "date-time"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "withdrawn_at": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "date-time"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "withdrawn_reason": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "version": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updated_at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    },
                    "preview": {
                      "type": "object",
                      "required": [
                        "download_url",
                        "expires_at"
                      ],
                      "properties": {
                        "download_url": {
                          "type": "string",
                          "format": "uri"
                        },
                        "expires_at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    },
                    "created": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "413": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/tournaments/{tournamentId}/communiques/generate": {
      "post": {
        "tags": [
          "admin",
          "communiques"
        ],
        "summary": "Genera il PDF deterministico dai soli dati ufficiali e restituisce l’anteprima",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "request_id",
                  "issue_date",
                  "subject",
                  "match_period",
                  "next_match_period"
                ],
                "properties": {
                  "request_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "issue_date": {
                    "type": "string",
                    "format": "date"
                  },
                  "subject": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 180
                  },
                  "replaces_communique_id": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "match_period": {
                    "type": "object",
                    "required": [
                      "from",
                      "to"
                    ],
                    "properties": {
                      "from": {
                        "type": "string",
                        "format": "date"
                      },
                      "to": {
                        "type": "string",
                        "format": "date"
                      }
                    },
                    "additionalProperties": false
                  },
                  "next_match_period": {
                    "type": "object",
                    "required": [
                      "from",
                      "to"
                    ],
                    "properties": {
                      "from": {
                        "type": "string",
                        "format": "date"
                      },
                      "to": {
                        "type": "string",
                        "format": "date"
                      }
                    },
                    "additionalProperties": false
                  },
                  "note": {
                    "oneOf": [
                      {
                        "type": "string",
                        "maxLength": 2000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Replay",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "communique",
                    "preview",
                    "created"
                  ],
                  "properties": {
                    "communique": {
                      "type": "object",
                      "required": [
                        "id",
                        "tournament_id",
                        "season_id",
                        "number",
                        "issue_date",
                        "subject",
                        "match_period",
                        "next_match_period",
                        "origin",
                        "status",
                        "filename",
                        "byte_size",
                        "sha256",
                        "replaces_communique_id",
                        "replaced_by_communique_id",
                        "published_at",
                        "withdrawn_at",
                        "withdrawn_reason",
                        "version",
                        "created_at",
                        "updated_at"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "tournament_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "season_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "number": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "issue_date": {
                          "type": "string",
                          "format": "date"
                        },
                        "subject": {
                          "type": "string"
                        },
                        "match_period": {
                          "oneOf": [
                            {
                              "type": "object",
                              "required": [
                                "from",
                                "to"
                              ],
                              "properties": {
                                "from": {
                                  "type": "string",
                                  "format": "date"
                                },
                                "to": {
                                  "type": "string",
                                  "format": "date"
                                }
                              },
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "next_match_period": {
                          "oneOf": [
                            {
                              "type": "object",
                              "required": [
                                "from",
                                "to"
                              ],
                              "properties": {
                                "from": {
                                  "type": "string",
                                  "format": "date"
                                },
                                "to": {
                                  "type": "string",
                                  "format": "date"
                                }
                              },
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "origin": {
                          "type": "string",
                          "enum": [
                            "uploaded",
                            "generated"
                          ]
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "draft",
                            "published",
                            "withdrawn",
                            "replaced"
                          ]
                        },
                        "filename": {
                          "type": "string"
                        },
                        "byte_size": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "sha256": {
                          "type": "string",
                          "pattern": "^[0-9a-f]{64}$"
                        },
                        "replaces_communique_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "replaced_by_communique_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "published_at": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "date-time"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "withdrawn_at": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "date-time"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "withdrawn_reason": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "version": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updated_at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    },
                    "preview": {
                      "type": "object",
                      "required": [
                        "download_url",
                        "expires_at"
                      ],
                      "properties": {
                        "download_url": {
                          "type": "string",
                          "format": "uri"
                        },
                        "expires_at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    },
                    "created": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "Bozza generata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "communique",
                    "preview",
                    "created"
                  ],
                  "properties": {
                    "communique": {
                      "type": "object",
                      "required": [
                        "id",
                        "tournament_id",
                        "season_id",
                        "number",
                        "issue_date",
                        "subject",
                        "match_period",
                        "next_match_period",
                        "origin",
                        "status",
                        "filename",
                        "byte_size",
                        "sha256",
                        "replaces_communique_id",
                        "replaced_by_communique_id",
                        "published_at",
                        "withdrawn_at",
                        "withdrawn_reason",
                        "version",
                        "created_at",
                        "updated_at"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "tournament_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "season_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "number": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "issue_date": {
                          "type": "string",
                          "format": "date"
                        },
                        "subject": {
                          "type": "string"
                        },
                        "match_period": {
                          "oneOf": [
                            {
                              "type": "object",
                              "required": [
                                "from",
                                "to"
                              ],
                              "properties": {
                                "from": {
                                  "type": "string",
                                  "format": "date"
                                },
                                "to": {
                                  "type": "string",
                                  "format": "date"
                                }
                              },
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "next_match_period": {
                          "oneOf": [
                            {
                              "type": "object",
                              "required": [
                                "from",
                                "to"
                              ],
                              "properties": {
                                "from": {
                                  "type": "string",
                                  "format": "date"
                                },
                                "to": {
                                  "type": "string",
                                  "format": "date"
                                }
                              },
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "origin": {
                          "type": "string",
                          "enum": [
                            "uploaded",
                            "generated"
                          ]
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "draft",
                            "published",
                            "withdrawn",
                            "replaced"
                          ]
                        },
                        "filename": {
                          "type": "string"
                        },
                        "byte_size": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "sha256": {
                          "type": "string",
                          "pattern": "^[0-9a-f]{64}$"
                        },
                        "replaces_communique_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "replaced_by_communique_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "published_at": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "date-time"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "withdrawn_at": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "date-time"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "withdrawn_reason": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "version": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updated_at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    },
                    "preview": {
                      "type": "object",
                      "required": [
                        "download_url",
                        "expires_at"
                      ],
                      "properties": {
                        "download_url": {
                          "type": "string",
                          "format": "uri"
                        },
                        "expires_at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    },
                    "created": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "413": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/tournaments/{tournamentId}/communiques/{communiqueId}/publish": {
      "post": {
        "tags": [
          "admin",
          "communiques"
        ],
        "summary": "Pubblica una bozza immutabile ed eventualmente sostituisce il precedente",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "communiqueId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "expected_version"
                ],
                "properties": {
                  "expected_version": {
                    "type": "integer",
                    "minimum": 1
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Pubblicato",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "tournament_id",
                    "season_id",
                    "number",
                    "issue_date",
                    "subject",
                    "match_period",
                    "next_match_period",
                    "origin",
                    "status",
                    "filename",
                    "byte_size",
                    "sha256",
                    "replaces_communique_id",
                    "replaced_by_communique_id",
                    "published_at",
                    "withdrawn_at",
                    "withdrawn_reason",
                    "version",
                    "created_at",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "season_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "number": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "issue_date": {
                      "type": "string",
                      "format": "date"
                    },
                    "subject": {
                      "type": "string"
                    },
                    "match_period": {
                      "oneOf": [
                        {
                          "type": "object",
                          "required": [
                            "from",
                            "to"
                          ],
                          "properties": {
                            "from": {
                              "type": "string",
                              "format": "date"
                            },
                            "to": {
                              "type": "string",
                              "format": "date"
                            }
                          },
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "next_match_period": {
                      "oneOf": [
                        {
                          "type": "object",
                          "required": [
                            "from",
                            "to"
                          ],
                          "properties": {
                            "from": {
                              "type": "string",
                              "format": "date"
                            },
                            "to": {
                              "type": "string",
                              "format": "date"
                            }
                          },
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "origin": {
                      "type": "string",
                      "enum": [
                        "uploaded",
                        "generated"
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "draft",
                        "published",
                        "withdrawn",
                        "replaced"
                      ]
                    },
                    "filename": {
                      "type": "string"
                    },
                    "byte_size": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "sha256": {
                      "type": "string",
                      "pattern": "^[0-9a-f]{64}$"
                    },
                    "replaces_communique_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "replaced_by_communique_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "published_at": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "withdrawn_at": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "withdrawn_reason": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "413": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/tournaments/{tournamentId}/communiques/{communiqueId}/withdraw": {
      "post": {
        "tags": [
          "admin",
          "communiques"
        ],
        "summary": "Ritira un comunicato pubblicato con motivo",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "communiqueId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "expected_version",
                  "reason"
                ],
                "properties": {
                  "expected_version": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 500
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ritirato",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "tournament_id",
                    "season_id",
                    "number",
                    "issue_date",
                    "subject",
                    "match_period",
                    "next_match_period",
                    "origin",
                    "status",
                    "filename",
                    "byte_size",
                    "sha256",
                    "replaces_communique_id",
                    "replaced_by_communique_id",
                    "published_at",
                    "withdrawn_at",
                    "withdrawn_reason",
                    "version",
                    "created_at",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "season_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "number": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "issue_date": {
                      "type": "string",
                      "format": "date"
                    },
                    "subject": {
                      "type": "string"
                    },
                    "match_period": {
                      "oneOf": [
                        {
                          "type": "object",
                          "required": [
                            "from",
                            "to"
                          ],
                          "properties": {
                            "from": {
                              "type": "string",
                              "format": "date"
                            },
                            "to": {
                              "type": "string",
                              "format": "date"
                            }
                          },
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "next_match_period": {
                      "oneOf": [
                        {
                          "type": "object",
                          "required": [
                            "from",
                            "to"
                          ],
                          "properties": {
                            "from": {
                              "type": "string",
                              "format": "date"
                            },
                            "to": {
                              "type": "string",
                              "format": "date"
                            }
                          },
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "origin": {
                      "type": "string",
                      "enum": [
                        "uploaded",
                        "generated"
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "draft",
                        "published",
                        "withdrawn",
                        "replaced"
                      ]
                    },
                    "filename": {
                      "type": "string"
                    },
                    "byte_size": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "sha256": {
                      "type": "string",
                      "pattern": "^[0-9a-f]{64}$"
                    },
                    "replaces_communique_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "replaced_by_communique_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "published_at": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "withdrawn_at": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "withdrawn_reason": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "413": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/tournaments/{tournamentId}/communiques/{communiqueId}/preview": {
      "get": {
        "tags": [
          "admin",
          "communiques"
        ],
        "summary": "URL firmato per l’anteprima della bozza",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "communiqueId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Anteprima",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "communique_id",
                    "filename",
                    "download_url",
                    "expires_at"
                  ],
                  "properties": {
                    "communique_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "filename": {
                      "type": "string"
                    },
                    "download_url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "expires_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "413": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/public/tournaments/{tournamentId}/communiques": {
      "get": {
        "tags": [
          "public",
          "communiques"
        ],
        "summary": "Comunicati pubblicati del torneo, a cursore",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "public",
        "x-rate-limit-tier": "public",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 300
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Pagina comunicati pubblici",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "next_cursor"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "tournament_id",
                          "season_id",
                          "number",
                          "issue_date",
                          "subject",
                          "match_period",
                          "next_match_period",
                          "origin",
                          "status",
                          "filename",
                          "byte_size",
                          "sha256",
                          "replaces_communique_id",
                          "replaced_by_communique_id",
                          "published_at",
                          "withdrawn_at",
                          "withdrawn_reason",
                          "version",
                          "created_at",
                          "updated_at"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "tournament_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "season_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "number": {
                            "type": "integer",
                            "minimum": 1
                          },
                          "issue_date": {
                            "type": "string",
                            "format": "date"
                          },
                          "subject": {
                            "type": "string"
                          },
                          "match_period": {
                            "oneOf": [
                              {
                                "type": "object",
                                "required": [
                                  "from",
                                  "to"
                                ],
                                "properties": {
                                  "from": {
                                    "type": "string",
                                    "format": "date"
                                  },
                                  "to": {
                                    "type": "string",
                                    "format": "date"
                                  }
                                },
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "next_match_period": {
                            "oneOf": [
                              {
                                "type": "object",
                                "required": [
                                  "from",
                                  "to"
                                ],
                                "properties": {
                                  "from": {
                                    "type": "string",
                                    "format": "date"
                                  },
                                  "to": {
                                    "type": "string",
                                    "format": "date"
                                  }
                                },
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "origin": {
                            "type": "string",
                            "enum": [
                              "uploaded",
                              "generated"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "draft",
                              "published",
                              "withdrawn",
                              "replaced"
                            ]
                          },
                          "filename": {
                            "type": "string"
                          },
                          "byte_size": {
                            "type": "integer",
                            "minimum": 1
                          },
                          "sha256": {
                            "type": "string",
                            "pattern": "^[0-9a-f]{64}$"
                          },
                          "replaces_communique_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "replaced_by_communique_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "published_at": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "withdrawn_at": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "withdrawn_reason": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 1
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updated_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    },
                    "next_cursor": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "413": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/public/communiques/{communiqueId}/file": {
      "get": {
        "tags": [
          "public",
          "communiques"
        ],
        "summary": "URL firmato breve del PDF pubblicato",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "public",
        "x-rate-limit-tier": "public",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "communiqueId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Download",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "communique_id",
                    "filename",
                    "download_url",
                    "expires_at"
                  ],
                  "properties": {
                    "communique_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "filename": {
                      "type": "string"
                    },
                    "download_url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "expires_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "413": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/documents": {
      "get": {
        "tags": [
          "admin",
          "documents"
        ],
        "summary": "Elenca i documenti di un ambito, a cursore",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "personal_data",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "scope",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "league",
                "tournament",
                "team",
                "player"
              ]
            }
          },
          {
            "name": "reference_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 500
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Pagina documenti",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "next_cursor"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "organization_id",
                          "scope",
                          "reference_id",
                          "tournament_id",
                          "team_id",
                          "player_id",
                          "title",
                          "type",
                          "visibility",
                          "expires_on",
                          "expired",
                          "file",
                          "version",
                          "created_at",
                          "updated_at"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "organization_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "scope": {
                            "type": "string",
                            "enum": [
                              "league",
                              "tournament",
                              "team",
                              "player"
                            ]
                          },
                          "reference_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "tournament_id": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uuid"
                          },
                          "team_id": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uuid"
                          },
                          "player_id": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uuid"
                          },
                          "title": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "visa",
                              "identity_card",
                              "membership_card",
                              "form",
                              "other"
                            ]
                          },
                          "visibility": {
                            "type": "string",
                            "enum": [
                              "admin",
                              "team",
                              "public"
                            ]
                          },
                          "expires_on": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date"
                          },
                          "expired": {
                            "type": "boolean"
                          },
                          "file": {
                            "type": "object",
                            "required": [
                              "filename",
                              "content_type",
                              "byte_size"
                            ],
                            "properties": {
                              "filename": {
                                "type": "string"
                              },
                              "content_type": {
                                "type": "string",
                                "enum": [
                                  "application/pdf",
                                  "image/jpeg",
                                  "image/png"
                                ]
                              },
                              "byte_size": {
                                "type": "integer",
                                "minimum": 0
                              }
                            }
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updated_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "admin",
          "documents"
        ],
        "summary": "Carica un documento privato, verificandone contenuto e dimensione",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "personal_data",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "organization_id",
                  "scope",
                  "reference_id",
                  "title",
                  "type",
                  "visibility",
                  "filename",
                  "content_base64"
                ],
                "properties": {
                  "organization_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "scope": {
                    "type": "string",
                    "enum": [
                      "league",
                      "tournament",
                      "team",
                      "player"
                    ]
                  },
                  "reference_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "tournament_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "team_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 160
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "visa",
                      "identity_card",
                      "membership_card",
                      "form",
                      "other"
                    ]
                  },
                  "visibility": {
                    "type": "string",
                    "enum": [
                      "admin",
                      "team",
                      "public"
                    ]
                  },
                  "expires_on": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date"
                  },
                  "request_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "filename": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 180
                  },
                  "content_base64": {
                    "type": "string",
                    "minLength": 4,
                    "maxLength": 7000000
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Richiesta già applicata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "organization_id",
                    "scope",
                    "reference_id",
                    "tournament_id",
                    "team_id",
                    "player_id",
                    "title",
                    "type",
                    "visibility",
                    "expires_on",
                    "expired",
                    "file",
                    "version",
                    "created_at",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "organization_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "scope": {
                      "type": "string",
                      "enum": [
                        "league",
                        "tournament",
                        "team",
                        "player"
                      ]
                    },
                    "reference_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "tournament_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "team_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "player_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "title": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "visa",
                        "identity_card",
                        "membership_card",
                        "form",
                        "other"
                      ]
                    },
                    "visibility": {
                      "type": "string",
                      "enum": [
                        "admin",
                        "team",
                        "public"
                      ]
                    },
                    "expires_on": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date"
                    },
                    "expired": {
                      "type": "boolean"
                    },
                    "file": {
                      "type": "object",
                      "required": [
                        "filename",
                        "content_type",
                        "byte_size"
                      ],
                      "properties": {
                        "filename": {
                          "type": "string"
                        },
                        "content_type": {
                          "type": "string",
                          "enum": [
                            "application/pdf",
                            "image/jpeg",
                            "image/png"
                          ]
                        },
                        "byte_size": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "Documento creato",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "organization_id",
                    "scope",
                    "reference_id",
                    "tournament_id",
                    "team_id",
                    "player_id",
                    "title",
                    "type",
                    "visibility",
                    "expires_on",
                    "expired",
                    "file",
                    "version",
                    "created_at",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "organization_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "scope": {
                      "type": "string",
                      "enum": [
                        "league",
                        "tournament",
                        "team",
                        "player"
                      ]
                    },
                    "reference_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "tournament_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "team_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "player_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "title": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "visa",
                        "identity_card",
                        "membership_card",
                        "form",
                        "other"
                      ]
                    },
                    "visibility": {
                      "type": "string",
                      "enum": [
                        "admin",
                        "team",
                        "public"
                      ]
                    },
                    "expires_on": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date"
                    },
                    "expired": {
                      "type": "boolean"
                    },
                    "file": {
                      "type": "object",
                      "required": [
                        "filename",
                        "content_type",
                        "byte_size"
                      ],
                      "properties": {
                        "filename": {
                          "type": "string"
                        },
                        "content_type": {
                          "type": "string",
                          "enum": [
                            "application/pdf",
                            "image/jpeg",
                            "image/png"
                          ]
                        },
                        "byte_size": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/documents/{documentId}": {
      "patch": {
        "tags": [
          "admin",
          "documents"
        ],
        "summary": "Aggiorna metadati e scadenza con versione attesa",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "personal_data",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "documentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "expected_version"
                ],
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 160
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "visa",
                      "identity_card",
                      "membership_card",
                      "form",
                      "other"
                    ]
                  },
                  "visibility": {
                    "type": "string",
                    "enum": [
                      "admin",
                      "team",
                      "public"
                    ]
                  },
                  "expires_on": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date"
                  },
                  "expected_version": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Documento aggiornato",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "organization_id",
                    "scope",
                    "reference_id",
                    "tournament_id",
                    "team_id",
                    "player_id",
                    "title",
                    "type",
                    "visibility",
                    "expires_on",
                    "expired",
                    "file",
                    "version",
                    "created_at",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "organization_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "scope": {
                      "type": "string",
                      "enum": [
                        "league",
                        "tournament",
                        "team",
                        "player"
                      ]
                    },
                    "reference_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "tournament_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "team_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "player_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "title": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "visa",
                        "identity_card",
                        "membership_card",
                        "form",
                        "other"
                      ]
                    },
                    "visibility": {
                      "type": "string",
                      "enum": [
                        "admin",
                        "team",
                        "public"
                      ]
                    },
                    "expires_on": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date"
                    },
                    "expired": {
                      "type": "boolean"
                    },
                    "file": {
                      "type": "object",
                      "required": [
                        "filename",
                        "content_type",
                        "byte_size"
                      ],
                      "properties": {
                        "filename": {
                          "type": "string"
                        },
                        "content_type": {
                          "type": "string",
                          "enum": [
                            "application/pdf",
                            "image/jpeg",
                            "image/png"
                          ]
                        },
                        "byte_size": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "admin",
          "documents"
        ],
        "summary": "Elimina metadato e file privato",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "personal_data",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "documentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "expected_version",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Eliminato"
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/documents/{documentId}/file": {
      "put": {
        "tags": [
          "admin",
          "documents"
        ],
        "summary": "Sostituisce il file e rimuove i byte precedenti",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "personal_data",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "documentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "filename",
                  "content_base64",
                  "expected_version"
                ],
                "properties": {
                  "filename": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 180
                  },
                  "content_base64": {
                    "type": "string",
                    "minLength": 4,
                    "maxLength": 7000000
                  },
                  "expected_version": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Documento aggiornato",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "organization_id",
                    "scope",
                    "reference_id",
                    "tournament_id",
                    "team_id",
                    "player_id",
                    "title",
                    "type",
                    "visibility",
                    "expires_on",
                    "expired",
                    "file",
                    "version",
                    "created_at",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "organization_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "scope": {
                      "type": "string",
                      "enum": [
                        "league",
                        "tournament",
                        "team",
                        "player"
                      ]
                    },
                    "reference_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "tournament_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "team_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "player_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "title": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "visa",
                        "identity_card",
                        "membership_card",
                        "form",
                        "other"
                      ]
                    },
                    "visibility": {
                      "type": "string",
                      "enum": [
                        "admin",
                        "team",
                        "public"
                      ]
                    },
                    "expires_on": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date"
                    },
                    "expired": {
                      "type": "boolean"
                    },
                    "file": {
                      "type": "object",
                      "required": [
                        "filename",
                        "content_type",
                        "byte_size"
                      ],
                      "properties": {
                        "filename": {
                          "type": "string"
                        },
                        "content_type": {
                          "type": "string",
                          "enum": [
                            "application/pdf",
                            "image/jpeg",
                            "image/png"
                          ]
                        },
                        "byte_size": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/documents/{documentId}/download": {
      "get": {
        "tags": [
          "admin",
          "documents"
        ],
        "summary": "Genera un URL firmato breve; il download personale è registrato",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "personal_data",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "documentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Download",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "document",
                    "download_url",
                    "expires_at"
                  ],
                  "properties": {
                    "document": {
                      "type": "object",
                      "required": [
                        "id",
                        "organization_id",
                        "scope",
                        "reference_id",
                        "tournament_id",
                        "team_id",
                        "player_id",
                        "title",
                        "type",
                        "visibility",
                        "expires_on",
                        "expired",
                        "file",
                        "version",
                        "created_at",
                        "updated_at"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "organization_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "scope": {
                          "type": "string",
                          "enum": [
                            "league",
                            "tournament",
                            "team",
                            "player"
                          ]
                        },
                        "reference_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "tournament_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "uuid"
                        },
                        "team_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "uuid"
                        },
                        "player_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "uuid"
                        },
                        "title": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "visa",
                            "identity_card",
                            "membership_card",
                            "form",
                            "other"
                          ]
                        },
                        "visibility": {
                          "type": "string",
                          "enum": [
                            "admin",
                            "team",
                            "public"
                          ]
                        },
                        "expires_on": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date"
                        },
                        "expired": {
                          "type": "boolean"
                        },
                        "file": {
                          "type": "object",
                          "required": [
                            "filename",
                            "content_type",
                            "byte_size"
                          ],
                          "properties": {
                            "filename": {
                              "type": "string"
                            },
                            "content_type": {
                              "type": "string",
                              "enum": [
                                "application/pdf",
                                "image/jpeg",
                                "image/png"
                              ]
                            },
                            "byte_size": {
                              "type": "integer",
                              "minimum": 0
                            }
                          }
                        },
                        "version": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updated_at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    },
                    "download_url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "expires_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/tournaments/{tournamentId}/documents/download.zip": {
      "get": {
        "tags": [
          "admin",
          "documents"
        ],
        "summary": "Scarica in blocco i documenti del torneo, opzionalmente per squadra",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "personal_data",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "team",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Archivio ZIP",
            "content": {
              "application/zip": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/me/team-area/document-files": {
      "get": {
        "tags": [
          "session",
          "documents"
        ],
        "summary": "Modulistica e documenti della squadra con delega can_documents",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "personal_data",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "team_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "tournament_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Documenti scaricabili",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "document",
                          "download_url",
                          "expires_at"
                        ],
                        "properties": {
                          "document": {
                            "type": "object",
                            "required": [
                              "id",
                              "organization_id",
                              "scope",
                              "reference_id",
                              "tournament_id",
                              "team_id",
                              "player_id",
                              "title",
                              "type",
                              "visibility",
                              "expires_on",
                              "expired",
                              "file",
                              "version",
                              "created_at",
                              "updated_at"
                            ],
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "organization_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "scope": {
                                "type": "string",
                                "enum": [
                                  "league",
                                  "tournament",
                                  "team",
                                  "player"
                                ]
                              },
                              "reference_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "tournament_id": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "format": "uuid"
                              },
                              "team_id": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "format": "uuid"
                              },
                              "player_id": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "format": "uuid"
                              },
                              "title": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "visa",
                                  "identity_card",
                                  "membership_card",
                                  "form",
                                  "other"
                                ]
                              },
                              "visibility": {
                                "type": "string",
                                "enum": [
                                  "admin",
                                  "team",
                                  "public"
                                ]
                              },
                              "expires_on": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "format": "date"
                              },
                              "expired": {
                                "type": "boolean"
                              },
                              "file": {
                                "type": "object",
                                "required": [
                                  "filename",
                                  "content_type",
                                  "byte_size"
                                ],
                                "properties": {
                                  "filename": {
                                    "type": "string"
                                  },
                                  "content_type": {
                                    "type": "string",
                                    "enum": [
                                      "application/pdf",
                                      "image/jpeg",
                                      "image/png"
                                    ]
                                  },
                                  "byte_size": {
                                    "type": "integer",
                                    "minimum": 0
                                  }
                                }
                              },
                              "version": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "created_at": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "updated_at": {
                                "type": "string",
                                "format": "date-time"
                              }
                            }
                          },
                          "download_url": {
                            "type": "string",
                            "format": "uri"
                          },
                          "expires_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/public/tournaments/{tournamentId}/documents": {
      "get": {
        "tags": [
          "public",
          "documents"
        ],
        "summary": "Modulistica pubblica del torneo con URL firmati brevi",
        "security": [
          {
            "ApiKey": [
              "read:public.matches"
            ]
          }
        ],
        "x-tenant-scope": "public",
        "x-privacy-classification": "public",
        "x-rate-limit-tier": "public_widget",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Moduli pubblici",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "document",
                          "download_url",
                          "expires_at"
                        ],
                        "properties": {
                          "document": {
                            "type": "object",
                            "required": [
                              "id",
                              "organization_id",
                              "scope",
                              "reference_id",
                              "tournament_id",
                              "team_id",
                              "player_id",
                              "title",
                              "type",
                              "visibility",
                              "expires_on",
                              "expired",
                              "file",
                              "version",
                              "created_at",
                              "updated_at"
                            ],
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "organization_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "scope": {
                                "type": "string",
                                "enum": [
                                  "league",
                                  "tournament",
                                  "team",
                                  "player"
                                ]
                              },
                              "reference_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "tournament_id": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "format": "uuid"
                              },
                              "team_id": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "format": "uuid"
                              },
                              "player_id": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "format": "uuid"
                              },
                              "title": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "visa",
                                  "identity_card",
                                  "membership_card",
                                  "form",
                                  "other"
                                ]
                              },
                              "visibility": {
                                "type": "string",
                                "enum": [
                                  "admin",
                                  "team",
                                  "public"
                                ]
                              },
                              "expires_on": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "format": "date"
                              },
                              "expired": {
                                "type": "boolean"
                              },
                              "file": {
                                "type": "object",
                                "required": [
                                  "filename",
                                  "content_type",
                                  "byte_size"
                                ],
                                "properties": {
                                  "filename": {
                                    "type": "string"
                                  },
                                  "content_type": {
                                    "type": "string",
                                    "enum": [
                                      "application/pdf",
                                      "image/jpeg",
                                      "image/png"
                                    ]
                                  },
                                  "byte_size": {
                                    "type": "integer",
                                    "minimum": 0
                                  }
                                }
                              },
                              "version": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "created_at": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "updated_at": {
                                "type": "string",
                                "format": "date-time"
                              }
                            }
                          },
                          "download_url": {
                            "type": "string",
                            "format": "uri"
                          },
                          "expires_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/news/{newsArticleId}/tournaments": {
      "put": {
        "tags": [
          "admin",
          "tournament-pages"
        ],
        "summary": "Associa la news a più tornei",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "responses": {
          "200": {
            "description": "Operazione completata"
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "tournament_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "maxItems": 100
                  },
                  "expected_version": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "required": [
                  "tournament_ids",
                  "expected_version"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "parameters": [
          {
            "name": "newsArticleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/admin/news/{newsArticleId}/flags": {
      "put": {
        "tags": [
          "admin",
          "tournament-pages"
        ],
        "summary": "Aggiorna slideshow, breaking e sidebar",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "responses": {
          "200": {
            "description": "Operazione completata"
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "in_slideshow": {
                    "type": "boolean"
                  },
                  "slideshow_image_media_id": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "breaking": {
                    "type": "boolean"
                  },
                  "sidebar": {
                    "type": "boolean"
                  },
                  "expected_version": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "required": [
                  "in_slideshow",
                  "slideshow_image_media_id",
                  "breaking",
                  "sidebar",
                  "expected_version"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "parameters": [
          {
            "name": "newsArticleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/admin/news/{newsArticleId}/duplicate": {
      "post": {
        "tags": [
          "admin",
          "tournament-pages"
        ],
        "summary": "Duplica la news come bozza",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "responses": {
          "200": {
            "description": "Operazione completata"
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "request_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "request_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "parameters": [
          {
            "name": "newsArticleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/admin/tournaments/{tournamentId}/pages": {
      "get": {
        "tags": [
          "admin",
          "tournament-pages"
        ],
        "summary": "Elenca le pagine del torneo",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "responses": {
          "200": {
            "description": "Operazione completata"
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "after",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 20
            }
          },
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "post": {
        "tags": [
          "admin",
          "tournament-pages"
        ],
        "summary": "Crea una pagina del torneo",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "responses": {
          "200": {
            "description": "Operazione completata"
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "request_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 160
                  },
                  "content_html": {
                    "type": "string",
                    "maxLength": 50000
                  }
                },
                "required": [
                  "request_id",
                  "title",
                  "content_html"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/admin/tournaments/{tournamentId}/pages/{pageId}": {
      "put": {
        "tags": [
          "admin",
          "tournament-pages"
        ],
        "summary": "Aggiorna una pagina del torneo",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "responses": {
          "200": {
            "description": "Operazione completata"
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "expected_version": {
                    "type": "integer",
                    "exclusiveMinimum": 0
                  },
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 160
                  },
                  "content_html": {
                    "type": "string",
                    "maxLength": 50000
                  }
                },
                "required": [
                  "expected_version",
                  "title",
                  "content_html"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "delete": {
        "tags": [
          "admin",
          "tournament-pages"
        ],
        "summary": "Elimina una pagina del torneo",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "responses": {
          "200": {
            "description": "Operazione completata"
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "expected_version",
            "in": "query",
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0
            },
            "required": true
          },
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/admin/tournaments/{tournamentId}/pages/{pageId}/set-home": {
      "put": {
        "tags": [
          "admin",
          "tournament-pages"
        ],
        "summary": "Imposta la pagina home unica del torneo",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "responses": {
          "200": {
            "description": "Operazione completata"
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "expected_version": {
                    "type": "integer",
                    "exclusiveMinimum": 0
                  }
                },
                "required": [
                  "expected_version"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/public/tournaments/{tournamentId}/news": {
      "get": {
        "tags": [
          "public",
          "tournament-pages"
        ],
        "summary": "News pubblicate del torneo",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "public",
        "x-rate-limit-tier": "public",
        "x-audit-required": false,
        "responses": {
          "200": {
            "description": "Pagina a cursore"
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "after",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 20
            }
          },
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/public/tournaments/{tournamentId}/pages": {
      "get": {
        "tags": [
          "public",
          "tournament-pages"
        ],
        "summary": "Pagine pubbliche del torneo",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "public",
        "x-rate-limit-tier": "public",
        "x-audit-required": false,
        "responses": {
          "200": {
            "description": "Pagina a cursore"
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "after",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 20
            }
          },
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/admin/sponsor-categories": {
      "get": {
        "tags": [
          "admin",
          "league-sponsors"
        ],
        "summary": "Categorie del blocco sponsor, paginate a cursore",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Pagina",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "next_cursor"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "title",
                          "sort_order",
                          "state",
                          "version",
                          "updated_at"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "title": {
                            "type": "string"
                          },
                          "sort_order": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "state": {
                            "type": "string"
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "updated_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    },
                    "next_cursor": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "admin",
          "league-sponsors"
        ],
        "summary": "Crea una categoria sponsor, ripetibile per request_id",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "request_id",
                  "title"
                ],
                "properties": {
                  "request_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "title": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Già creata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "title",
                    "sort_order",
                    "state",
                    "version",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "title": {
                      "type": "string"
                    },
                    "sort_order": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "state": {
                      "type": "string"
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "Creata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "title",
                    "sort_order",
                    "state",
                    "version",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "title": {
                      "type": "string"
                    },
                    "sort_order": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "state": {
                      "type": "string"
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/sponsor-categories/order": {
      "put": {
        "tags": [
          "admin",
          "league-sponsors"
        ],
        "summary": "Riordina tutte le categorie attive con controllo versione",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "items"
                ],
                "properties": {
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "id",
                        "expected_version"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "expected_version": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Pagina riordinata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "next_cursor"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "title",
                          "sort_order",
                          "state",
                          "version",
                          "updated_at"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "title": {
                            "type": "string"
                          },
                          "sort_order": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "state": {
                            "type": "string"
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "updated_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    },
                    "next_cursor": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/sponsor-categories/{categoryId}": {
      "patch": {
        "tags": [
          "admin",
          "league-sponsors"
        ],
        "summary": "Rinomina una categoria sponsor",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "categoryId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "title",
                  "expected_version"
                ],
                "properties": {
                  "title": {
                    "type": "string"
                  },
                  "expected_version": {
                    "type": "integer",
                    "minimum": 0
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Categoria",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "title",
                    "sort_order",
                    "state",
                    "version",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "title": {
                      "type": "string"
                    },
                    "sort_order": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "state": {
                      "type": "string"
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "admin",
          "league-sponsors"
        ],
        "summary": "Archivia categoria e sponsor figli dopo conferma esplicita",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "categoryId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "expected_version",
                  "confirm_archive_sponsors"
                ],
                "properties": {
                  "expected_version": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "confirm_archive_sponsors": {
                    "type": "boolean",
                    "enum": [
                      true
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Categoria archiviata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "title",
                    "sort_order",
                    "state",
                    "version",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "title": {
                      "type": "string"
                    },
                    "sort_order": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "state": {
                      "type": "string"
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/league-sponsors": {
      "get": {
        "tags": [
          "admin",
          "league-sponsors"
        ],
        "summary": "Sponsor della lega, paginati a cursore",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "category_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "active_only",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Pagina",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "next_cursor"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "category_id",
                          "image_media_id",
                          "link_url",
                          "sort_order",
                          "active",
                          "state",
                          "version",
                          "updated_at"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "category_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "image_media_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "link_url": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uri",
                                "pattern": "^https?://"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "sort_order": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "active": {
                            "type": "boolean"
                          },
                          "state": {
                            "type": "string"
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "updated_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    },
                    "next_cursor": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "admin",
          "league-sponsors"
        ],
        "summary": "Aggiunge al blocco un’immagine approvata della libreria media",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "request_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "category_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "image_media_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "link_url": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uri",
                        "pattern": "^https?:\\/\\/"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  }
                },
                "required": [
                  "request_id",
                  "category_id",
                  "image_media_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Già creato",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "category_id",
                    "image_media_id",
                    "link_url",
                    "sort_order",
                    "active",
                    "state",
                    "version",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "category_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "image_media_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "link_url": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uri",
                          "pattern": "^https?://"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "sort_order": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "active": {
                      "type": "boolean"
                    },
                    "state": {
                      "type": "string"
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "Creato",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "category_id",
                    "image_media_id",
                    "link_url",
                    "sort_order",
                    "active",
                    "state",
                    "version",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "category_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "image_media_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "link_url": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uri",
                          "pattern": "^https?://"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "sort_order": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "active": {
                      "type": "boolean"
                    },
                    "state": {
                      "type": "string"
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/league-sponsors/order": {
      "put": {
        "tags": [
          "admin",
          "league-sponsors"
        ],
        "summary": "Riordina tutti gli sponsor attivi",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "items"
                ],
                "properties": {
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "id",
                        "expected_version"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "expected_version": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Pagina riordinata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "next_cursor"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "category_id",
                          "image_media_id",
                          "link_url",
                          "sort_order",
                          "active",
                          "state",
                          "version",
                          "updated_at"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "category_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "image_media_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "link_url": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uri",
                                "pattern": "^https?://"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "sort_order": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "active": {
                            "type": "boolean"
                          },
                          "state": {
                            "type": "string"
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "updated_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    },
                    "next_cursor": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/league-sponsors/settings": {
      "get": {
        "tags": [
          "admin",
          "league-sponsors"
        ],
        "summary": "Legge la visibilità del blocco (default N-19: pagine interne)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "responses": {
          "200": {
            "description": "Impostazioni",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "visibility",
                    "version",
                    "updated_at"
                  ],
                  "properties": {
                    "visibility": {
                      "type": "string"
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updated_at": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "admin",
          "league-sponsors"
        ],
        "summary": "Imposta la visibilità del blocco (default N-19: pagine interne)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "visibility",
                  "expected_version"
                ],
                "properties": {
                  "visibility": {
                    "type": "string",
                    "enum": [
                      "home_only",
                      "all_internal_pages"
                    ]
                  },
                  "expected_version": {
                    "type": "integer",
                    "minimum": 0
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Impostazioni",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "visibility",
                    "version",
                    "updated_at"
                  ],
                  "properties": {
                    "visibility": {
                      "type": "string"
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updated_at": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/league-sponsors/{sponsorId}": {
      "patch": {
        "tags": [
          "admin",
          "league-sponsors"
        ],
        "summary": "Modifica sponsor non archiviato",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "sponsorId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "expected_version": {
                    "type": "integer",
                    "exclusiveMinimum": 0
                  },
                  "category_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "image_media_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "link_url": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uri",
                        "pattern": "^https?:\\/\\/"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  }
                },
                "required": [
                  "expected_version",
                  "category_id",
                  "image_media_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Sponsor",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "category_id",
                    "image_media_id",
                    "link_url",
                    "sort_order",
                    "active",
                    "state",
                    "version",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "category_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "image_media_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "link_url": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uri",
                          "pattern": "^https?://"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "sort_order": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "active": {
                      "type": "boolean"
                    },
                    "state": {
                      "type": "string"
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "admin",
          "league-sponsors"
        ],
        "summary": "Archivia uno sponsor",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "sponsorId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "expected_version",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sponsor archiviato",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "category_id",
                    "image_media_id",
                    "link_url",
                    "sort_order",
                    "active",
                    "state",
                    "version",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "category_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "image_media_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "link_url": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uri",
                          "pattern": "^https?://"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "sort_order": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "active": {
                      "type": "boolean"
                    },
                    "state": {
                      "type": "string"
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/league-sponsors/{sponsorId}/status": {
      "post": {
        "tags": [
          "admin",
          "league-sponsors"
        ],
        "summary": "Attiva o disattiva uno sponsor",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "sponsorId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "active",
                  "expected_version"
                ],
                "properties": {
                  "active": {
                    "type": "boolean"
                  },
                  "expected_version": {
                    "type": "integer",
                    "minimum": 0
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Sponsor",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "category_id",
                    "image_media_id",
                    "link_url",
                    "sort_order",
                    "active",
                    "state",
                    "version",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "category_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "image_media_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "link_url": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uri",
                          "pattern": "^https?://"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "sort_order": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "active": {
                      "type": "boolean"
                    },
                    "state": {
                      "type": "string"
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/tournaments/{tournamentId}/banners": {
      "get": {
        "tags": [
          "admin",
          "league-sponsors"
        ],
        "summary": "Banner del torneo, paginati a cursore",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "saved",
                "active",
                "inactive",
                "archived"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Pagina",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "next_cursor"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "tournament_id",
                          "name",
                          "slot",
                          "format",
                          "image_media_id",
                          "image_width",
                          "image_height",
                          "link_url",
                          "starts_on",
                          "ends_on",
                          "state",
                          "activated_at",
                          "version",
                          "updated_at"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "tournament_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "name": {
                            "type": "string"
                          },
                          "slot": {
                            "type": "string",
                            "enum": [
                              "tournament",
                              "league",
                              "native",
                              "live"
                            ]
                          },
                          "format": {
                            "type": "string",
                            "enum": [
                              "q",
                              "leader",
                              "native",
                              "live"
                            ]
                          },
                          "image_media_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "image_width": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "image_height": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "link_url": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uri",
                                "pattern": "^https?://"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "starts_on": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "date"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "ends_on": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "date"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "state": {
                            "type": "string",
                            "enum": [
                              "saved",
                              "active",
                              "inactive",
                              "archived"
                            ]
                          },
                          "activated_at": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "updated_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    },
                    "next_cursor": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "admin",
          "league-sponsors"
        ],
        "summary": "Salva o salva e attiva un banner della libreria media",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 160
                  },
                  "slot": {
                    "type": "string",
                    "enum": [
                      "tournament",
                      "league",
                      "native",
                      "live"
                    ]
                  },
                  "format": {
                    "type": "string",
                    "enum": [
                      "q",
                      "leader",
                      "native",
                      "live"
                    ]
                  },
                  "image_media_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "image_width": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 8192
                  },
                  "image_height": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 8192
                  },
                  "link_url": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uri",
                        "pattern": "^https?:\\/\\/"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "starts_on": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "date"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "ends_on": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "date"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "request_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "activate": {
                    "type": "boolean",
                    "default": false
                  }
                },
                "required": [
                  "name",
                  "slot",
                  "format",
                  "image_media_id",
                  "image_width",
                  "image_height",
                  "request_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Già creato",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "tournament_id",
                    "name",
                    "slot",
                    "format",
                    "image_media_id",
                    "image_width",
                    "image_height",
                    "link_url",
                    "starts_on",
                    "ends_on",
                    "state",
                    "activated_at",
                    "version",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "name": {
                      "type": "string"
                    },
                    "slot": {
                      "type": "string",
                      "enum": [
                        "tournament",
                        "league",
                        "native",
                        "live"
                      ]
                    },
                    "format": {
                      "type": "string",
                      "enum": [
                        "q",
                        "leader",
                        "native",
                        "live"
                      ]
                    },
                    "image_media_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "image_width": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "image_height": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "link_url": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uri",
                          "pattern": "^https?://"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "starts_on": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "date"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ends_on": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "date"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "state": {
                      "type": "string",
                      "enum": [
                        "saved",
                        "active",
                        "inactive",
                        "archived"
                      ]
                    },
                    "activated_at": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "Creato",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "tournament_id",
                    "name",
                    "slot",
                    "format",
                    "image_media_id",
                    "image_width",
                    "image_height",
                    "link_url",
                    "starts_on",
                    "ends_on",
                    "state",
                    "activated_at",
                    "version",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "name": {
                      "type": "string"
                    },
                    "slot": {
                      "type": "string",
                      "enum": [
                        "tournament",
                        "league",
                        "native",
                        "live"
                      ]
                    },
                    "format": {
                      "type": "string",
                      "enum": [
                        "q",
                        "leader",
                        "native",
                        "live"
                      ]
                    },
                    "image_media_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "image_width": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "image_height": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "link_url": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uri",
                          "pattern": "^https?://"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "starts_on": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "date"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ends_on": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "date"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "state": {
                      "type": "string",
                      "enum": [
                        "saved",
                        "active",
                        "inactive",
                        "archived"
                      ]
                    },
                    "activated_at": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "admin",
          "league-sponsors"
        ],
        "summary": "Modifica un banner mai attivato",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "banner_id",
                  "expected_version",
                  "name",
                  "slot",
                  "format",
                  "image_media_id",
                  "image_width",
                  "image_height",
                  "link_url",
                  "starts_on",
                  "ends_on"
                ],
                "properties": {
                  "banner_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "expected_version": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "name": {
                    "type": "string"
                  },
                  "slot": {
                    "type": "string",
                    "enum": [
                      "tournament",
                      "league",
                      "native",
                      "live"
                    ]
                  },
                  "format": {
                    "type": "string",
                    "enum": [
                      "q",
                      "leader",
                      "native",
                      "live"
                    ]
                  },
                  "image_media_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "image_width": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "image_height": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "link_url": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uri",
                        "pattern": "^https?://"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "starts_on": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "date"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "ends_on": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "date"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Banner",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "tournament_id",
                    "name",
                    "slot",
                    "format",
                    "image_media_id",
                    "image_width",
                    "image_height",
                    "link_url",
                    "starts_on",
                    "ends_on",
                    "state",
                    "activated_at",
                    "version",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "name": {
                      "type": "string"
                    },
                    "slot": {
                      "type": "string",
                      "enum": [
                        "tournament",
                        "league",
                        "native",
                        "live"
                      ]
                    },
                    "format": {
                      "type": "string",
                      "enum": [
                        "q",
                        "leader",
                        "native",
                        "live"
                      ]
                    },
                    "image_media_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "image_width": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "image_height": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "link_url": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uri",
                          "pattern": "^https?://"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "starts_on": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "date"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ends_on": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "date"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "state": {
                      "type": "string",
                      "enum": [
                        "saved",
                        "active",
                        "inactive",
                        "archived"
                      ]
                    },
                    "activated_at": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "admin",
          "league-sponsors"
        ],
        "summary": "Archivia un banner del torneo",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "banner_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "expected_version",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Banner archiviato",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "tournament_id",
                    "name",
                    "slot",
                    "format",
                    "image_media_id",
                    "image_width",
                    "image_height",
                    "link_url",
                    "starts_on",
                    "ends_on",
                    "state",
                    "activated_at",
                    "version",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "name": {
                      "type": "string"
                    },
                    "slot": {
                      "type": "string",
                      "enum": [
                        "tournament",
                        "league",
                        "native",
                        "live"
                      ]
                    },
                    "format": {
                      "type": "string",
                      "enum": [
                        "q",
                        "leader",
                        "native",
                        "live"
                      ]
                    },
                    "image_media_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "image_width": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "image_height": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "link_url": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uri",
                          "pattern": "^https?://"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "starts_on": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "date"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ends_on": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "date"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "state": {
                      "type": "string",
                      "enum": [
                        "saved",
                        "active",
                        "inactive",
                        "archived"
                      ]
                    },
                    "activated_at": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/tournaments/{tournamentId}/banners/status": {
      "post": {
        "tags": [
          "admin",
          "league-sponsors"
        ],
        "summary": "Attiva o disattiva; la prima attivazione rende i contenuti immutabili",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "banner_id",
                  "active",
                  "expected_version"
                ],
                "properties": {
                  "banner_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "active": {
                    "type": "boolean"
                  },
                  "expected_version": {
                    "type": "integer",
                    "minimum": 0
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Banner",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "tournament_id",
                    "name",
                    "slot",
                    "format",
                    "image_media_id",
                    "image_width",
                    "image_height",
                    "link_url",
                    "starts_on",
                    "ends_on",
                    "state",
                    "activated_at",
                    "version",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "name": {
                      "type": "string"
                    },
                    "slot": {
                      "type": "string",
                      "enum": [
                        "tournament",
                        "league",
                        "native",
                        "live"
                      ]
                    },
                    "format": {
                      "type": "string",
                      "enum": [
                        "q",
                        "leader",
                        "native",
                        "live"
                      ]
                    },
                    "image_media_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "image_width": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "image_height": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "link_url": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uri",
                          "pattern": "^https?://"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "starts_on": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "date"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ends_on": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "date"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "state": {
                      "type": "string",
                      "enum": [
                        "saved",
                        "active",
                        "inactive",
                        "archived"
                      ]
                    },
                    "activated_at": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/public/league-sponsors": {
      "get": {
        "tags": [
          "public",
          "league-sponsors"
        ],
        "summary": "Blocco sponsor ufficiali senza dati personali",
        "security": [
          {
            "ApiKey": [
              "read:public.media"
            ]
          }
        ],
        "x-tenant-scope": "public",
        "x-privacy-classification": "public",
        "x-rate-limit-tier": "public_widget",
        "x-audit-required": false,
        "responses": {
          "200": {
            "description": "Blocco sponsor",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "visibility",
                    "categories"
                  ],
                  "properties": {
                    "visibility": {
                      "type": "string"
                    },
                    "categories": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "title",
                          "sponsors"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "title": {
                            "type": "string"
                          },
                          "sponsors": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "id",
                                "category_id",
                                "category_title",
                                "image_media_id",
                                "link_url"
                              ],
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "category_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "category_title": {
                                  "type": "string"
                                },
                                "image_media_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "link_url": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "format": "uri",
                                      "pattern": "^https?://"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/public/tournaments/{tournamentId}/banners": {
      "get": {
        "tags": [
          "public",
          "league-sponsors"
        ],
        "summary": "Banner attivi del solo torneo pubblicato e della città richiesta",
        "security": [
          {
            "ApiKey": [
              "read:public.media"
            ]
          }
        ],
        "x-tenant-scope": "public",
        "x-privacy-classification": "public",
        "x-rate-limit-tier": "public_widget",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Banner",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "tournament_id",
                          "name",
                          "slot",
                          "format",
                          "image_media_id",
                          "image_width",
                          "image_height",
                          "link_url",
                          "starts_on",
                          "ends_on",
                          "state",
                          "activated_at",
                          "version",
                          "updated_at"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "tournament_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "name": {
                            "type": "string"
                          },
                          "slot": {
                            "type": "string",
                            "enum": [
                              "tournament",
                              "league",
                              "native",
                              "live"
                            ]
                          },
                          "format": {
                            "type": "string",
                            "enum": [
                              "q",
                              "leader",
                              "native",
                              "live"
                            ]
                          },
                          "image_media_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "image_width": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "image_height": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "link_url": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uri",
                                "pattern": "^https?://"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "starts_on": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "date"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "ends_on": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "date"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "state": {
                            "type": "string",
                            "enum": [
                              "saved",
                              "active",
                              "inactive",
                              "archived"
                            ]
                          },
                          "activated_at": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "updated_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/player-links": {
      "post": {
        "tags": [
          "admin",
          "player-links"
        ],
        "summary": "Avvia un collegamento utente-giocatore nella coda esistente",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "pseudonymized",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "request_id",
                  "user_id",
                  "player_id",
                  "reason",
                  "confirmed"
                ],
                "properties": {
                  "request_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "user_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "player_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 500
                  },
                  "confirmed": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ripetizione idempotente",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "claim_id",
                    "player_id",
                    "status"
                  ],
                  "properties": {
                    "claim_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "player_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "approved"
                      ]
                    },
                    "created": {
                      "type": "boolean"
                    },
                    "superseded_count": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "201": {
            "description": "Richiesta creata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "claim_id",
                    "player_id",
                    "status"
                  ],
                  "properties": {
                    "claim_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "player_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "approved"
                      ]
                    },
                    "created": {
                      "type": "boolean"
                    },
                    "superseded_count": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/player-claims/{claimId}/approve": {
      "post": {
        "tags": [
          "admin",
          "player-links"
        ],
        "summary": "Approva e supera le altre richieste sullo stesso giocatore",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "pseudonymized",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "claimId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "reason",
                  "confirmed"
                ],
                "properties": {
                  "reason": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 500
                  },
                  "confirmed": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Collegamento approvato",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "claim_id",
                    "player_id",
                    "status"
                  ],
                  "properties": {
                    "claim_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "player_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "approved"
                      ]
                    },
                    "created": {
                      "type": "boolean"
                    },
                    "superseded_count": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/player-links/pending-count": {
      "get": {
        "tags": [
          "admin",
          "player-links"
        ],
        "summary": "Conta i collegamenti ancora da verificare",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "pseudonymized",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "responses": {
          "200": {
            "description": "Conteggio pendente",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "count"
                  ],
                  "properties": {
                    "count": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/teams/{teamId}/roster/import-from-archive": {
      "post": {
        "tags": [
          "admin",
          "player-links"
        ],
        "summary": "Importa un record verificato nella rosa senza unioni per nome",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "pseudonymized",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "record_id",
                  "season_id",
                  "shirt_number",
                  "from_date",
                  "is_minor",
                  "expected_record_etag",
                  "reason",
                  "confirmed"
                ],
                "properties": {
                  "record_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "season_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "shirt_number": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 99
                  },
                  "from_date": {
                    "type": "string",
                    "format": "date"
                  },
                  "is_minor": {
                    "type": "boolean"
                  },
                  "expected_record_etag": {
                    "type": "string"
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 500
                  },
                  "confirmed": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Giocatore e voce di rosa",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "record_id",
                    "player_id",
                    "roster_entry_id",
                    "player_created"
                  ],
                  "properties": {
                    "record_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "player_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "roster_entry_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "player_created": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/players/{playerId}/private-profile": {
      "get": {
        "tags": [
          "admin",
          "player-registry"
        ],
        "summary": "Anagrafica privata del giocatore (player.read.private; lettura in audit)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "personal_data",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "playerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Anagrafica",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "player_id",
                    "first_name",
                    "last_name",
                    "date_of_birth",
                    "birth_place",
                    "residence_place",
                    "nationality",
                    "tax_code",
                    "email",
                    "is_minor",
                    "institutional_photo",
                    "version",
                    "updated_at",
                    "updated_by"
                  ],
                  "properties": {
                    "player_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "first_name": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "minLength": 1,
                      "maxLength": 80
                    },
                    "last_name": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "minLength": 1,
                      "maxLength": 80
                    },
                    "date_of_birth": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date"
                    },
                    "birth_place": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "minLength": 1,
                      "maxLength": 120
                    },
                    "residence_place": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "minLength": 1,
                      "maxLength": 120
                    },
                    "nationality": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "minLength": 1,
                      "maxLength": 80
                    },
                    "tax_code": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[A-Z0-9]{16}$"
                    },
                    "email": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "email",
                      "maxLength": 254
                    },
                    "is_minor": {
                      "type": "boolean"
                    },
                    "institutional_photo": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "required": [
                        "content_type",
                        "byte_size",
                        "uploaded_at",
                        "url"
                      ],
                      "properties": {
                        "content_type": {
                          "type": "string",
                          "enum": [
                            "image/jpeg",
                            "image/png",
                            "image/webp"
                          ]
                        },
                        "byte_size": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "uploaded_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "url": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "minLength": 1
                        }
                      }
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updated_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "updated_by": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "admin",
          "player-registry"
        ],
        "summary": "Salva l’anagrafica privata; il flag minore segue la data di nascita",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "personal_data",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "playerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "first_name",
                  "last_name",
                  "date_of_birth",
                  "birth_place",
                  "residence_place",
                  "nationality",
                  "tax_code",
                  "expected_version"
                ],
                "properties": {
                  "first_name": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "last_name": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "date_of_birth": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date"
                  },
                  "birth_place": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "residence_place": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "nationality": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "tax_code": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "pattern": "^[A-Z0-9]{16}$"
                  },
                  "email": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "email",
                    "maxLength": 254
                  },
                  "expected_version": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Anagrafica salvata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "player_id",
                    "first_name",
                    "last_name",
                    "date_of_birth",
                    "birth_place",
                    "residence_place",
                    "nationality",
                    "tax_code",
                    "email",
                    "is_minor",
                    "institutional_photo",
                    "version",
                    "updated_at",
                    "updated_by"
                  ],
                  "properties": {
                    "player_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "first_name": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "minLength": 1,
                      "maxLength": 80
                    },
                    "last_name": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "minLength": 1,
                      "maxLength": 80
                    },
                    "date_of_birth": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date"
                    },
                    "birth_place": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "minLength": 1,
                      "maxLength": 120
                    },
                    "residence_place": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "minLength": 1,
                      "maxLength": 120
                    },
                    "nationality": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "minLength": 1,
                      "maxLength": 80
                    },
                    "tax_code": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[A-Z0-9]{16}$"
                    },
                    "email": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "email",
                      "maxLength": 254
                    },
                    "is_minor": {
                      "type": "boolean"
                    },
                    "institutional_photo": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "required": [
                        "content_type",
                        "byte_size",
                        "uploaded_at",
                        "url"
                      ],
                      "properties": {
                        "content_type": {
                          "type": "string",
                          "enum": [
                            "image/jpeg",
                            "image/png",
                            "image/webp"
                          ]
                        },
                        "byte_size": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "uploaded_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "url": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "minLength": 1
                        }
                      }
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updated_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "updated_by": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/players/{playerId}/institutional-photo": {
      "put": {
        "tags": [
          "admin",
          "player-registry"
        ],
        "summary": "Carica la foto istituzionale privata (≤ 5 MB, JPEG/PNG/WebP)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "personal_data",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "playerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "content_type",
                  "content_base64",
                  "expected_version"
                ],
                "properties": {
                  "content_type": {
                    "type": "string",
                    "enum": [
                      "image/jpeg",
                      "image/png",
                      "image/webp"
                    ]
                  },
                  "content_base64": {
                    "type": "string",
                    "minLength": 4,
                    "maxLength": 6990511
                  },
                  "expected_version": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Anagrafica con la foto",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "player_id",
                    "first_name",
                    "last_name",
                    "date_of_birth",
                    "birth_place",
                    "residence_place",
                    "nationality",
                    "tax_code",
                    "email",
                    "is_minor",
                    "institutional_photo",
                    "version",
                    "updated_at",
                    "updated_by"
                  ],
                  "properties": {
                    "player_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "first_name": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "minLength": 1,
                      "maxLength": 80
                    },
                    "last_name": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "minLength": 1,
                      "maxLength": 80
                    },
                    "date_of_birth": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date"
                    },
                    "birth_place": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "minLength": 1,
                      "maxLength": 120
                    },
                    "residence_place": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "minLength": 1,
                      "maxLength": 120
                    },
                    "nationality": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "minLength": 1,
                      "maxLength": 80
                    },
                    "tax_code": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "pattern": "^[A-Z0-9]{16}$"
                    },
                    "email": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "email",
                      "maxLength": 254
                    },
                    "is_minor": {
                      "type": "boolean"
                    },
                    "institutional_photo": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "required": [
                        "content_type",
                        "byte_size",
                        "uploaded_at",
                        "url"
                      ],
                      "properties": {
                        "content_type": {
                          "type": "string",
                          "enum": [
                            "image/jpeg",
                            "image/png",
                            "image/webp"
                          ]
                        },
                        "byte_size": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "uploaded_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "url": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "minLength": 1
                        }
                      }
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updated_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "updated_by": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/players/{playerId}/memberships": {
      "get": {
        "tags": [
          "admin",
          "player-registry"
        ],
        "summary": "Storico dei tesseramenti del giocatore, per stagione",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "playerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "season_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 400
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tesseramenti",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "next_cursor"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "player_id",
                          "season_id",
                          "team_id",
                          "membership_type",
                          "status",
                          "approved_on",
                          "note",
                          "decided_at",
                          "decided_by",
                          "version",
                          "created_at",
                          "updated_at"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "player_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "season_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "team_id": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uuid"
                          },
                          "membership_type": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 60
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "approved",
                              "discarded",
                              "deleted"
                            ]
                          },
                          "approved_on": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date"
                          },
                          "note": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "minLength": 1,
                            "maxLength": 500
                          },
                          "decided_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          },
                          "decided_by": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uuid"
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updated_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "admin",
          "player-registry"
        ],
        "summary": "Nuovo tesseramento in attesa (ripetibile con request_id)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "playerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "request_id",
                  "season_id",
                  "team_id",
                  "membership_type"
                ],
                "properties": {
                  "request_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "season_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "team_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "membership_type": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 60
                  },
                  "note": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "minLength": 1,
                    "maxLength": 500
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Stessa richiesta già eseguita",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "player_id",
                    "season_id",
                    "team_id",
                    "membership_type",
                    "status",
                    "approved_on",
                    "note",
                    "decided_at",
                    "decided_by",
                    "version",
                    "created_at",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "player_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "season_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "team_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "membership_type": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 60
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "approved",
                        "discarded",
                        "deleted"
                      ]
                    },
                    "approved_on": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date"
                    },
                    "note": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "minLength": 1,
                      "maxLength": 500
                    },
                    "decided_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "decided_by": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "Tesseramento creato",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "player_id",
                    "season_id",
                    "team_id",
                    "membership_type",
                    "status",
                    "approved_on",
                    "note",
                    "decided_at",
                    "decided_by",
                    "version",
                    "created_at",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "player_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "season_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "team_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "membership_type": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 60
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "approved",
                        "discarded",
                        "deleted"
                      ]
                    },
                    "approved_on": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date"
                    },
                    "note": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "minLength": 1,
                      "maxLength": 500
                    },
                    "decided_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "decided_by": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/memberships/{membershipId}/decision": {
      "post": {
        "tags": [
          "admin",
          "player-registry"
        ],
        "summary": "Approva o scarta il tesseramento; dopo l’approvazione PROPONE i tornei della squadra",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "membershipId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "decision",
                  "expected_version"
                ],
                "properties": {
                  "decision": {
                    "type": "string",
                    "enum": [
                      "approve",
                      "discard"
                    ]
                  },
                  "approved_on": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date"
                  },
                  "note": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "minLength": 1,
                    "maxLength": 500
                  },
                  "expected_version": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Esito",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "membership",
                    "enrollment_proposal"
                  ],
                  "properties": {
                    "membership": {
                      "type": "object",
                      "required": [
                        "id",
                        "player_id",
                        "season_id",
                        "team_id",
                        "membership_type",
                        "status",
                        "approved_on",
                        "note",
                        "decided_at",
                        "decided_by",
                        "version",
                        "created_at",
                        "updated_at"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "player_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "season_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "team_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "uuid"
                        },
                        "membership_type": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 60
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "pending",
                            "approved",
                            "discarded",
                            "deleted"
                          ]
                        },
                        "approved_on": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date"
                        },
                        "note": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "minLength": 1,
                          "maxLength": 500
                        },
                        "decided_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "decided_by": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "uuid"
                        },
                        "version": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updated_at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    },
                    "enrollment_proposal": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "required": [
                        "player_id",
                        "team_id",
                        "season_id",
                        "shirt_number",
                        "items"
                      ],
                      "properties": {
                        "player_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "team_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "season_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "shirt_number": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "minimum": 1,
                          "maximum": 99
                        },
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "tournament_id",
                              "tournament_label",
                              "state",
                              "reason"
                            ],
                            "properties": {
                              "tournament_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "tournament_label": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "state": {
                                "type": "string",
                                "enum": [
                                  "proposed",
                                  "already_enrolled",
                                  "blocked"
                                ]
                              },
                              "reason": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/memberships/{membershipId}": {
      "patch": {
        "tags": [
          "admin",
          "player-registry"
        ],
        "summary": "Modifica tipo, data di approvazione e nota del tesseramento",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "membershipId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "membership_type",
                  "approved_on",
                  "note",
                  "expected_version"
                ],
                "properties": {
                  "membership_type": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 60
                  },
                  "approved_on": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date"
                  },
                  "note": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "minLength": 1,
                    "maxLength": 500
                  },
                  "expected_version": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Tesseramento",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "player_id",
                    "season_id",
                    "team_id",
                    "membership_type",
                    "status",
                    "approved_on",
                    "note",
                    "decided_at",
                    "decided_by",
                    "version",
                    "created_at",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "player_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "season_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "team_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "membership_type": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 60
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "approved",
                        "discarded",
                        "deleted"
                      ]
                    },
                    "approved_on": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date"
                    },
                    "note": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "minLength": 1,
                      "maxLength": 500
                    },
                    "decided_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "decided_by": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "admin",
          "player-registry"
        ],
        "summary": "Elimina il tesseramento, solo se il giocatore non è mai sceso in campo",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "membershipId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "expected_version",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tesseramento eliminato",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "player_id",
                    "season_id",
                    "team_id",
                    "membership_type",
                    "status",
                    "approved_on",
                    "note",
                    "decided_at",
                    "decided_by",
                    "version",
                    "created_at",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "player_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "season_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "team_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "membership_type": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 60
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "approved",
                        "discarded",
                        "deleted"
                      ]
                    },
                    "approved_on": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date"
                    },
                    "note": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "minLength": 1,
                      "maxLength": 500
                    },
                    "decided_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "decided_by": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/players/{playerId}/enrollment-proposal": {
      "get": {
        "tags": [
          "admin",
          "player-registry"
        ],
        "summary": "Tornei della squadra in cui iscrivere il giocatore, con i motivi di blocco",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "playerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "season_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Proposta",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "player_id",
                    "team_id",
                    "season_id",
                    "shirt_number",
                    "items"
                  ],
                  "properties": {
                    "player_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "team_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "season_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "shirt_number": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 1,
                      "maximum": 99
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "tournament_id",
                          "tournament_label",
                          "state",
                          "reason"
                        ],
                        "properties": {
                          "tournament_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "tournament_label": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "state": {
                            "type": "string",
                            "enum": [
                              "proposed",
                              "already_enrolled",
                              "blocked"
                            ]
                          },
                          "reason": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/players/{playerId}/enrollments": {
      "post": {
        "tags": [
          "admin",
          "player-registry"
        ],
        "summary": "Iscrive il giocatore ai tornei scelti (una sola iscrizione attiva per torneo)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "playerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "team_id",
                  "season_id",
                  "tournament_ids",
                  "shirt_number",
                  "from_date"
                ],
                "properties": {
                  "team_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "season_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "tournament_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "maxItems": 30
                  },
                  "shirt_number": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 99
                  },
                  "from_date": {
                    "type": "string",
                    "format": "date"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Esito per torneo",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "enrolled",
                    "skipped"
                  ],
                  "properties": {
                    "enrolled": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "tournament_id",
                          "roster_entry_id"
                        ],
                        "properties": {
                          "tournament_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "roster_entry_id": {
                            "type": "string",
                            "format": "uuid"
                          }
                        }
                      }
                    },
                    "skipped": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "tournament_id",
                          "reason"
                        ],
                        "properties": {
                          "tournament_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "reason": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/teams/{teamId}/roster-profiles": {
      "get": {
        "tags": [
          "admin",
          "player-registry"
        ],
        "summary": "Rosa della squadra nella stagione: ruolo, numero, rosa corrente, tornei",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "season_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 400
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Rosa",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "next_cursor"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "player_id",
                          "sport_name",
                          "is_minor",
                          "team_role",
                          "shirt_number",
                          "in_current_roster",
                          "membership",
                          "tournaments",
                          "version"
                        ],
                        "properties": {
                          "player_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "sport_name": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "is_minor": {
                            "type": "boolean"
                          },
                          "team_role": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "enum": [
                              "goalkeeper",
                              "defender",
                              "midfielder",
                              "forward",
                              "external_manager",
                              "executive",
                              "coach"
                            ]
                          },
                          "shirt_number": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "minimum": 1,
                            "maximum": 99
                          },
                          "in_current_roster": {
                            "type": "boolean"
                          },
                          "membership": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "required": [
                              "id",
                              "status",
                              "membership_type"
                            ],
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "pending",
                                  "approved",
                                  "discarded",
                                  "deleted"
                                ]
                              },
                              "membership_type": {
                                "type": "string"
                              }
                            }
                          },
                          "tournaments": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "tournament_id",
                                "tournament_label",
                                "roster_entry_id",
                                "from_date",
                                "to_date"
                              ],
                              "properties": {
                                "tournament_id": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "format": "uuid"
                                },
                                "tournament_label": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "roster_entry_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "from_date": {
                                  "type": "string"
                                },
                                "to_date": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                }
                              }
                            }
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 0
                          }
                        }
                      }
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/teams/{teamId}/players/{playerId}/roster-profile": {
      "put": {
        "tags": [
          "admin",
          "player-registry"
        ],
        "summary": "Ruolo in squadra, numero di maglia (unico per squadra e stagione), rosa corrente",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "playerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "season_id",
                  "team_role",
                  "shirt_number",
                  "in_current_roster",
                  "expected_version"
                ],
                "properties": {
                  "season_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "team_role": {
                    "type": "string",
                    "enum": [
                      "goalkeeper",
                      "defender",
                      "midfielder",
                      "forward",
                      "external_manager",
                      "executive",
                      "coach"
                    ]
                  },
                  "shirt_number": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1,
                    "maximum": 99
                  },
                  "in_current_roster": {
                    "type": "boolean"
                  },
                  "expected_version": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Giocatore nella rosa",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "player_id",
                    "sport_name",
                    "is_minor",
                    "team_role",
                    "shirt_number",
                    "in_current_roster",
                    "membership",
                    "tournaments",
                    "version"
                  ],
                  "properties": {
                    "player_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "sport_name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "is_minor": {
                      "type": "boolean"
                    },
                    "team_role": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "goalkeeper",
                        "defender",
                        "midfielder",
                        "forward",
                        "external_manager",
                        "executive",
                        "coach"
                      ]
                    },
                    "shirt_number": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 1,
                      "maximum": 99
                    },
                    "in_current_roster": {
                      "type": "boolean"
                    },
                    "membership": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "required": [
                        "id",
                        "status",
                        "membership_type"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "pending",
                            "approved",
                            "discarded",
                            "deleted"
                          ]
                        },
                        "membership_type": {
                          "type": "string"
                        }
                      }
                    },
                    "tournaments": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "tournament_id",
                          "tournament_label",
                          "roster_entry_id",
                          "from_date",
                          "to_date"
                        ],
                        "properties": {
                          "tournament_id": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uuid"
                          },
                          "tournament_label": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "roster_entry_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "from_date": {
                            "type": "string"
                          },
                          "to_date": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        }
                      }
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/teams/{teamId}/players/{playerId}/end-preview": {
      "get": {
        "tags": [
          "admin",
          "player-registry"
        ],
        "summary": "Iscrizioni aperte del giocatore nella squadra, con i tornei già giocati",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "playerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "season_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Anteprima",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "player_id",
                    "team_id",
                    "season_id",
                    "items"
                  ],
                  "properties": {
                    "player_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "team_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "season_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "roster_entry_id",
                          "tournament_id",
                          "tournament_label",
                          "appearances",
                          "played"
                        ],
                        "properties": {
                          "roster_entry_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "tournament_id": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uuid"
                          },
                          "tournament_label": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "appearances": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "minimum": 0
                          },
                          "played": {
                            "type": [
                              "boolean",
                              "null"
                            ]
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/teams/{teamId}/players/{playerId}/end": {
      "post": {
        "tags": [
          "admin",
          "player-registry"
        ],
        "summary": "Toglie il giocatore dalla squadra: chiude la validità, non cancella",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "playerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "season_id",
                  "to_date",
                  "choices",
                  "reason"
                ],
                "properties": {
                  "season_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "to_date": {
                    "type": "string",
                    "format": "date"
                  },
                  "choices": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "roster_entry_id",
                        "action"
                      ],
                      "properties": {
                        "roster_entry_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "action": {
                          "type": "string",
                          "enum": [
                            "end",
                            "keep"
                          ]
                        }
                      },
                      "additionalProperties": false
                    },
                    "maxItems": 30
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 10,
                    "maxLength": 500
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Esito",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ended",
                    "kept",
                    "in_current_roster"
                  ],
                  "properties": {
                    "ended": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "format": "uuid"
                      }
                    },
                    "kept": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "format": "uuid"
                      }
                    },
                    "in_current_roster": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/teams/{teamId}/player-import": {
      "post": {
        "tags": [
          "admin",
          "player-registry"
        ],
        "summary": "Importa un lotto di giocatori da foglio nella rosa (≤ 200 righe, ripetibile)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "personal_data",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "request_id",
                  "season_id",
                  "membership",
                  "rows"
                ],
                "properties": {
                  "request_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "season_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "membership": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "required": [
                      "membership_type",
                      "status",
                      "approved_on"
                    ],
                    "properties": {
                      "membership_type": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 60
                      },
                      "status": {
                        "type": "string",
                        "enum": [
                          "pending",
                          "approved"
                        ]
                      },
                      "approved_on": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "date"
                      }
                    },
                    "additionalProperties": false
                  },
                  "rows": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "first_name",
                        "last_name",
                        "date_of_birth",
                        "team_role",
                        "shirt_number"
                      ],
                      "properties": {
                        "first_name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80
                        },
                        "last_name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80
                        },
                        "sport_name": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "minLength": 1,
                          "maxLength": 120
                        },
                        "date_of_birth": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date"
                        },
                        "is_minor": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "birth_place": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "minLength": 1,
                          "maxLength": 120
                        },
                        "residence_place": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "minLength": 1,
                          "maxLength": 120
                        },
                        "nationality": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "minLength": 1,
                          "maxLength": 80
                        },
                        "tax_code": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "pattern": "^[A-Z0-9]{16}$"
                        },
                        "team_role": {
                          "type": "string",
                          "enum": [
                            "goalkeeper",
                            "defender",
                            "midfielder",
                            "forward",
                            "external_manager",
                            "executive",
                            "coach"
                          ]
                        },
                        "shirt_number": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "minimum": 1,
                          "maximum": 99
                        }
                      },
                      "additionalProperties": false
                    },
                    "maxItems": 200
                  },
                  "enroll_from_date": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Esito del lotto",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "team_id",
                    "season_id",
                    "created",
                    "failed"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "team_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "season_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "created": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "row",
                          "player_id"
                        ],
                        "properties": {
                          "row": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "player_id": {
                            "type": "string",
                            "format": "uuid"
                          }
                        }
                      }
                    },
                    "failed": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "row",
                          "reason"
                        ],
                        "properties": {
                          "row": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "reason": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "enrolled": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "row",
                          "player_id",
                          "tournament_ids"
                        ],
                        "properties": {
                          "row": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "player_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "tournament_ids": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "format": "uuid"
                            }
                          }
                        }
                      }
                    },
                    "enrollment_skipped": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "row",
                          "player_id",
                          "tournament_id",
                          "reason"
                        ],
                        "properties": {
                          "row": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "player_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "tournament_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "reason": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/teams/{teamId}/tournament-enrollments": {
      "post": {
        "tags": [
          "admin",
          "player-registry"
        ],
        "summary": "Iscrive in blocco la rosa della squadra a un torneo (dalla rosa della stagione o dal vecchio sito), con anteprima",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "personal_data",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "tournament_id",
                  "source"
                ],
                "properties": {
                  "tournament_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "source": {
                    "type": "string",
                    "enum": [
                      "season_roster",
                      "archive"
                    ]
                  },
                  "from_date": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date"
                  },
                  "dry_run": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Esito dell’iscrizione",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "team_id",
                    "tournament_id",
                    "season_id",
                    "source",
                    "dry_run",
                    "from_date",
                    "candidates",
                    "enrolled",
                    "already_enrolled",
                    "skipped"
                  ],
                  "properties": {
                    "team_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "season_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "source": {
                      "type": "string",
                      "enum": [
                        "season_roster",
                        "archive"
                      ]
                    },
                    "dry_run": {
                      "type": "boolean"
                    },
                    "from_date": {
                      "type": "string",
                      "format": "date"
                    },
                    "candidates": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "enrolled": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "player_id",
                          "name",
                          "shirt_number",
                          "created_player"
                        ],
                        "properties": {
                          "player_id": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uuid"
                          },
                          "name": {
                            "type": "string"
                          },
                          "shirt_number": {
                            "type": "integer"
                          },
                          "created_player": {
                            "type": "boolean"
                          }
                        }
                      }
                    },
                    "already_enrolled": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "player_id",
                          "name"
                        ],
                        "properties": {
                          "player_id": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uuid"
                          },
                          "name": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "skipped": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "player_id",
                          "name",
                          "reason"
                        ],
                        "properties": {
                          "player_id": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uuid"
                          },
                          "name": {
                            "type": "string"
                          },
                          "reason": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/teams/{teamId}/eligibility-check": {
      "post": {
        "tags": [
          "admin",
          "player-registry"
        ],
        "summary": "Ricontrolla l’idoneità dei giocatori della squadra, torneo per torneo",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "season_id"
                ],
                "properties": {
                  "season_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "tournament_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Idoneità",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "team_id",
                    "reports"
                  ],
                  "properties": {
                    "team_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "reports": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "tournament_id",
                          "tournament_label",
                          "generated_at",
                          "teams",
                          "summary"
                        ],
                        "properties": {
                          "tournament_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "tournament_label": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "generated_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "teams": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "team_id",
                                "team_label",
                                "players"
                              ],
                              "properties": {
                                "team_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "team_label": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "players": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "required": [
                                      "player_id",
                                      "sport_name",
                                      "eligible",
                                      "reasons",
                                      "checks"
                                    ],
                                    "properties": {
                                      "player_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "sport_name": {
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      },
                                      "eligible": {
                                        "type": "boolean"
                                      },
                                      "reasons": {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "required": [
                                            "code",
                                            "message"
                                          ],
                                          "properties": {
                                            "code": {
                                              "type": "string",
                                              "enum": [
                                                "membership_missing",
                                                "membership_pending",
                                                "medical_certificate_missing",
                                                "medical_certificate_expired",
                                                "documents_expired",
                                                "birth_date_missing",
                                                "under_minimum_age",
                                                "suspended"
                                              ]
                                            },
                                            "message": {
                                              "type": "string"
                                            }
                                          }
                                        }
                                      },
                                      "checks": {
                                        "type": "object",
                                        "required": [
                                          "membership",
                                          "medical_certificate",
                                          "documents",
                                          "age",
                                          "discipline"
                                        ],
                                        "properties": {
                                          "membership": {
                                            "type": "string",
                                            "enum": [
                                              "ok",
                                              "failed",
                                              "not_required",
                                              "not_available"
                                            ]
                                          },
                                          "medical_certificate": {
                                            "type": "string",
                                            "enum": [
                                              "ok",
                                              "failed",
                                              "not_required",
                                              "not_available"
                                            ]
                                          },
                                          "documents": {
                                            "type": "string",
                                            "enum": [
                                              "ok",
                                              "failed",
                                              "not_required",
                                              "not_available"
                                            ]
                                          },
                                          "age": {
                                            "type": "string",
                                            "enum": [
                                              "ok",
                                              "failed",
                                              "not_required",
                                              "not_available"
                                            ]
                                          },
                                          "discipline": {
                                            "type": "string",
                                            "enum": [
                                              "ok",
                                              "failed",
                                              "not_required",
                                              "not_available"
                                            ]
                                          }
                                        }
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          },
                          "summary": {
                            "type": "object",
                            "required": [
                              "eligible",
                              "ineligible"
                            ],
                            "properties": {
                              "eligible": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "ineligible": {
                                "type": "integer",
                                "minimum": 0
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/tournaments/{tournamentId}/eligibility-check": {
      "post": {
        "tags": [
          "admin",
          "player-registry"
        ],
        "summary": "Ricontrolla l’idoneità di tutti i giocatori del torneo",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Idoneità",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "tournament_id",
                    "tournament_label",
                    "generated_at",
                    "teams",
                    "summary"
                  ],
                  "properties": {
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "tournament_label": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "generated_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "teams": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "team_id",
                          "team_label",
                          "players"
                        ],
                        "properties": {
                          "team_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "team_label": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "players": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "player_id",
                                "sport_name",
                                "eligible",
                                "reasons",
                                "checks"
                              ],
                              "properties": {
                                "player_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "sport_name": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "eligible": {
                                  "type": "boolean"
                                },
                                "reasons": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "required": [
                                      "code",
                                      "message"
                                    ],
                                    "properties": {
                                      "code": {
                                        "type": "string",
                                        "enum": [
                                          "membership_missing",
                                          "membership_pending",
                                          "medical_certificate_missing",
                                          "medical_certificate_expired",
                                          "documents_expired",
                                          "birth_date_missing",
                                          "under_minimum_age",
                                          "suspended"
                                        ]
                                      },
                                      "message": {
                                        "type": "string"
                                      }
                                    }
                                  }
                                },
                                "checks": {
                                  "type": "object",
                                  "required": [
                                    "membership",
                                    "medical_certificate",
                                    "documents",
                                    "age",
                                    "discipline"
                                  ],
                                  "properties": {
                                    "membership": {
                                      "type": "string",
                                      "enum": [
                                        "ok",
                                        "failed",
                                        "not_required",
                                        "not_available"
                                      ]
                                    },
                                    "medical_certificate": {
                                      "type": "string",
                                      "enum": [
                                        "ok",
                                        "failed",
                                        "not_required",
                                        "not_available"
                                      ]
                                    },
                                    "documents": {
                                      "type": "string",
                                      "enum": [
                                        "ok",
                                        "failed",
                                        "not_required",
                                        "not_available"
                                      ]
                                    },
                                    "age": {
                                      "type": "string",
                                      "enum": [
                                        "ok",
                                        "failed",
                                        "not_required",
                                        "not_available"
                                      ]
                                    },
                                    "discipline": {
                                      "type": "string",
                                      "enum": [
                                        "ok",
                                        "failed",
                                        "not_required",
                                        "not_available"
                                      ]
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    },
                    "summary": {
                      "type": "object",
                      "required": [
                        "eligible",
                        "ineligible"
                      ],
                      "properties": {
                        "eligible": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "ineligible": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/player-labels": {
      "get": {
        "tags": [
          "admin",
          "player-registry"
        ],
        "summary": "Etichette dei giocatori",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "include_archived",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 400
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Etichette",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "next_cursor"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "name",
                          "status",
                          "version",
                          "created_at",
                          "updated_at"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "name": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 60
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "active",
                              "archived"
                            ]
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updated_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "admin",
          "player-registry"
        ],
        "summary": "Nuova etichetta (ripetibile con request_id)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "request_id",
                  "name"
                ],
                "properties": {
                  "request_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 60
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Stessa richiesta già eseguita",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "name",
                    "status",
                    "version",
                    "created_at",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 60
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "active",
                        "archived"
                      ]
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "Etichetta creata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "name",
                    "status",
                    "version",
                    "created_at",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 60
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "active",
                        "archived"
                      ]
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/player-labels/{labelId}": {
      "put": {
        "tags": [
          "admin",
          "player-registry"
        ],
        "summary": "Rinomina l’etichetta",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "labelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "expected_version"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 60
                  },
                  "expected_version": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Etichetta",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "name",
                    "status",
                    "version",
                    "created_at",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 60
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "active",
                        "archived"
                      ]
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "admin",
          "player-registry"
        ],
        "summary": "Archivia l’etichetta: sparisce dai giocatori, resta nello storico",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "labelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "expected_version",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Etichetta archiviata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "name",
                    "status",
                    "version",
                    "created_at",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 60
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "active",
                        "archived"
                      ]
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/players/{playerId}/labels": {
      "get": {
        "tags": [
          "admin",
          "player-registry"
        ],
        "summary": "Etichette assegnate al giocatore",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "playerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Etichette del giocatore",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "player_id",
                    "labels",
                    "version"
                  ],
                  "properties": {
                    "player_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "labels": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "name",
                          "status",
                          "version",
                          "created_at",
                          "updated_at"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "name": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 60
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "active",
                              "archived"
                            ]
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updated_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "admin",
          "player-registry"
        ],
        "summary": "Sostituisce le etichette del giocatore",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "playerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "label_ids",
                  "expected_version"
                ],
                "properties": {
                  "label_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "maxItems": 20
                  },
                  "expected_version": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Etichette del giocatore",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "player_id",
                    "labels",
                    "version"
                  ],
                  "properties": {
                    "player_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "labels": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "name",
                          "status",
                          "version",
                          "created_at",
                          "updated_at"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "name": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 60
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "active",
                              "archived"
                            ]
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updated_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/players/{playerId}/career": {
      "get": {
        "tags": [
          "admin",
          "player-registry"
        ],
        "summary": "Carriera: voci derivate dalle iscrizioni e voci manuali, distinte",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "playerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Carriera",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "player_id",
                    "derived",
                    "manual"
                  ],
                  "properties": {
                    "player_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "derived": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "roster_entry_id",
                          "team_id",
                          "team_label",
                          "season_id",
                          "season_label",
                          "tournament_id",
                          "tournament_label",
                          "from_date",
                          "to_date",
                          "origin"
                        ],
                        "properties": {
                          "roster_entry_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "team_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "team_label": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "season_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "season_label": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "tournament_id": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uuid"
                          },
                          "tournament_label": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "from_date": {
                            "type": "string"
                          },
                          "to_date": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "origin": {
                            "type": "string",
                            "enum": [
                              "derived"
                            ]
                          }
                        }
                      }
                    },
                    "manual": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "player_id",
                          "team_name",
                          "season_label",
                          "from_date",
                          "to_date",
                          "note",
                          "origin",
                          "version",
                          "created_at",
                          "updated_at"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "player_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "team_name": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 120
                          },
                          "season_label": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "minLength": 1,
                            "maxLength": 40
                          },
                          "from_date": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date"
                          },
                          "to_date": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date"
                          },
                          "note": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "minLength": 1,
                            "maxLength": 500
                          },
                          "origin": {
                            "type": "string",
                            "enum": [
                              "manual"
                            ]
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updated_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "admin",
          "player-registry"
        ],
        "summary": "Aggiunge una voce di carriera manuale (ripetibile con request_id)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "playerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "request_id",
                  "team_name",
                  "season_label",
                  "from_date",
                  "to_date",
                  "note"
                ],
                "properties": {
                  "request_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "team_name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "season_label": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "minLength": 1,
                    "maxLength": 40
                  },
                  "from_date": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date"
                  },
                  "to_date": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date"
                  },
                  "note": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "minLength": 1,
                    "maxLength": 500
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Stessa richiesta già eseguita",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "player_id",
                    "team_name",
                    "season_label",
                    "from_date",
                    "to_date",
                    "note",
                    "origin",
                    "version",
                    "created_at",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "player_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "team_name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 120
                    },
                    "season_label": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "minLength": 1,
                      "maxLength": 40
                    },
                    "from_date": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date"
                    },
                    "to_date": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date"
                    },
                    "note": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "minLength": 1,
                      "maxLength": 500
                    },
                    "origin": {
                      "type": "string",
                      "enum": [
                        "manual"
                      ]
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "Voce creata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "player_id",
                    "team_name",
                    "season_label",
                    "from_date",
                    "to_date",
                    "note",
                    "origin",
                    "version",
                    "created_at",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "player_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "team_name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 120
                    },
                    "season_label": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "minLength": 1,
                      "maxLength": 40
                    },
                    "from_date": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date"
                    },
                    "to_date": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date"
                    },
                    "note": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "minLength": 1,
                      "maxLength": 500
                    },
                    "origin": {
                      "type": "string",
                      "enum": [
                        "manual"
                      ]
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/player-career/{entryId}": {
      "put": {
        "tags": [
          "admin",
          "player-registry"
        ],
        "summary": "Modifica una voce di carriera manuale",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "entryId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "team_name",
                  "season_label",
                  "from_date",
                  "to_date",
                  "note",
                  "expected_version"
                ],
                "properties": {
                  "team_name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "season_label": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "minLength": 1,
                    "maxLength": 40
                  },
                  "from_date": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date"
                  },
                  "to_date": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date"
                  },
                  "note": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "minLength": 1,
                    "maxLength": 500
                  },
                  "expected_version": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Voce",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "player_id",
                    "team_name",
                    "season_label",
                    "from_date",
                    "to_date",
                    "note",
                    "origin",
                    "version",
                    "created_at",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "player_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "team_name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 120
                    },
                    "season_label": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "minLength": 1,
                      "maxLength": 40
                    },
                    "from_date": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date"
                    },
                    "to_date": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date"
                    },
                    "note": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "minLength": 1,
                      "maxLength": 500
                    },
                    "origin": {
                      "type": "string",
                      "enum": [
                        "manual"
                      ]
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "admin",
          "player-registry"
        ],
        "summary": "Elimina una voce di carriera manuale (resta nello storico come eliminata)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "entryId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "expected_version",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Voce eliminata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "player_id",
                    "team_name",
                    "season_label",
                    "from_date",
                    "to_date",
                    "note",
                    "origin",
                    "version",
                    "created_at",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "player_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "team_name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 120
                    },
                    "season_label": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "minLength": 1,
                      "maxLength": 40
                    },
                    "from_date": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date"
                    },
                    "to_date": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date"
                    },
                    "note": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "minLength": 1,
                      "maxLength": 500
                    },
                    "origin": {
                      "type": "string",
                      "enum": [
                        "manual"
                      ]
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/players/{playerId}/duplicate-suggestions": {
      "get": {
        "tags": [
          "admin",
          "player-registry"
        ],
        "summary": "Possibili duplicati: mai per solo nome, serve data di nascita o codice fiscale coincidente",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "personal_data",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "playerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Suggerimenti",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "player_id",
                    "items"
                  ],
                  "properties": {
                    "player_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "player_id",
                          "sport_name",
                          "is_active",
                          "matches",
                          "reasons"
                        ],
                        "properties": {
                          "player_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "sport_name": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "is_active": {
                            "type": "boolean"
                          },
                          "matches": {
                            "type": "object",
                            "required": [
                              "date_of_birth",
                              "tax_code",
                              "name_similarity"
                            ],
                            "properties": {
                              "date_of_birth": {
                                "type": "boolean"
                              },
                              "tax_code": {
                                "type": "boolean"
                              },
                              "name_similarity": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 1
                              }
                            }
                          },
                          "reasons": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/player-merges/preview": {
      "post": {
        "tags": [
          "admin",
          "player-registry"
        ],
        "summary": "Anteprima della fusione: cosa passa, cosa resta, cosa la blocca",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "source_player_id",
                  "target_player_id"
                ],
                "properties": {
                  "source_player_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "target_player_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Anteprima",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "source",
                    "target",
                    "moves",
                    "stays_on_source",
                    "target_medical_certificate",
                    "blockers",
                    "warnings",
                    "can_apply",
                    "revert_window_days"
                  ],
                  "properties": {
                    "source": {
                      "type": "object",
                      "required": [
                        "player_id",
                        "sport_name",
                        "is_active",
                        "linked_account"
                      ],
                      "properties": {
                        "player_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "sport_name": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "is_active": {
                          "type": "boolean"
                        },
                        "linked_account": {
                          "type": "boolean"
                        }
                      }
                    },
                    "target": {
                      "type": "object",
                      "required": [
                        "player_id",
                        "sport_name",
                        "is_active",
                        "linked_account"
                      ],
                      "properties": {
                        "player_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "sport_name": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "is_active": {
                          "type": "boolean"
                        },
                        "linked_account": {
                          "type": "boolean"
                        }
                      }
                    },
                    "moves": {
                      "type": "object",
                      "required": [
                        "memberships",
                        "roster_entries",
                        "roster_profiles",
                        "labels",
                        "career_entries"
                      ],
                      "properties": {
                        "memberships": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "roster_entries": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "roster_profiles": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "labels": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "career_entries": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    },
                    "stays_on_source": {
                      "type": "object",
                      "required": [
                        "appearances",
                        "goals",
                        "yellow_cards",
                        "red_cards",
                        "pending_claims",
                        "medical_certificate",
                        "administrative_references"
                      ],
                      "properties": {
                        "appearances": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "minimum": 0
                        },
                        "goals": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "minimum": 0
                        },
                        "yellow_cards": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "minimum": 0
                        },
                        "red_cards": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "minimum": 0
                        },
                        "pending_claims": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "minimum": 0
                        },
                        "medical_certificate": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "administrative_references": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "delegations",
                              "appointments",
                              "requests"
                            ]
                          }
                        }
                      }
                    },
                    "target_medical_certificate": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "blockers": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "code",
                          "message"
                        ],
                        "properties": {
                          "code": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "warnings": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "can_apply": {
                      "type": "boolean"
                    },
                    "revert_window_days": {
                      "type": "integer",
                      "minimum": 1
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/player-merges": {
      "get": {
        "tags": [
          "admin",
          "player-registry"
        ],
        "summary": "Registro delle fusioni di un giocatore",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "player_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 400
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Fusioni",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "next_cursor"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "source_player_id",
                          "target_player_id",
                          "reason",
                          "status",
                          "applied_at",
                          "applied_by",
                          "revertible_until",
                          "reverted_at",
                          "reverted_by",
                          "revert_reason",
                          "moved",
                          "version"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "source_player_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "target_player_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "reason": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "applied",
                              "reverted"
                            ]
                          },
                          "applied_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "applied_by": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uuid"
                          },
                          "revertible_until": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "reverted_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          },
                          "reverted_by": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uuid"
                          },
                          "revert_reason": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "moved": {
                            "type": "object",
                            "required": [
                              "memberships",
                              "roster_entries",
                              "roster_profiles",
                              "labels",
                              "career_entries"
                            ],
                            "properties": {
                              "memberships": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "roster_entries": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "roster_profiles": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "labels": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "career_entries": {
                                "type": "integer",
                                "minimum": 0
                              }
                            }
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 0
                          }
                        }
                      }
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "admin",
          "player-registry"
        ],
        "summary": "Unisce il giocatore assorbito nel principale, con motivo; mai automatica (ripetibile)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "request_id",
                  "source_player_id",
                  "target_player_id",
                  "reason"
                ],
                "properties": {
                  "request_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "source_player_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "target_player_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 10,
                    "maxLength": 500
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Stessa richiesta già eseguita",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "source_player_id",
                    "target_player_id",
                    "reason",
                    "status",
                    "applied_at",
                    "applied_by",
                    "revertible_until",
                    "reverted_at",
                    "reverted_by",
                    "revert_reason",
                    "moved",
                    "version"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "source_player_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "target_player_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "reason": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "applied",
                        "reverted"
                      ]
                    },
                    "applied_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "applied_by": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "revertible_until": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "reverted_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "reverted_by": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "revert_reason": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "moved": {
                      "type": "object",
                      "required": [
                        "memberships",
                        "roster_entries",
                        "roster_profiles",
                        "labels",
                        "career_entries"
                      ],
                      "properties": {
                        "memberships": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "roster_entries": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "roster_profiles": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "labels": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "career_entries": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "Fusione applicata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "source_player_id",
                    "target_player_id",
                    "reason",
                    "status",
                    "applied_at",
                    "applied_by",
                    "revertible_until",
                    "reverted_at",
                    "reverted_by",
                    "revert_reason",
                    "moved",
                    "version"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "source_player_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "target_player_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "reason": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "applied",
                        "reverted"
                      ]
                    },
                    "applied_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "applied_by": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "revertible_until": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "reverted_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "reverted_by": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "revert_reason": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "moved": {
                      "type": "object",
                      "required": [
                        "memberships",
                        "roster_entries",
                        "roster_profiles",
                        "labels",
                        "career_entries"
                      ],
                      "properties": {
                        "memberships": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "roster_entries": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "roster_profiles": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "labels": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "career_entries": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/player-duplicates": {
      "get": {
        "tags": [
          "admin",
          "player-registry"
        ],
        "summary": "Schede doppie della città (stesso codice fiscale, codice quasi uguale, stesso nome e data di nascita)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "personal_data",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "kind",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "same_tax_code",
                "similar_tax_code",
                "same_name_birth"
              ]
            }
          },
          {
            "name": "include_inactive",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Possibili doppioni",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "scanned",
                    "can_decide"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "kind",
                          "reasons",
                          "players"
                        ],
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "same_tax_code",
                              "similar_tax_code",
                              "same_name_birth"
                            ]
                          },
                          "reasons": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "players": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "player_id",
                                "sport_name",
                                "first_name",
                                "last_name",
                                "date_of_birth",
                                "tax_code",
                                "is_active",
                                "linked_account",
                                "team_names"
                              ],
                              "properties": {
                                "player_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "sport_name": {
                                  "type": "string"
                                },
                                "first_name": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "last_name": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "date_of_birth": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "format": "date"
                                },
                                "tax_code": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "is_active": {
                                  "type": "boolean"
                                },
                                "linked_account": {
                                  "type": "boolean"
                                },
                                "team_names": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    },
                    "scanned": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "can_decide": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/players/{playerId}/deactivate": {
      "post": {
        "tags": [
          "admin",
          "player-registry"
        ],
        "summary": "Disattiva una scheda doppia (solo super admin, con motivo, in audit)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "playerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "reason"
                ],
                "properties": {
                  "reason": {
                    "type": "string",
                    "minLength": 10,
                    "maxLength": 500
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Scheda disattivata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "player_id",
                    "is_active"
                  ],
                  "properties": {
                    "player_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "is_active": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/me/team-area/new-players": {
      "post": {
        "tags": [
          "me",
          "player-registry"
        ],
        "summary": "Dirigente: tessera una persona senza scheda (data di nascita e codice fiscale obbligatori, controllo doppioni)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "self_user_scope",
        "x-privacy-classification": "personal_data",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "team_id",
                  "tournament_id",
                  "first_name",
                  "last_name",
                  "date_of_birth",
                  "tax_code",
                  "role",
                  "shirt_number",
                  "idempotency_key"
                ],
                "properties": {
                  "team_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "tournament_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "first_name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "last_name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "date_of_birth": {
                    "type": "string",
                    "format": "date"
                  },
                  "tax_code": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 32
                  },
                  "email": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "email",
                    "maxLength": 254
                  },
                  "role": {
                    "type": "string",
                    "enum": [
                      "GK",
                      "DEF",
                      "MID",
                      "FWD"
                    ]
                  },
                  "shirt_number": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 99
                  },
                  "idempotency_key": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 200
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Giocatore tesserato",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "player_id",
                    "sport_name",
                    "roster_entry_id",
                    "team_id",
                    "tournament_id"
                  ],
                  "properties": {
                    "player_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "sport_name": {
                      "type": "string"
                    },
                    "roster_entry_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "team_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/me/player-area/public-name": {
      "patch": {
        "tags": [
          "me",
          "player-registry"
        ],
        "summary": "Il giocatore cambia il nome pubblico della sua scheda (Q021)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "self_user_scope",
        "x-privacy-classification": "public",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "sport_name"
                ],
                "properties": {
                  "player_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "sport_name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Nome pubblico salvato",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "player_id",
                    "sport_name"
                  ],
                  "properties": {
                    "player_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "sport_name": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/player-merges/{mergeId}/revert": {
      "post": {
        "tags": [
          "admin",
          "player-registry"
        ],
        "summary": "Annulla la fusione entro la finestra: riporta tutto al giocatore assorbito",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "mergeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "reason",
                  "expected_version"
                ],
                "properties": {
                  "reason": {
                    "type": "string",
                    "minLength": 10,
                    "maxLength": 500
                  },
                  "expected_version": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Fusione annullata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "source_player_id",
                    "target_player_id",
                    "reason",
                    "status",
                    "applied_at",
                    "applied_by",
                    "revertible_until",
                    "reverted_at",
                    "reverted_by",
                    "revert_reason",
                    "moved",
                    "version"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "source_player_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "target_player_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "reason": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "applied",
                        "reverted"
                      ]
                    },
                    "applied_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "applied_by": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "revertible_until": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "reverted_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "reverted_by": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "revert_reason": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "moved": {
                      "type": "object",
                      "required": [
                        "memberships",
                        "roster_entries",
                        "roster_profiles",
                        "labels",
                        "career_entries"
                      ],
                      "properties": {
                        "memberships": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "roster_entries": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "roster_profiles": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "labels": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "career_entries": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/medical-certificates": {
      "get": {
        "tags": [
          "admin",
          "medical-files"
        ],
        "summary": "Registro globale certificati, paginato a cursore",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "health_special_category",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-admin-cockpit-required": true,
        "parameters": [
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 600
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "certificate_status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "approved",
                "expired",
                "pending",
                "missing"
              ]
            }
          },
          {
            "name": "eligibility_state",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "eligible",
                "expiring",
                "expired",
                "blocked",
                "declared_missing",
                "not_recorded"
              ]
            }
          },
          {
            "name": "tournament_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Pagina del registro",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "413": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/medical-certificates/{requestId}/approve": {
      "post": {
        "tags": [
          "admin",
          "medical-files"
        ],
        "summary": "Approva una richiesta con motivo e aggiorna l’idoneità",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "health_special_category",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-admin-cockpit-required": true,
        "parameters": [
          {
            "name": "requestId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "expected_version",
                  "reason"
                ],
                "properties": {
                  "expected_version": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 500
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Richiesta approvata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "413": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/medical-certificates/{requestId}/reject": {
      "post": {
        "tags": [
          "admin",
          "medical-files"
        ],
        "summary": "Rifiuta una richiesta con motivo",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "health_special_category",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-admin-cockpit-required": true,
        "parameters": [
          {
            "name": "requestId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "expected_version",
                  "reason"
                ],
                "properties": {
                  "expected_version": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 500
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Richiesta rifiutata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "413": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/medical-certificates/{requestId}/remove": {
      "post": {
        "tags": [
          "admin",
          "medical-files"
        ],
        "summary": "Rimuove il certificato e cancella il file privato",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "health_special_category",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-admin-cockpit-required": true,
        "parameters": [
          {
            "name": "requestId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "expected_version",
                  "reason"
                ],
                "properties": {
                  "expected_version": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 500
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Certificato rimosso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "413": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/medical-certificate-files/{fileId}/open": {
      "get": {
        "tags": [
          "admin",
          "medical-files"
        ],
        "summary": "Apre il file con URL firmato brevissimo e audit",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "health_special_category",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-admin-cockpit-required": true,
        "parameters": [
          {
            "name": "fileId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "URL firmato in disposizione attachment",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "413": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/medical-eligibility/reminders": {
      "post": {
        "tags": [
          "admin",
          "medical-files"
        ],
        "summary": "Calcola i promemoria per i giocatori selezionati",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "health_special_category",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-admin-cockpit-required": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "player_ids"
                ],
                "properties": {
                  "player_ids": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 100,
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Promemoria calcolati; nessun invio implicito",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "413": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/me/medical-certificate": {
      "get": {
        "tags": [
          "session",
          "medical-files"
        ],
        "summary": "Stato del certificato dell’interessato",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "health_special_category",
        "x-rate-limit-tier": "session",
        "x-audit-required": false,
        "responses": {
          "200": {
            "description": "Stato personale",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "413": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/me/medical-certificate/requests": {
      "post": {
        "tags": [
          "session",
          "medical-files"
        ],
        "summary": "Crea una richiesta per l’interessato maggiorenne",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "health_special_category",
        "x-rate-limit-tier": "session",
        "x-audit-required": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "request_id",
                  "expires_on"
                ],
                "properties": {
                  "request_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "expires_on": {
                    "type": "string",
                    "format": "date"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Richiesta creata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "201": {
            "description": "Richiesta creata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "413": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/me/guardian/medical-certificate/requests": {
      "post": {
        "tags": [
          "session",
          "medical-files"
        ],
        "summary": "Il tutore crea la richiesta per il minore collegato",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "health_special_category",
        "x-rate-limit-tier": "session",
        "x-audit-required": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "request_id",
                  "expires_on",
                  "player_id"
                ],
                "properties": {
                  "request_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "expires_on": {
                    "type": "string",
                    "format": "date"
                  },
                  "player_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Richiesta con consenso del tutore",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "201": {
            "description": "Creata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "413": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/me/medical-certificate/files": {
      "post": {
        "tags": [
          "session",
          "medical-files"
        ],
        "summary": "Carica un file privato quando D-04 è abilitata",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "health_special_category",
        "x-rate-limit-tier": "session",
        "x-audit-required": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "upload_id",
                  "request_id",
                  "expected_version",
                  "filename",
                  "content_type",
                  "content_base64"
                ],
                "properties": {
                  "upload_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "request_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "expected_version": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "filename": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 180
                  },
                  "content_type": {
                    "type": "string",
                    "enum": [
                      "application/pdf",
                      "image/jpeg",
                      "image/png"
                    ]
                  },
                  "content_base64": {
                    "type": "string",
                    "minLength": 4,
                    "maxLength": 7000000
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "File caricato",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "201": {
            "description": "File caricato",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "413": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/me/medical-certificate/files/{fileId}/open": {
      "get": {
        "tags": [
          "session",
          "medical-files"
        ],
        "summary": "L’interessato apre il proprio file con audit",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "health_special_category",
        "x-rate-limit-tier": "session",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "fileId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "URL firmato in disposizione attachment",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "413": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Errore esplicito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/exports/calendar.xlsx": {
      "get": {
        "tags": [
          "admin",
          "exports"
        ],
        "summary": "Esporta il calendario del torneo",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "restricted",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "tournament",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "reason",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 500
            }
          }
        ],
        "responses": {
          "200": {
            "description": "File privato con URL firmato breve",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "kind",
                    "row_count",
                    "filters",
                    "filename",
                    "content_type",
                    "download_url",
                    "download_expires_at",
                    "delete_after",
                    "created_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "calendar",
                        "matches",
                        "standings",
                        "coni",
                        "users",
                        "players",
                        "referee_sheets"
                      ]
                    },
                    "row_count": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "filters": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "string"
                      }
                    },
                    "filename": {
                      "type": "string"
                    },
                    "content_type": {
                      "type": "string"
                    },
                    "download_url": {
                      "type": "string"
                    },
                    "download_expires_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "delete_after": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/exports/matches.xlsx": {
      "get": {
        "tags": [
          "admin",
          "exports"
        ],
        "summary": "Esporta le partite del periodo",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "restricted",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "reason",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 500
            }
          }
        ],
        "responses": {
          "200": {
            "description": "File privato con URL firmato breve",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "kind",
                    "row_count",
                    "filters",
                    "filename",
                    "content_type",
                    "download_url",
                    "download_expires_at",
                    "delete_after",
                    "created_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "calendar",
                        "matches",
                        "standings",
                        "coni",
                        "users",
                        "players",
                        "referee_sheets"
                      ]
                    },
                    "row_count": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "filters": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "string"
                      }
                    },
                    "filename": {
                      "type": "string"
                    },
                    "content_type": {
                      "type": "string"
                    },
                    "download_url": {
                      "type": "string"
                    },
                    "download_expires_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "delete_after": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/exports/standings.xlsx": {
      "get": {
        "tags": [
          "admin",
          "exports"
        ],
        "summary": "Esporta la classifica del girone",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "restricted",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "group",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "reason",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 500
            }
          }
        ],
        "responses": {
          "200": {
            "description": "File privato con URL firmato breve",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "kind",
                    "row_count",
                    "filters",
                    "filename",
                    "content_type",
                    "download_url",
                    "download_expires_at",
                    "delete_after",
                    "created_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "calendar",
                        "matches",
                        "standings",
                        "coni",
                        "users",
                        "players",
                        "referee_sheets"
                      ]
                    },
                    "row_count": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "filters": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "string"
                      }
                    },
                    "filename": {
                      "type": "string"
                    },
                    "content_type": {
                      "type": "string"
                    },
                    "download_url": {
                      "type": "string"
                    },
                    "download_expires_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "delete_after": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/exports/coni.xlsx": {
      "get": {
        "tags": [
          "admin",
          "exports"
        ],
        "summary": "Esporta il registro CONI filtrato",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "restricted",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "tournament",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "season",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "reason",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 500
            }
          }
        ],
        "responses": {
          "200": {
            "description": "File privato con URL firmato breve",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "kind",
                    "row_count",
                    "filters",
                    "filename",
                    "content_type",
                    "download_url",
                    "download_expires_at",
                    "delete_after",
                    "created_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "calendar",
                        "matches",
                        "standings",
                        "coni",
                        "users",
                        "players",
                        "referee_sheets"
                      ]
                    },
                    "row_count": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "filters": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "string"
                      }
                    },
                    "filename": {
                      "type": "string"
                    },
                    "content_type": {
                      "type": "string"
                    },
                    "download_url": {
                      "type": "string"
                    },
                    "download_expires_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "delete_after": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/exports/users.xlsx": {
      "get": {
        "tags": [
          "admin",
          "exports"
        ],
        "summary": "Esporta gli account filtrati",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "restricted",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "registered_from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "registered_to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "role",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "reason",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 500
            }
          }
        ],
        "responses": {
          "200": {
            "description": "File privato con URL firmato breve",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "kind",
                    "row_count",
                    "filters",
                    "filename",
                    "content_type",
                    "download_url",
                    "download_expires_at",
                    "delete_after",
                    "created_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "calendar",
                        "matches",
                        "standings",
                        "coni",
                        "users",
                        "players",
                        "referee_sheets"
                      ]
                    },
                    "row_count": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "filters": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "string"
                      }
                    },
                    "filename": {
                      "type": "string"
                    },
                    "content_type": {
                      "type": "string"
                    },
                    "download_url": {
                      "type": "string"
                    },
                    "download_expires_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "delete_after": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/exports/players.xlsx": {
      "get": {
        "tags": [
          "admin",
          "exports"
        ],
        "summary": "Esporta i giocatori filtrati; minori esclusi per default",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "restricted",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "season",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "age_min",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          },
          {
            "name": "age_max",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          },
          {
            "name": "city",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "zip",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_minors",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "reason",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 500
            }
          }
        ],
        "responses": {
          "200": {
            "description": "File privato con URL firmato breve",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "kind",
                    "row_count",
                    "filters",
                    "filename",
                    "content_type",
                    "download_url",
                    "download_expires_at",
                    "delete_after",
                    "created_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "calendar",
                        "matches",
                        "standings",
                        "coni",
                        "users",
                        "players",
                        "referee_sheets"
                      ]
                    },
                    "row_count": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "filters": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "string"
                      }
                    },
                    "filename": {
                      "type": "string"
                    },
                    "content_type": {
                      "type": "string"
                    },
                    "download_url": {
                      "type": "string"
                    },
                    "download_expires_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "delete_after": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/matches/referee-sheets.pdf": {
      "get": {
        "tags": [
          "admin",
          "exports"
        ],
        "summary": "Genera i modelli referto in PDF",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "restricted",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "round",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "match",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "with_lineups",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "reason",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 500
            }
          }
        ],
        "responses": {
          "200": {
            "description": "File privato con URL firmato breve",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "kind",
                    "row_count",
                    "filters",
                    "filename",
                    "content_type",
                    "download_url",
                    "download_expires_at",
                    "delete_after",
                    "created_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "calendar",
                        "matches",
                        "standings",
                        "coni",
                        "users",
                        "players",
                        "referee_sheets"
                      ]
                    },
                    "row_count": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "filters": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "string"
                      }
                    },
                    "filename": {
                      "type": "string"
                    },
                    "content_type": {
                      "type": "string"
                    },
                    "download_url": {
                      "type": "string"
                    },
                    "download_expires_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "delete_after": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/matches/reminders": {
      "post": {
        "tags": [
          "admin",
          "matches",
          "reminders"
        ],
        "summary": "Anteprima o invio idempotente dei promemoria per le partite selezionate",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "restricted",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "match_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "minItems": 1,
                    "maxItems": 100
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 500
                  },
                  "idempotency_key": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 160
                  },
                  "dry_run": {
                    "type": "boolean",
                    "default": true
                  }
                },
                "required": [
                  "match_ids",
                  "reason",
                  "idempotency_key"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Conteggi e stati per partita",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "mode",
                    "matches",
                    "totals"
                  ],
                  "properties": {
                    "mode": {
                      "type": "string"
                    },
                    "matches": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "match_id",
                          "status",
                          "recipient_count",
                          "designated_count",
                          "team_responsible_count",
                          "inapp",
                          "email",
                          "last_sent_at",
                          "next_send_at"
                        ],
                        "properties": {
                          "match_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "status": {
                            "type": "string"
                          },
                          "recipient_count": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "designated_count": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "team_responsible_count": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "inapp": {
                            "type": "string"
                          },
                          "email": {
                            "type": "string"
                          },
                          "last_sent_at": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "next_send_at": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        }
                      }
                    },
                    "totals": {
                      "type": "object",
                      "required": [
                        "matches",
                        "recipients",
                        "queued",
                        "rate_limited"
                      ],
                      "properties": {
                        "matches": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "recipients": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "queued": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "rate_limited": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/users/directory": {
      "get": {
        "tags": [
          "admin",
          "user-admin"
        ],
        "summary": "Elenco utenti per ruolo e intervallo di registrazione (cursore)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          },
          {
            "name": "role",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "platform_admin",
                "tenant_admin",
                "org_admin",
                "org_operator",
                "manager",
                "assistant",
                "scorer",
                "team_captain",
                "team_coach",
                "team_staff",
                "team_member",
                "coach",
                "staff",
                "referee",
                "evaluator",
                "fantasy_manager",
                "media_editor",
                "sponsor_manager",
                "dpo",
                "support",
                "external_organizer",
                "public_user",
                "tournament_admin",
                "group_admin",
                "medical_officer",
                "hostess",
                "journalist",
                "photographer",
                "club_admin"
              ]
            }
          },
          {
            "name": "registered_from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "registered_to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "include_suspended",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false",
                "1",
                "0"
              ]
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Pagina dell’elenco (email solo con tenant.administer)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "next_cursor",
                    "scan_limited"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "display_name",
                          "email",
                          "registered_at",
                          "status",
                          "roles"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "display_name": {
                            "type": "string"
                          },
                          "email": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "registered_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "active",
                              "suspended",
                              "unclaimed",
                              "invited"
                            ]
                          },
                          "roles": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "platform_admin",
                                "tenant_admin",
                                "org_admin",
                                "org_operator",
                                "manager",
                                "assistant",
                                "scorer",
                                "team_captain",
                                "team_coach",
                                "team_staff",
                                "team_member",
                                "coach",
                                "staff",
                                "referee",
                                "evaluator",
                                "fantasy_manager",
                                "media_editor",
                                "sponsor_manager",
                                "dpo",
                                "support",
                                "external_organizer",
                                "public_user",
                                "tournament_admin",
                                "group_admin",
                                "medical_officer",
                                "hostess",
                                "journalist",
                                "photographer",
                                "club_admin"
                              ]
                            }
                          }
                        }
                      }
                    },
                    "next_cursor": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "scan_limited": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/users/{userId}/claim-invitation": {
      "post": {
        "tags": [
          "admin",
          "user-admin"
        ],
        "summary": "Genera l’invito a reclamare l’identità (token mostrato una volta)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "ttl_days": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 30
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Invito generato; invio email secondo il provider (D-08)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "claim",
                    "token",
                    "delivery"
                  ],
                  "properties": {
                    "claim": {
                      "type": "object",
                      "required": [
                        "user_id",
                        "state",
                        "invited_at",
                        "expires_at",
                        "claimed_at",
                        "created_at"
                      ],
                      "properties": {
                        "user_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "unclaimed",
                            "invited",
                            "claimed"
                          ]
                        },
                        "invited_at": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "date-time"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "expires_at": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "date-time"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "claimed_at": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "date-time"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    },
                    "token": {
                      "type": "string"
                    },
                    "delivery": {
                      "type": "object",
                      "required": [
                        "channel",
                        "status",
                        "reason"
                      ],
                      "properties": {
                        "channel": {
                          "type": "string",
                          "enum": [
                            "email"
                          ]
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "not_configured",
                            "not_sent"
                          ]
                        },
                        "reason": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/identity-claims/accept": {
      "post": {
        "tags": [
          "auth",
          "user-admin"
        ],
        "summary": "Accetta l’invito e reclama l’identità (X-Tenant; token Supabase se configurato)",
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "pii",
        "x-rate-limit-tier": "invite_accept",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "X-Tenant",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "token"
                ],
                "properties": {
                  "token": {
                    "type": "string",
                    "minLength": 32,
                    "maxLength": 256
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Identità reclamata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "user_id",
                    "claimed_at"
                  ],
                  "properties": {
                    "user_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "claimed_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "account": {
                      "type": "object",
                      "required": [
                        "is_minor",
                        "guardian_required"
                      ],
                      "properties": {
                        "is_minor": {
                          "type": "boolean"
                        },
                        "guardian_required": {
                          "type": "boolean"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/users/{userId}/administers": {
      "get": {
        "tags": [
          "admin",
          "user-admin"
        ],
        "summary": "Riepilogo di cosa amministra l’utente",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ambiti, deleghe e designazioni in attesa",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "user_id",
                    "scopes",
                    "team_delegations",
                    "pending_staff_assignments"
                  ],
                  "properties": {
                    "user_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "scopes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "assignment_id",
                          "role",
                          "scope",
                          "scope_id",
                          "scope_label",
                          "granted_at"
                        ],
                        "properties": {
                          "assignment_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "role": {
                            "type": "string",
                            "enum": [
                              "platform_admin",
                              "tenant_admin",
                              "org_admin",
                              "org_operator",
                              "manager",
                              "assistant",
                              "scorer",
                              "team_captain",
                              "team_coach",
                              "team_staff",
                              "team_member",
                              "coach",
                              "staff",
                              "referee",
                              "evaluator",
                              "fantasy_manager",
                              "media_editor",
                              "sponsor_manager",
                              "dpo",
                              "support",
                              "external_organizer",
                              "public_user",
                              "tournament_admin",
                              "group_admin",
                              "medical_officer",
                              "hostess",
                              "journalist",
                              "photographer",
                              "club_admin"
                            ]
                          },
                          "scope": {
                            "type": "string",
                            "enum": [
                              "tenant",
                              "organization",
                              "team",
                              "tournament",
                              "phase"
                            ]
                          },
                          "scope_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "scope_label": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "granted_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    },
                    "team_delegations": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "team_id",
                          "user_id",
                          "can_reports",
                          "can_import",
                          "can_documents",
                          "source",
                          "version"
                        ],
                        "properties": {
                          "team_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "user_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "can_reports": {
                            "type": "boolean"
                          },
                          "can_import": {
                            "type": "boolean"
                          },
                          "can_documents": {
                            "type": "boolean"
                          },
                          "source": {
                            "type": "string",
                            "enum": [
                              "captain",
                              "explicit",
                              "default"
                            ]
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 0
                          }
                        }
                      }
                    },
                    "pending_staff_assignments": {
                      "type": "integer",
                      "minimum": 0
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/users/{userId}/accessory-permissions": {
      "get": {
        "tags": [
          "admin",
          "user-admin"
        ],
        "summary": "Permessi accessori dell’utente e interruttori concedibili",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Permessi accessori",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "user_id",
                    "permissions",
                    "organization_id",
                    "version",
                    "updated_at",
                    "grantable"
                  ],
                  "properties": {
                    "user_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "permissions": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "accounting.read",
                          "accounting.manage",
                          "news.manage.others",
                          "audit.read.identity"
                        ]
                      }
                    },
                    "organization_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updated_at": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "grantable": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "accounting.read",
                          "accounting.manage",
                          "news.manage.others",
                          "audit.read.identity"
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "admin",
          "user-admin"
        ],
        "summary": "Imposta i permessi accessori (versione; una riga di audit per permesso)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "permissions",
                  "expected_version"
                ],
                "properties": {
                  "permissions": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "accounting.read",
                        "accounting.manage",
                        "news.manage.others",
                        "audit.read.identity"
                      ]
                    }
                  },
                  "expected_version": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Permessi accessori aggiornati",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "user_id",
                    "permissions",
                    "organization_id",
                    "version",
                    "updated_at",
                    "grantable"
                  ],
                  "properties": {
                    "user_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "permissions": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "accounting.read",
                          "accounting.manage",
                          "news.manage.others",
                          "audit.read.identity"
                        ]
                      }
                    },
                    "organization_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updated_at": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "grantable": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "accounting.read",
                          "accounting.manage",
                          "news.manage.others",
                          "audit.read.identity"
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/teams/{teamId}/delegations": {
      "get": {
        "tags": [
          "admin",
          "user-admin"
        ],
        "summary": "Responsabili della squadra con le loro deleghe",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Responsabili",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "team_id",
                          "user_id",
                          "can_reports",
                          "can_import",
                          "can_documents",
                          "source",
                          "version",
                          "display_name",
                          "team_roles"
                        ],
                        "properties": {
                          "team_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "user_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "can_reports": {
                            "type": "boolean"
                          },
                          "can_import": {
                            "type": "boolean"
                          },
                          "can_documents": {
                            "type": "boolean"
                          },
                          "source": {
                            "type": "string",
                            "enum": [
                              "captain",
                              "explicit",
                              "default"
                            ]
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "display_name": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "team_roles": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "platform_admin",
                                "tenant_admin",
                                "org_admin",
                                "org_operator",
                                "manager",
                                "assistant",
                                "scorer",
                                "team_captain",
                                "team_coach",
                                "team_staff",
                                "team_member",
                                "coach",
                                "staff",
                                "referee",
                                "evaluator",
                                "fantasy_manager",
                                "media_editor",
                                "sponsor_manager",
                                "dpo",
                                "support",
                                "external_organizer",
                                "public_user",
                                "tournament_admin",
                                "group_admin",
                                "medical_officer",
                                "hostess",
                                "journalist",
                                "photographer",
                                "club_admin"
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/teams/{teamId}/manager": {
      "get": {
        "tags": [
          "admin",
          "user-admin"
        ],
        "summary": "Account dirigente della squadra (uno per squadra) e invito aperto",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Dirigente",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "team_id",
                    "manager",
                    "pending_invitation"
                  ],
                  "properties": {
                    "team_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "manager": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "required": [
                        "user_id",
                        "display_name",
                        "email",
                        "assignment_id",
                        "granted_at",
                        "active"
                      ],
                      "properties": {
                        "user_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "display_name": {
                          "type": "string"
                        },
                        "email": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "assignment_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "granted_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "active": {
                          "type": "boolean"
                        }
                      }
                    },
                    "pending_invitation": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "required": [
                        "invitation_id",
                        "email",
                        "expires_at"
                      ],
                      "properties": {
                        "invitation_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "email": {
                          "type": "string"
                        },
                        "expires_at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "admin",
          "user-admin"
        ],
        "summary": "Assegna l’account dirigente: utente esistente subito, email nuova con invito; sostituisce il precedente",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "email"
                ],
                "properties": {
                  "email": {
                    "type": "string",
                    "format": "email",
                    "maxLength": 254
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Dirigente assegnato o invitato",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "team_id",
                    "manager",
                    "pending_invitation",
                    "outcome",
                    "invitation_token",
                    "email_delivery"
                  ],
                  "properties": {
                    "team_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "manager": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "required": [
                        "user_id",
                        "display_name",
                        "email",
                        "assignment_id",
                        "granted_at",
                        "active"
                      ],
                      "properties": {
                        "user_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "display_name": {
                          "type": "string"
                        },
                        "email": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "assignment_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "granted_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "active": {
                          "type": "boolean"
                        }
                      }
                    },
                    "pending_invitation": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "required": [
                        "invitation_id",
                        "email",
                        "expires_at"
                      ],
                      "properties": {
                        "invitation_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "email": {
                          "type": "string"
                        },
                        "expires_at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    },
                    "outcome": {
                      "type": "string",
                      "enum": [
                        "assigned",
                        "invited"
                      ]
                    },
                    "invitation_token": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "email_delivery": {
                      "type": "string",
                      "enum": [
                        "sent",
                        "failed",
                        "not_configured",
                        "not_needed"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "admin",
          "user-admin"
        ],
        "summary": "Revoca l’account dirigente e ritira l’invito aperto",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Squadra senza dirigente",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "team_id",
                    "manager",
                    "pending_invitation"
                  ],
                  "properties": {
                    "team_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "manager": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "required": [
                        "user_id",
                        "display_name",
                        "email",
                        "assignment_id",
                        "granted_at",
                        "active"
                      ],
                      "properties": {
                        "user_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "display_name": {
                          "type": "string"
                        },
                        "email": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "assignment_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "granted_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "active": {
                          "type": "boolean"
                        }
                      }
                    },
                    "pending_invitation": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "required": [
                        "invitation_id",
                        "email",
                        "expires_at"
                      ],
                      "properties": {
                        "invitation_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "email": {
                          "type": "string"
                        },
                        "expires_at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/teams/{teamId}/delegations/{userId}": {
      "put": {
        "tags": [
          "admin",
          "user-admin"
        ],
        "summary": "Imposta le deleghe di un responsabile (versione)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "can_reports",
                  "can_import",
                  "can_documents",
                  "expected_version"
                ],
                "properties": {
                  "can_reports": {
                    "type": "boolean"
                  },
                  "can_import": {
                    "type": "boolean"
                  },
                  "can_documents": {
                    "type": "boolean"
                  },
                  "expected_version": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Deleghe",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "team_id",
                    "user_id",
                    "can_reports",
                    "can_import",
                    "can_documents",
                    "source",
                    "version"
                  ],
                  "properties": {
                    "team_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "user_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "can_reports": {
                      "type": "boolean"
                    },
                    "can_import": {
                      "type": "boolean"
                    },
                    "can_documents": {
                      "type": "boolean"
                    },
                    "source": {
                      "type": "string",
                      "enum": [
                        "captain",
                        "explicit",
                        "default"
                      ]
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/me/team-area/delegations": {
      "get": {
        "tags": [
          "me",
          "user-admin"
        ],
        "summary": "Le mie deleghe per una squadra (azioni da mostrare)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "self_user_scope",
        "x-privacy-classification": "tenant_internal",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "team_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Deleghe",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "team_id",
                    "user_id",
                    "can_reports",
                    "can_import",
                    "can_documents",
                    "source",
                    "version"
                  ],
                  "properties": {
                    "team_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "user_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "can_reports": {
                      "type": "boolean"
                    },
                    "can_import": {
                      "type": "boolean"
                    },
                    "can_documents": {
                      "type": "boolean"
                    },
                    "source": {
                      "type": "string",
                      "enum": [
                        "captain",
                        "explicit",
                        "default"
                      ]
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/matches/{matchId}/staff-assignments": {
      "get": {
        "tags": [
          "admin",
          "user-admin"
        ],
        "summary": "Giornalisti, hostess e fotografi designati sulla partita",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Designazioni e candidati",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "match_id",
                    "items",
                    "candidates"
                  ],
                  "properties": {
                    "match_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "match_id",
                          "user_id",
                          "display_name",
                          "kind",
                          "status",
                          "match_label",
                          "match_scheduled_at",
                          "decline_reason",
                          "responded_at",
                          "revoked_at",
                          "created_at",
                          "updated_at"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "match_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "user_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "display_name": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "journalist",
                              "hostess",
                              "photographer"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "accepted",
                              "declined",
                              "revoked"
                            ]
                          },
                          "match_label": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "match_scheduled_at": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "decline_reason": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "responded_at": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "revoked_at": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updated_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    },
                    "candidates": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "user_id",
                          "display_name",
                          "kind"
                        ],
                        "properties": {
                          "user_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "display_name": {
                            "type": "string"
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "journalist",
                              "hostess",
                              "photographer"
                            ]
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "admin",
          "user-admin"
        ],
        "summary": "Designa una persona (ripetibile con la stessa idempotency_key)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "user_id",
                  "kind",
                  "idempotency_key"
                ],
                "properties": {
                  "user_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "journalist",
                      "hostess",
                      "photographer"
                    ]
                  },
                  "idempotency_key": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 120
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Già designata (stessa chiave o designazione viva)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "match_id",
                    "user_id",
                    "display_name",
                    "kind",
                    "status",
                    "match_label",
                    "match_scheduled_at",
                    "decline_reason",
                    "responded_at",
                    "revoked_at",
                    "created_at",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "match_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "user_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "display_name": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "journalist",
                        "hostess",
                        "photographer"
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "accepted",
                        "declined",
                        "revoked"
                      ]
                    },
                    "match_label": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "match_scheduled_at": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "decline_reason": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "responded_at": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "revoked_at": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "Designata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "match_id",
                    "user_id",
                    "display_name",
                    "kind",
                    "status",
                    "match_label",
                    "match_scheduled_at",
                    "decline_reason",
                    "responded_at",
                    "revoked_at",
                    "created_at",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "match_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "user_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "display_name": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "journalist",
                        "hostess",
                        "photographer"
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "accepted",
                        "declined",
                        "revoked"
                      ]
                    },
                    "match_label": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "match_scheduled_at": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "decline_reason": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "responded_at": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "revoked_at": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/matches/{matchId}/staff-assignments/revoke": {
      "post": {
        "tags": [
          "admin",
          "user-admin"
        ],
        "summary": "Revoca una designazione della partita",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "assignment_id",
                  "reason"
                ],
                "properties": {
                  "assignment_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 500
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Revocata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "match_id",
                    "user_id",
                    "display_name",
                    "kind",
                    "status",
                    "match_label",
                    "match_scheduled_at",
                    "decline_reason",
                    "responded_at",
                    "revoked_at",
                    "created_at",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "match_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "user_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "display_name": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "journalist",
                        "hostess",
                        "photographer"
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "accepted",
                        "declined",
                        "revoked"
                      ]
                    },
                    "match_label": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "match_scheduled_at": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "decline_reason": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "responded_at": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "revoked_at": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/staff-assignments/mine": {
      "get": {
        "tags": [
          "admin",
          "user-admin"
        ],
        "summary": "Le mie designazioni (giornalista, hostess, fotografo)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "responses": {
          "200": {
            "description": "Designazioni",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "match_id",
                          "user_id",
                          "display_name",
                          "kind",
                          "status",
                          "match_label",
                          "match_scheduled_at",
                          "decline_reason",
                          "responded_at",
                          "revoked_at",
                          "created_at",
                          "updated_at"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "match_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "user_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "display_name": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "journalist",
                              "hostess",
                              "photographer"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "accepted",
                              "declined",
                              "revoked"
                            ]
                          },
                          "match_label": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "match_scheduled_at": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "decline_reason": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "responded_at": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "revoked_at": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updated_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/staff-assignments/{assignmentId}/accept": {
      "post": {
        "tags": [
          "admin",
          "user-admin"
        ],
        "summary": "Accetta la propria designazione",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "assignmentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Accettata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "match_id",
                    "user_id",
                    "display_name",
                    "kind",
                    "status",
                    "match_label",
                    "match_scheduled_at",
                    "decline_reason",
                    "responded_at",
                    "revoked_at",
                    "created_at",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "match_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "user_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "display_name": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "journalist",
                        "hostess",
                        "photographer"
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "accepted",
                        "declined",
                        "revoked"
                      ]
                    },
                    "match_label": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "match_scheduled_at": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "decline_reason": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "responded_at": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "revoked_at": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/staff-assignments/{assignmentId}/decline": {
      "post": {
        "tags": [
          "admin",
          "user-admin"
        ],
        "summary": "Rifiuta la propria designazione",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "assignmentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "reason"
                ],
                "properties": {
                  "reason": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 500
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Rifiutata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "match_id",
                    "user_id",
                    "display_name",
                    "kind",
                    "status",
                    "match_label",
                    "match_scheduled_at",
                    "decline_reason",
                    "responded_at",
                    "revoked_at",
                    "created_at",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "match_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "user_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "display_name": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "journalist",
                        "hostess",
                        "photographer"
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "accepted",
                        "declined",
                        "revoked"
                      ]
                    },
                    "match_label": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "match_scheduled_at": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "decline_reason": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "responded_at": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "revoked_at": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/me/admin-scope": {
      "get": {
        "tags": [
          "me",
          "user-admin"
        ],
        "summary": "Ambito e menu ridotto dell’amministratore di torneo o di girone",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "self_user_scope",
        "x-privacy-classification": "tenant_internal",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "responses": {
          "200": {
            "description": "Ambiti",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "role",
                          "tournament",
                          "phase",
                          "nav"
                        ],
                        "properties": {
                          "role": {
                            "type": "string",
                            "enum": [
                              "tournament_admin",
                              "group_admin"
                            ]
                          },
                          "tournament": {
                            "type": "object",
                            "required": [
                              "id",
                              "label"
                            ],
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "label": {
                                "type": "string"
                              }
                            }
                          },
                          "phase": {
                            "oneOf": [
                              {
                                "type": "object",
                                "required": [
                                  "id",
                                  "label"
                                ],
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "label": {
                                    "type": "string"
                                  }
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "nav": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "href",
                                "label"
                              ],
                              "properties": {
                                "href": {
                                  "type": "string"
                                },
                                "label": {
                                  "type": "string"
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/tournaments/{tournamentId}/scope-matches": {
      "get": {
        "tags": [
          "admin",
          "user-admin"
        ],
        "summary": "Partite del torneo (amministratore di torneo)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Partite dell’ambito",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "next_cursor"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "scheduled_at",
                          "state",
                          "home_team_id",
                          "away_team_id",
                          "home_label",
                          "away_label",
                          "phase_id"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "scheduled_at": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "state": {
                            "type": "string"
                          },
                          "home_team_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "away_team_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "home_label": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "away_label": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "phase_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        }
                      }
                    },
                    "next_cursor": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/tournaments/{tournamentId}/phases/{phaseId}/scope-matches": {
      "get": {
        "tags": [
          "admin",
          "user-admin"
        ],
        "summary": "Partite della fase (amministratore di girone)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "phaseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Partite dell’ambito",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "next_cursor"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "scheduled_at",
                          "state",
                          "home_team_id",
                          "away_team_id",
                          "home_label",
                          "away_label",
                          "phase_id"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "scheduled_at": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "state": {
                            "type": "string"
                          },
                          "home_team_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "away_team_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "home_label": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "away_label": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "phase_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        }
                      }
                    },
                    "next_cursor": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/tournaments/{tournamentId}/registrations": {
      "get": {
        "tags": [
          "admin",
          "team-registrations"
        ],
        "summary": "Iscrizioni del torneo: accettate, in attesa e rifiutate, con preferenze e documento (cursore)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "pending",
                "accepted",
                "rejected"
              ]
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 400
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Pagina di iscrizioni",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "counts",
                    "next_cursor"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "tournament_id",
                          "tournament_label",
                          "season_id",
                          "team_id",
                          "team_name",
                          "state",
                          "origin",
                          "preferences_recorded",
                          "preferred_field_id",
                          "preferred_field_label",
                          "preferred_weekday",
                          "category_ids",
                          "series_preference",
                          "note",
                          "requested_at",
                          "decided_at",
                          "decision_reason",
                          "document",
                          "removal_locked",
                          "version"
                        ],
                        "properties": {
                          "tournament_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "tournament_label": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "season_id": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uuid"
                          },
                          "team_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "team_name": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "state": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "accepted",
                              "rejected"
                            ]
                          },
                          "origin": {
                            "type": "string",
                            "enum": [
                              "admin",
                              "team",
                              "imported"
                            ]
                          },
                          "preferences_recorded": {
                            "type": "boolean"
                          },
                          "preferred_field_id": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uuid"
                          },
                          "preferred_field_label": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "preferred_weekday": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "minimum": 1,
                            "maximum": 7
                          },
                          "category_ids": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "format": "uuid"
                            }
                          },
                          "series_preference": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "enum": [
                              "none",
                              "A",
                              "B",
                              "C",
                              "D",
                              "E"
                            ]
                          },
                          "note": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "requested_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          },
                          "decided_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          },
                          "decision_reason": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "document": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "required": [
                              "filename",
                              "content_type",
                              "byte_size",
                              "uploaded_at"
                            ],
                            "properties": {
                              "filename": {
                                "type": "string"
                              },
                              "content_type": {
                                "type": "string"
                              },
                              "byte_size": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "uploaded_at": {
                                "type": "string",
                                "format": "date-time"
                              }
                            }
                          },
                          "removal_locked": {
                            "type": "boolean"
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 0
                          }
                        }
                      }
                    },
                    "counts": {
                      "type": "object",
                      "required": [
                        "pending",
                        "accepted",
                        "rejected"
                      ],
                      "properties": {
                        "pending": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "accepted": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "rejected": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/tournaments/{tournamentId}/registrations/accept-all": {
      "post": {
        "tags": [
          "admin",
          "team-registrations"
        ],
        "summary": "Accetta tutte le iscrizioni in attesa (OP-338); ripetibile: senza attese non fa nulla",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Esito",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "accepted",
                    "failed",
                    "counts"
                  ],
                  "properties": {
                    "accepted": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "failed": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "team_id",
                          "code"
                        ],
                        "properties": {
                          "team_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "code": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "counts": {
                      "type": "object",
                      "required": [
                        "pending",
                        "accepted",
                        "rejected"
                      ],
                      "properties": {
                        "pending": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "accepted": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "rejected": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/tournaments/{tournamentId}/team-preferences": {
      "get": {
        "tags": [
          "admin",
          "team-registrations"
        ],
        "summary": "Preferenze delle squadre iscritte per il calendario (avvisi «*», mai vincoli)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Preferenze",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "team_preference",
                    "items"
                  ],
                  "properties": {
                    "team_preference": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "day_and_field",
                        "day_only",
                        "field_only",
                        "none"
                      ]
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "team_id",
                          "weekdays",
                          "field_id"
                        ],
                        "properties": {
                          "team_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "weekdays": {
                            "type": "array",
                            "items": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 7
                            }
                          },
                          "field_id": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uuid"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/tournaments/{tournamentId}/teams/{teamId}/registration": {
      "put": {
        "tags": [
          "admin",
          "team-registrations"
        ],
        "summary": "Crea (in attesa) o aggiorna la scheda d’iscrizione: campo, giorno, categorie, serie (versione)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "preferred_field_id",
                  "preferred_weekday",
                  "category_ids",
                  "series_preference",
                  "note",
                  "expected_version"
                ],
                "properties": {
                  "preferred_field_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "preferred_weekday": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1,
                    "maximum": 7
                  },
                  "category_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "maxItems": 20
                  },
                  "series_preference": {
                    "type": "string",
                    "enum": [
                      "none",
                      "A",
                      "B",
                      "C",
                      "D",
                      "E"
                    ]
                  },
                  "note": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 500
                  },
                  "expected_version": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Scheda aggiornata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "tournament_id",
                    "tournament_label",
                    "season_id",
                    "team_id",
                    "team_name",
                    "state",
                    "origin",
                    "preferences_recorded",
                    "preferred_field_id",
                    "preferred_field_label",
                    "preferred_weekday",
                    "category_ids",
                    "series_preference",
                    "note",
                    "requested_at",
                    "decided_at",
                    "decision_reason",
                    "document",
                    "removal_locked",
                    "version"
                  ],
                  "properties": {
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "tournament_label": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "season_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "team_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "team_name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "state": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "accepted",
                        "rejected"
                      ]
                    },
                    "origin": {
                      "type": "string",
                      "enum": [
                        "admin",
                        "team",
                        "imported"
                      ]
                    },
                    "preferences_recorded": {
                      "type": "boolean"
                    },
                    "preferred_field_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "preferred_field_label": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "preferred_weekday": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 1,
                      "maximum": 7
                    },
                    "category_ids": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "format": "uuid"
                      }
                    },
                    "series_preference": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "none",
                        "A",
                        "B",
                        "C",
                        "D",
                        "E"
                      ]
                    },
                    "note": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "requested_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "decided_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "decision_reason": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "document": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "required": [
                        "filename",
                        "content_type",
                        "byte_size",
                        "uploaded_at"
                      ],
                      "properties": {
                        "filename": {
                          "type": "string"
                        },
                        "content_type": {
                          "type": "string"
                        },
                        "byte_size": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "uploaded_at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    },
                    "removal_locked": {
                      "type": "boolean"
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "Richiesta creata, in attesa",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "tournament_id",
                    "tournament_label",
                    "season_id",
                    "team_id",
                    "team_name",
                    "state",
                    "origin",
                    "preferences_recorded",
                    "preferred_field_id",
                    "preferred_field_label",
                    "preferred_weekday",
                    "category_ids",
                    "series_preference",
                    "note",
                    "requested_at",
                    "decided_at",
                    "decision_reason",
                    "document",
                    "removal_locked",
                    "version"
                  ],
                  "properties": {
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "tournament_label": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "season_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "team_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "team_name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "state": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "accepted",
                        "rejected"
                      ]
                    },
                    "origin": {
                      "type": "string",
                      "enum": [
                        "admin",
                        "team",
                        "imported"
                      ]
                    },
                    "preferences_recorded": {
                      "type": "boolean"
                    },
                    "preferred_field_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "preferred_field_label": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "preferred_weekday": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 1,
                      "maximum": 7
                    },
                    "category_ids": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "format": "uuid"
                      }
                    },
                    "series_preference": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "none",
                        "A",
                        "B",
                        "C",
                        "D",
                        "E"
                      ]
                    },
                    "note": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "requested_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "decided_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "decision_reason": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "document": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "required": [
                        "filename",
                        "content_type",
                        "byte_size",
                        "uploaded_at"
                      ],
                      "properties": {
                        "filename": {
                          "type": "string"
                        },
                        "content_type": {
                          "type": "string"
                        },
                        "byte_size": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "uploaded_at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    },
                    "removal_locked": {
                      "type": "boolean"
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/tournaments/{tournamentId}/teams/{teamId}/registration/decision": {
      "post": {
        "tags": [
          "admin",
          "team-registrations"
        ],
        "summary": "Accetta o rifiuta l’iscrizione (OP-337); rifiutare un’accettata richiede un motivo e nessuna gara",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "decision",
                  "reason",
                  "expected_version"
                ],
                "properties": {
                  "decision": {
                    "type": "string",
                    "enum": [
                      "accept",
                      "reject"
                    ]
                  },
                  "reason": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 500
                  },
                  "expected_version": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Iscrizione decisa",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "tournament_id",
                    "tournament_label",
                    "season_id",
                    "team_id",
                    "team_name",
                    "state",
                    "origin",
                    "preferences_recorded",
                    "preferred_field_id",
                    "preferred_field_label",
                    "preferred_weekday",
                    "category_ids",
                    "series_preference",
                    "note",
                    "requested_at",
                    "decided_at",
                    "decision_reason",
                    "document",
                    "removal_locked",
                    "version"
                  ],
                  "properties": {
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "tournament_label": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "season_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "team_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "team_name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "state": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "accepted",
                        "rejected"
                      ]
                    },
                    "origin": {
                      "type": "string",
                      "enum": [
                        "admin",
                        "team",
                        "imported"
                      ]
                    },
                    "preferences_recorded": {
                      "type": "boolean"
                    },
                    "preferred_field_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "preferred_field_label": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "preferred_weekday": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 1,
                      "maximum": 7
                    },
                    "category_ids": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "format": "uuid"
                      }
                    },
                    "series_preference": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "none",
                        "A",
                        "B",
                        "C",
                        "D",
                        "E"
                      ]
                    },
                    "note": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "requested_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "decided_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "decision_reason": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "document": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "required": [
                        "filename",
                        "content_type",
                        "byte_size",
                        "uploaded_at"
                      ],
                      "properties": {
                        "filename": {
                          "type": "string"
                        },
                        "content_type": {
                          "type": "string"
                        },
                        "byte_size": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "uploaded_at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    },
                    "removal_locked": {
                      "type": "boolean"
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/tournaments/{tournamentId}/teams/{teamId}/registration/document": {
      "get": {
        "tags": [
          "admin",
          "team-registrations"
        ],
        "summary": "URL firmato (5 minuti) del documento d’iscrizione",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "URL firmato",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "url",
                    "expires_at"
                  ],
                  "properties": {
                    "url": {
                      "type": "string"
                    },
                    "expires_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "admin",
          "team-registrations"
        ],
        "summary": "Carica o sostituisce il documento d’iscrizione (PDF o immagine, max 5 MB)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "filename",
                  "content_type",
                  "content_base64"
                ],
                "properties": {
                  "filename": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "content_type": {
                    "type": "string",
                    "enum": [
                      "application/pdf",
                      "image/jpeg",
                      "image/png"
                    ]
                  },
                  "content_base64": {
                    "type": "string",
                    "minLength": 4,
                    "maxLength": 7000000
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Documento salvato",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "tournament_id",
                    "tournament_label",
                    "season_id",
                    "team_id",
                    "team_name",
                    "state",
                    "origin",
                    "preferences_recorded",
                    "preferred_field_id",
                    "preferred_field_label",
                    "preferred_weekday",
                    "category_ids",
                    "series_preference",
                    "note",
                    "requested_at",
                    "decided_at",
                    "decision_reason",
                    "document",
                    "removal_locked",
                    "version"
                  ],
                  "properties": {
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "tournament_label": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "season_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "team_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "team_name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "state": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "accepted",
                        "rejected"
                      ]
                    },
                    "origin": {
                      "type": "string",
                      "enum": [
                        "admin",
                        "team",
                        "imported"
                      ]
                    },
                    "preferences_recorded": {
                      "type": "boolean"
                    },
                    "preferred_field_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "preferred_field_label": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "preferred_weekday": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 1,
                      "maximum": 7
                    },
                    "category_ids": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "format": "uuid"
                      }
                    },
                    "series_preference": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "none",
                        "A",
                        "B",
                        "C",
                        "D",
                        "E"
                      ]
                    },
                    "note": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "requested_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "decided_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "decision_reason": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "document": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "required": [
                        "filename",
                        "content_type",
                        "byte_size",
                        "uploaded_at"
                      ],
                      "properties": {
                        "filename": {
                          "type": "string"
                        },
                        "content_type": {
                          "type": "string"
                        },
                        "byte_size": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "uploaded_at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    },
                    "removal_locked": {
                      "type": "boolean"
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "admin",
          "team-registrations"
        ],
        "summary": "Elimina il documento d’iscrizione (OP-194)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Documento eliminato",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "tournament_id",
                    "tournament_label",
                    "season_id",
                    "team_id",
                    "team_name",
                    "state",
                    "origin",
                    "preferences_recorded",
                    "preferred_field_id",
                    "preferred_field_label",
                    "preferred_weekday",
                    "category_ids",
                    "series_preference",
                    "note",
                    "requested_at",
                    "decided_at",
                    "decision_reason",
                    "document",
                    "removal_locked",
                    "version"
                  ],
                  "properties": {
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "tournament_label": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "season_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "team_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "team_name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "state": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "accepted",
                        "rejected"
                      ]
                    },
                    "origin": {
                      "type": "string",
                      "enum": [
                        "admin",
                        "team",
                        "imported"
                      ]
                    },
                    "preferences_recorded": {
                      "type": "boolean"
                    },
                    "preferred_field_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "preferred_field_label": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "preferred_weekday": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 1,
                      "maximum": 7
                    },
                    "category_ids": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "format": "uuid"
                      }
                    },
                    "series_preference": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "none",
                        "A",
                        "B",
                        "C",
                        "D",
                        "E"
                      ]
                    },
                    "note": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "requested_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "decided_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "decision_reason": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "document": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "required": [
                        "filename",
                        "content_type",
                        "byte_size",
                        "uploaded_at"
                      ],
                      "properties": {
                        "filename": {
                          "type": "string"
                        },
                        "content_type": {
                          "type": "string"
                        },
                        "byte_size": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "uploaded_at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    },
                    "removal_locked": {
                      "type": "boolean"
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/tournaments/{tournamentId}/roster-lock": {
      "get": {
        "tags": [
          "admin",
          "team-registrations"
        ],
        "summary": "Blocco delle rimozioni dalle rose per il torneo (OP-422)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Blocco",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "scope",
                    "organization_id",
                    "tournament_id",
                    "active",
                    "reason",
                    "version",
                    "updated_at",
                    "updated_by"
                  ],
                  "properties": {
                    "scope": {
                      "type": "string",
                      "enum": [
                        "league",
                        "tournament"
                      ]
                    },
                    "organization_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "tournament_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "active": {
                      "type": "boolean"
                    },
                    "reason": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updated_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "updated_by": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "admin",
          "team-registrations"
        ],
        "summary": "Attiva o disattiva il blocco del torneo, con motivo (versione)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "active",
                  "reason",
                  "expected_version"
                ],
                "properties": {
                  "active": {
                    "type": "boolean"
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 500
                  },
                  "expected_version": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Blocco aggiornato",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "scope",
                    "organization_id",
                    "tournament_id",
                    "active",
                    "reason",
                    "version",
                    "updated_at",
                    "updated_by"
                  ],
                  "properties": {
                    "scope": {
                      "type": "string",
                      "enum": [
                        "league",
                        "tournament"
                      ]
                    },
                    "organization_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "tournament_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "active": {
                      "type": "boolean"
                    },
                    "reason": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updated_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "updated_by": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/roster-locks": {
      "get": {
        "tags": [
          "admin",
          "team-registrations"
        ],
        "summary": "Blocco delle rimozioni della lega (città) e tornei bloccati (OP-314)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Blocchi",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "league",
                    "tournaments"
                  ],
                  "properties": {
                    "league": {
                      "type": "object",
                      "required": [
                        "scope",
                        "organization_id",
                        "tournament_id",
                        "active",
                        "reason",
                        "version",
                        "updated_at",
                        "updated_by"
                      ],
                      "properties": {
                        "scope": {
                          "type": "string",
                          "enum": [
                            "league",
                            "tournament"
                          ]
                        },
                        "organization_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "tournament_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "uuid"
                        },
                        "active": {
                          "type": "boolean"
                        },
                        "reason": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "version": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updated_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "updated_by": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "uuid"
                        }
                      }
                    },
                    "tournaments": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "scope",
                          "organization_id",
                          "tournament_id",
                          "active",
                          "reason",
                          "version",
                          "updated_at",
                          "updated_by"
                        ],
                        "properties": {
                          "scope": {
                            "type": "string",
                            "enum": [
                              "league",
                              "tournament"
                            ]
                          },
                          "organization_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "tournament_id": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uuid"
                          },
                          "active": {
                            "type": "boolean"
                          },
                          "reason": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "updated_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          },
                          "updated_by": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uuid"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "admin",
          "team-registrations"
        ],
        "summary": "Attiva o disattiva il blocco della lega (città), con motivo (versione)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "active",
                  "reason",
                  "expected_version"
                ],
                "properties": {
                  "organization_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "active": {
                    "type": "boolean"
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 500
                  },
                  "expected_version": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Blocco aggiornato",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "scope",
                    "organization_id",
                    "tournament_id",
                    "active",
                    "reason",
                    "version",
                    "updated_at",
                    "updated_by"
                  ],
                  "properties": {
                    "scope": {
                      "type": "string",
                      "enum": [
                        "league",
                        "tournament"
                      ]
                    },
                    "organization_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "tournament_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "active": {
                      "type": "boolean"
                    },
                    "reason": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updated_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "updated_by": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/teams/{teamId}/registrations": {
      "get": {
        "tags": [
          "admin",
          "team-registrations"
        ],
        "summary": "Riepilogo iscrizioni della squadra per stagione, con i costi del torneo",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "season_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 400
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Riepilogo",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "next_cursor"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "tournament_id",
                          "tournament_label",
                          "season_id",
                          "team_id",
                          "team_name",
                          "state",
                          "origin",
                          "preferences_recorded",
                          "preferred_field_id",
                          "preferred_field_label",
                          "preferred_weekday",
                          "category_ids",
                          "series_preference",
                          "note",
                          "requested_at",
                          "decided_at",
                          "decision_reason",
                          "document",
                          "removal_locked",
                          "version",
                          "costs"
                        ],
                        "properties": {
                          "tournament_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "tournament_label": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "season_id": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uuid"
                          },
                          "team_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "team_name": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "state": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "accepted",
                              "rejected"
                            ]
                          },
                          "origin": {
                            "type": "string",
                            "enum": [
                              "admin",
                              "team",
                              "imported"
                            ]
                          },
                          "preferences_recorded": {
                            "type": "boolean"
                          },
                          "preferred_field_id": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uuid"
                          },
                          "preferred_field_label": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "preferred_weekday": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "minimum": 1,
                            "maximum": 7
                          },
                          "category_ids": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "format": "uuid"
                            }
                          },
                          "series_preference": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "enum": [
                              "none",
                              "A",
                              "B",
                              "C",
                              "D",
                              "E"
                            ]
                          },
                          "note": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "requested_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          },
                          "decided_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          },
                          "decision_reason": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "document": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "required": [
                              "filename",
                              "content_type",
                              "byte_size",
                              "uploaded_at"
                            ],
                            "properties": {
                              "filename": {
                                "type": "string"
                              },
                              "content_type": {
                                "type": "string"
                              },
                              "byte_size": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "uploaded_at": {
                                "type": "string",
                                "format": "date-time"
                              }
                            }
                          },
                          "removal_locked": {
                            "type": "boolean"
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "costs": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "required": [
                              "registration_cents",
                              "deposit_cents",
                              "fields_whole_cents",
                              "field_per_match_cents",
                              "payment_deadline"
                            ],
                            "properties": {
                              "registration_cents": {
                                "type": [
                                  "integer",
                                  "null"
                                ],
                                "minimum": 0,
                                "maximum": 100000000
                              },
                              "deposit_cents": {
                                "type": [
                                  "integer",
                                  "null"
                                ],
                                "minimum": 0,
                                "maximum": 100000000
                              },
                              "fields_whole_cents": {
                                "type": [
                                  "integer",
                                  "null"
                                ],
                                "minimum": 0,
                                "maximum": 100000000
                              },
                              "field_per_match_cents": {
                                "type": [
                                  "integer",
                                  "null"
                                ],
                                "minimum": 0,
                                "maximum": 100000000
                              },
                              "payment_deadline": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "format": "date"
                              }
                            },
                            "additionalProperties": false
                          }
                        }
                      }
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/teams/{teamId}/profile": {
      "get": {
        "tags": [
          "admin",
          "team-registrations"
        ],
        "summary": "Società e visibilità della squadra",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Scheda",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "team_id",
                    "club",
                    "hidden",
                    "version"
                  ],
                  "properties": {
                    "team_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "club": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "required": [
                        "id",
                        "name"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "name": {
                          "type": "string"
                        }
                      }
                    },
                    "hidden": {
                      "type": "boolean"
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "admin",
          "team-registrations"
        ],
        "summary": "Assegna la società e nasconde o mostra la squadra nelle ricerche (versione)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "club_id",
                  "hidden",
                  "expected_version"
                ],
                "properties": {
                  "club_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "hidden": {
                    "type": "boolean"
                  },
                  "expected_version": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Scheda aggiornata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "team_id",
                    "club",
                    "hidden",
                    "version"
                  ],
                  "properties": {
                    "team_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "club": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "required": [
                        "id",
                        "name"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "name": {
                          "type": "string"
                        }
                      }
                    },
                    "hidden": {
                      "type": "boolean"
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/team-profiles": {
      "get": {
        "tags": [
          "admin",
          "team-registrations"
        ],
        "summary": "Schede squadra salvate (società, nascoste), per città o società (cursore)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "club_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "hidden",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 400
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Pagina di schede",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "next_cursor"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "team_id",
                          "club",
                          "hidden",
                          "version"
                        ],
                        "properties": {
                          "team_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "club": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "required": [
                              "id",
                              "name"
                            ],
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "name": {
                                "type": "string"
                              }
                            }
                          },
                          "hidden": {
                            "type": "boolean"
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 0
                          }
                        }
                      }
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/clubs": {
      "get": {
        "tags": [
          "admin",
          "team-registrations"
        ],
        "summary": "Società sportive, per nome (cursore)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "archived"
              ]
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 400
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Pagina di società",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "next_cursor"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "organization_id",
                          "name",
                          "city",
                          "address",
                          "email",
                          "phone",
                          "notes",
                          "state",
                          "team_count",
                          "version",
                          "updated_at"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "organization_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "name": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 120
                          },
                          "city": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "maxLength": 120
                          },
                          "address": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "maxLength": 200
                          },
                          "email": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "email",
                            "maxLength": 200
                          },
                          "phone": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "maxLength": 40
                          },
                          "notes": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "maxLength": 2000
                          },
                          "state": {
                            "type": "string",
                            "enum": [
                              "active",
                              "archived"
                            ]
                          },
                          "team_count": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "updated_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "admin",
          "team-registrations"
        ],
        "summary": "Crea una società (ripetibile con request_id)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "organization_id",
                  "name",
                  "city",
                  "address",
                  "email",
                  "phone",
                  "notes"
                ],
                "properties": {
                  "organization_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "city": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 120
                  },
                  "address": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 200
                  },
                  "email": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "email",
                    "maxLength": 200
                  },
                  "phone": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 40
                  },
                  "notes": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 2000
                  },
                  "request_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Stessa richiesta già eseguita",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "organization_id",
                    "name",
                    "city",
                    "address",
                    "email",
                    "phone",
                    "notes",
                    "state",
                    "team_count",
                    "version",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "organization_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 120
                    },
                    "city": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "maxLength": 120
                    },
                    "address": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "maxLength": 200
                    },
                    "email": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "email",
                      "maxLength": 200
                    },
                    "phone": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "maxLength": 40
                    },
                    "notes": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "maxLength": 2000
                    },
                    "state": {
                      "type": "string",
                      "enum": [
                        "active",
                        "archived"
                      ]
                    },
                    "team_count": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "Società creata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "organization_id",
                    "name",
                    "city",
                    "address",
                    "email",
                    "phone",
                    "notes",
                    "state",
                    "team_count",
                    "version",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "organization_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 120
                    },
                    "city": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "maxLength": 120
                    },
                    "address": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "maxLength": 200
                    },
                    "email": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "email",
                      "maxLength": 200
                    },
                    "phone": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "maxLength": 40
                    },
                    "notes": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "maxLength": 2000
                    },
                    "state": {
                      "type": "string",
                      "enum": [
                        "active",
                        "archived"
                      ]
                    },
                    "team_count": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/clubs/{clubId}": {
      "get": {
        "tags": [
          "admin",
          "team-registrations"
        ],
        "summary": "Scheda della società: dati, squadre e gestori",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "clubId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Società",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "club",
                    "teams",
                    "admins"
                  ],
                  "properties": {
                    "club": {
                      "type": "object",
                      "required": [
                        "id",
                        "organization_id",
                        "name",
                        "city",
                        "address",
                        "email",
                        "phone",
                        "notes",
                        "state",
                        "team_count",
                        "version",
                        "updated_at"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "organization_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 120
                        },
                        "city": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 120
                        },
                        "address": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 200
                        },
                        "email": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "email",
                          "maxLength": 200
                        },
                        "phone": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 40
                        },
                        "notes": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 2000
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "active",
                            "archived"
                          ]
                        },
                        "team_count": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "version": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updated_at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    },
                    "teams": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "team_id",
                          "team_name",
                          "hidden"
                        ],
                        "properties": {
                          "team_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "team_name": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "hidden": {
                            "type": "boolean"
                          }
                        }
                      }
                    },
                    "admins": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "club_id",
                          "user_id",
                          "display_name",
                          "email",
                          "permissions",
                          "granted_at",
                          "version"
                        ],
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "club_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "user_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "display_name": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "email": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "permissions": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "registrations"
                              ]
                            }
                          },
                          "granted_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 0
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "admin",
          "team-registrations"
        ],
        "summary": "Aggiorna i dati della società (versione)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "clubId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "city",
                  "address",
                  "email",
                  "phone",
                  "notes",
                  "expected_version"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "city": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 120
                  },
                  "address": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 200
                  },
                  "email": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "email",
                    "maxLength": 200
                  },
                  "phone": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 40
                  },
                  "notes": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 2000
                  },
                  "expected_version": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Società aggiornata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "organization_id",
                    "name",
                    "city",
                    "address",
                    "email",
                    "phone",
                    "notes",
                    "state",
                    "team_count",
                    "version",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "organization_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 120
                    },
                    "city": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "maxLength": 120
                    },
                    "address": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "maxLength": 200
                    },
                    "email": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "email",
                      "maxLength": 200
                    },
                    "phone": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "maxLength": 40
                    },
                    "notes": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "maxLength": 2000
                    },
                    "state": {
                      "type": "string",
                      "enum": [
                        "active",
                        "archived"
                      ]
                    },
                    "team_count": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/clubs/{clubId}/archive": {
      "post": {
        "tags": [
          "admin",
          "team-registrations"
        ],
        "summary": "Archivia la società; rifiutata (409) finché ha squadre",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "clubId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "expected_version"
                ],
                "properties": {
                  "expected_version": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Società archiviata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "organization_id",
                    "name",
                    "city",
                    "address",
                    "email",
                    "phone",
                    "notes",
                    "state",
                    "team_count",
                    "version",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "organization_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 120
                    },
                    "city": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "maxLength": 120
                    },
                    "address": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "maxLength": 200
                    },
                    "email": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "email",
                      "maxLength": 200
                    },
                    "phone": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "maxLength": 40
                    },
                    "notes": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "maxLength": 2000
                    },
                    "state": {
                      "type": "string",
                      "enum": [
                        "active",
                        "archived"
                      ]
                    },
                    "team_count": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/clubs/{clubId}/admins": {
      "post": {
        "tags": [
          "admin",
          "team-registrations"
        ],
        "summary": "Nomina un gestore della società (ruolo club_admin con ambito società; ripetibile)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "clubId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "user_id"
                ],
                "properties": {
                  "user_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "permissions": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "registrations"
                      ]
                    },
                    "maxItems": 10
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Era già gestore",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "club_id",
                    "user_id",
                    "display_name",
                    "email",
                    "permissions",
                    "granted_at",
                    "version"
                  ],
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "club_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "user_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "display_name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "email": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "permissions": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "registrations"
                        ]
                      }
                    },
                    "granted_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "Gestore nominato",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "club_id",
                    "user_id",
                    "display_name",
                    "email",
                    "permissions",
                    "granted_at",
                    "version"
                  ],
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "club_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "user_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "display_name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "email": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "permissions": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "registrations"
                        ]
                      }
                    },
                    "granted_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/clubs/{clubId}/admins/{userId}": {
      "put": {
        "tags": [
          "admin",
          "team-registrations"
        ],
        "summary": "Permessi del gestore della società (OP-326; versione)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "clubId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "permissions",
                  "expected_version"
                ],
                "properties": {
                  "permissions": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "registrations"
                      ]
                    },
                    "maxItems": 10
                  },
                  "expected_version": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gestore aggiornato",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "club_id",
                    "user_id",
                    "display_name",
                    "email",
                    "permissions",
                    "granted_at",
                    "version"
                  ],
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "club_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "user_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "display_name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "email": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "permissions": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "registrations"
                        ]
                      }
                    },
                    "granted_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "admin",
          "team-registrations"
        ],
        "summary": "Revoca il gestore della società (OP-325)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "clubId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gestore revocato",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "club_id",
                    "user_id",
                    "display_name",
                    "email",
                    "permissions",
                    "granted_at",
                    "version"
                  ],
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "club_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "user_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "display_name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "email": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "permissions": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "registrations"
                        ]
                      }
                    },
                    "granted_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/me/team-registrations": {
      "get": {
        "tags": [
          "team-area",
          "team-registrations"
        ],
        "summary": "Le squadre che gestisco (capitano, staff o gestore società) con le loro iscrizioni",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "self_user_scope",
        "x-privacy-classification": "tenant_internal",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": false,
        "responses": {
          "200": {
            "description": "Squadre e iscrizioni",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "teams"
                  ],
                  "properties": {
                    "teams": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "team_id",
                          "team_name",
                          "via",
                          "club",
                          "registrations"
                        ],
                        "properties": {
                          "team_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "team_name": {
                            "type": "string"
                          },
                          "via": {
                            "type": "string",
                            "enum": [
                              "team_role",
                              "club_admin"
                            ]
                          },
                          "club": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "required": [
                              "id",
                              "name"
                            ],
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "name": {
                                "type": "string"
                              }
                            }
                          },
                          "registrations": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "tournament_id",
                                "tournament_label",
                                "season_id",
                                "team_id",
                                "team_name",
                                "state",
                                "origin",
                                "preferences_recorded",
                                "preferred_field_id",
                                "preferred_field_label",
                                "preferred_weekday",
                                "category_ids",
                                "series_preference",
                                "note",
                                "requested_at",
                                "decided_at",
                                "decision_reason",
                                "document",
                                "removal_locked",
                                "version"
                              ],
                              "properties": {
                                "tournament_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "tournament_label": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "season_id": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "format": "uuid"
                                },
                                "team_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "team_name": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "state": {
                                  "type": "string",
                                  "enum": [
                                    "pending",
                                    "accepted",
                                    "rejected"
                                  ]
                                },
                                "origin": {
                                  "type": "string",
                                  "enum": [
                                    "admin",
                                    "team",
                                    "imported"
                                  ]
                                },
                                "preferences_recorded": {
                                  "type": "boolean"
                                },
                                "preferred_field_id": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "format": "uuid"
                                },
                                "preferred_field_label": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "preferred_weekday": {
                                  "type": [
                                    "integer",
                                    "null"
                                  ],
                                  "minimum": 1,
                                  "maximum": 7
                                },
                                "category_ids": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "format": "uuid"
                                  }
                                },
                                "series_preference": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "enum": [
                                    "none",
                                    "A",
                                    "B",
                                    "C",
                                    "D",
                                    "E"
                                  ]
                                },
                                "note": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "requested_at": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "format": "date-time"
                                },
                                "decided_at": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "format": "date-time"
                                },
                                "decision_reason": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "document": {
                                  "type": [
                                    "object",
                                    "null"
                                  ],
                                  "required": [
                                    "filename",
                                    "content_type",
                                    "byte_size",
                                    "uploaded_at"
                                  ],
                                  "properties": {
                                    "filename": {
                                      "type": "string"
                                    },
                                    "content_type": {
                                      "type": "string"
                                    },
                                    "byte_size": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "uploaded_at": {
                                      "type": "string",
                                      "format": "date-time"
                                    }
                                  }
                                },
                                "removal_locked": {
                                  "type": "boolean"
                                },
                                "version": {
                                  "type": "integer",
                                  "minimum": 0
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/teams/{teamId}/registration-options": {
      "get": {
        "tags": [
          "team-area",
          "team-registrations"
        ],
        "summary": "Tornei aperti alle iscrizioni della città, con campi, giorni di apertura, categorie e costi",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "self_user_scope",
        "x-privacy-classification": "tenant_internal",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Opzioni",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "team_id",
                    "team_name",
                    "tournaments"
                  ],
                  "properties": {
                    "team_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "team_name": {
                      "type": "string"
                    },
                    "tournaments": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "tournament_id",
                          "label",
                          "season_id",
                          "starts_on",
                          "team_preference",
                          "fields",
                          "categories",
                          "costs",
                          "registration"
                        ],
                        "properties": {
                          "tournament_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "label": {
                            "type": "string"
                          },
                          "season_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "starts_on": {
                            "type": "string"
                          },
                          "team_preference": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "enum": [
                              "day_and_field",
                              "day_only",
                              "field_only",
                              "none"
                            ]
                          },
                          "fields": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "field_id",
                                "label",
                                "hours_recorded",
                                "open_weekdays"
                              ],
                              "properties": {
                                "field_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "label": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "hours_recorded": {
                                  "type": "boolean"
                                },
                                "open_weekdays": {
                                  "type": "array",
                                  "items": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 7
                                  }
                                }
                              }
                            }
                          },
                          "categories": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "id",
                                "name"
                              ],
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "name": {
                                  "type": "string"
                                }
                              }
                            }
                          },
                          "costs": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "required": [
                              "registration_cents",
                              "deposit_cents",
                              "fields_whole_cents",
                              "field_per_match_cents",
                              "payment_deadline"
                            ],
                            "properties": {
                              "registration_cents": {
                                "type": [
                                  "integer",
                                  "null"
                                ],
                                "minimum": 0,
                                "maximum": 100000000
                              },
                              "deposit_cents": {
                                "type": [
                                  "integer",
                                  "null"
                                ],
                                "minimum": 0,
                                "maximum": 100000000
                              },
                              "fields_whole_cents": {
                                "type": [
                                  "integer",
                                  "null"
                                ],
                                "minimum": 0,
                                "maximum": 100000000
                              },
                              "field_per_match_cents": {
                                "type": [
                                  "integer",
                                  "null"
                                ],
                                "minimum": 0,
                                "maximum": 100000000
                              },
                              "payment_deadline": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "format": "date"
                              }
                            },
                            "additionalProperties": false
                          },
                          "registration": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "required": [
                              "tournament_id",
                              "tournament_label",
                              "season_id",
                              "team_id",
                              "team_name",
                              "state",
                              "origin",
                              "preferences_recorded",
                              "preferred_field_id",
                              "preferred_field_label",
                              "preferred_weekday",
                              "category_ids",
                              "series_preference",
                              "note",
                              "requested_at",
                              "decided_at",
                              "decision_reason",
                              "document",
                              "removal_locked",
                              "version"
                            ],
                            "properties": {
                              "tournament_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "tournament_label": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "season_id": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "format": "uuid"
                              },
                              "team_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "team_name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "state": {
                                "type": "string",
                                "enum": [
                                  "pending",
                                  "accepted",
                                  "rejected"
                                ]
                              },
                              "origin": {
                                "type": "string",
                                "enum": [
                                  "admin",
                                  "team",
                                  "imported"
                                ]
                              },
                              "preferences_recorded": {
                                "type": "boolean"
                              },
                              "preferred_field_id": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "format": "uuid"
                              },
                              "preferred_field_label": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "preferred_weekday": {
                                "type": [
                                  "integer",
                                  "null"
                                ],
                                "minimum": 1,
                                "maximum": 7
                              },
                              "category_ids": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "format": "uuid"
                                }
                              },
                              "series_preference": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "enum": [
                                  "none",
                                  "A",
                                  "B",
                                  "C",
                                  "D",
                                  "E"
                                ]
                              },
                              "note": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "requested_at": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "format": "date-time"
                              },
                              "decided_at": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "format": "date-time"
                              },
                              "decision_reason": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "document": {
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "required": [
                                  "filename",
                                  "content_type",
                                  "byte_size",
                                  "uploaded_at"
                                ],
                                "properties": {
                                  "filename": {
                                    "type": "string"
                                  },
                                  "content_type": {
                                    "type": "string"
                                  },
                                  "byte_size": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "uploaded_at": {
                                    "type": "string",
                                    "format": "date-time"
                                  }
                                }
                              },
                              "removal_locked": {
                                "type": "boolean"
                              },
                              "version": {
                                "type": "integer",
                                "minimum": 0
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/teams/{teamId}/registrations/{tournamentId}": {
      "put": {
        "tags": [
          "team-area",
          "team-registrations"
        ],
        "summary": "Chiede l’iscrizione (in attesa) o ne aggiorna le preferenze finché non è decisa (versione)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "self_user_scope",
        "x-privacy-classification": "tenant_internal",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "preferred_field_id",
                  "preferred_weekday",
                  "category_ids",
                  "series_preference",
                  "note",
                  "expected_version"
                ],
                "properties": {
                  "preferred_field_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "preferred_weekday": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1,
                    "maximum": 7
                  },
                  "category_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "maxItems": 20
                  },
                  "series_preference": {
                    "type": "string",
                    "enum": [
                      "none",
                      "A",
                      "B",
                      "C",
                      "D",
                      "E"
                    ]
                  },
                  "note": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 500
                  },
                  "expected_version": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Richiesta aggiornata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "tournament_id",
                    "tournament_label",
                    "season_id",
                    "team_id",
                    "team_name",
                    "state",
                    "origin",
                    "preferences_recorded",
                    "preferred_field_id",
                    "preferred_field_label",
                    "preferred_weekday",
                    "category_ids",
                    "series_preference",
                    "note",
                    "requested_at",
                    "decided_at",
                    "decision_reason",
                    "document",
                    "removal_locked",
                    "version"
                  ],
                  "properties": {
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "tournament_label": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "season_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "team_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "team_name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "state": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "accepted",
                        "rejected"
                      ]
                    },
                    "origin": {
                      "type": "string",
                      "enum": [
                        "admin",
                        "team",
                        "imported"
                      ]
                    },
                    "preferences_recorded": {
                      "type": "boolean"
                    },
                    "preferred_field_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "preferred_field_label": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "preferred_weekday": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 1,
                      "maximum": 7
                    },
                    "category_ids": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "format": "uuid"
                      }
                    },
                    "series_preference": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "none",
                        "A",
                        "B",
                        "C",
                        "D",
                        "E"
                      ]
                    },
                    "note": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "requested_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "decided_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "decision_reason": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "document": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "required": [
                        "filename",
                        "content_type",
                        "byte_size",
                        "uploaded_at"
                      ],
                      "properties": {
                        "filename": {
                          "type": "string"
                        },
                        "content_type": {
                          "type": "string"
                        },
                        "byte_size": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "uploaded_at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    },
                    "removal_locked": {
                      "type": "boolean"
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "Richiesta inviata, in attesa",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "tournament_id",
                    "tournament_label",
                    "season_id",
                    "team_id",
                    "team_name",
                    "state",
                    "origin",
                    "preferences_recorded",
                    "preferred_field_id",
                    "preferred_field_label",
                    "preferred_weekday",
                    "category_ids",
                    "series_preference",
                    "note",
                    "requested_at",
                    "decided_at",
                    "decision_reason",
                    "document",
                    "removal_locked",
                    "version"
                  ],
                  "properties": {
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "tournament_label": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "season_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "team_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "team_name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "state": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "accepted",
                        "rejected"
                      ]
                    },
                    "origin": {
                      "type": "string",
                      "enum": [
                        "admin",
                        "team",
                        "imported"
                      ]
                    },
                    "preferences_recorded": {
                      "type": "boolean"
                    },
                    "preferred_field_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "preferred_field_label": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "preferred_weekday": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 1,
                      "maximum": 7
                    },
                    "category_ids": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "format": "uuid"
                      }
                    },
                    "series_preference": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "none",
                        "A",
                        "B",
                        "C",
                        "D",
                        "E"
                      ]
                    },
                    "note": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "requested_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "decided_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "decision_reason": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "document": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "required": [
                        "filename",
                        "content_type",
                        "byte_size",
                        "uploaded_at"
                      ],
                      "properties": {
                        "filename": {
                          "type": "string"
                        },
                        "content_type": {
                          "type": "string"
                        },
                        "byte_size": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "uploaded_at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    },
                    "removal_locked": {
                      "type": "boolean"
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/me/team-area/reschedule-requests": {
      "get": {
        "summary": "Elenca le richieste di spostamento della squadra",
        "parameters": [
          {
            "name": "team_id",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "after",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          }
        ]
      },
      "post": {
        "summary": "Propone lo spostamento di una gara",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "match_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "team_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "proposed_scheduled_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 500
                  },
                  "idempotency_key": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 200
                  }
                },
                "required": [
                  "match_id",
                  "team_id",
                  "proposed_scheduled_at",
                  "reason",
                  "idempotency_key"
                ]
              }
            }
          }
        }
      }
    },
    "/me/team-area/reschedule-requests/{requestId}/decision": {
      "post": {
        "summary": "Accetta o rifiuta la proposta come squadra avversaria",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "team_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "decision": {
                    "type": "string",
                    "enum": [
                      "accepted",
                      "rejected"
                    ]
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 500
                  },
                  "expected_version": {
                    "type": "integer",
                    "exclusiveMinimum": 0
                  }
                },
                "required": [
                  "team_id",
                  "decision",
                  "reason",
                  "expected_version"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "requestId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/admin/tournaments/{tournamentId}/reschedule-requests": {
      "get": {
        "summary": "Elenca le richieste di spostamento del torneo",
        "parameters": [
          {
            "name": "team_id",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "after",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/admin/tournaments/{tournamentId}/matches/{matchId}/reschedule-requests/{requestId}/apply": {
      "post": {
        "summary": "Applica al calendario una richiesta accettata",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 500
                  },
                  "expected_version": {
                    "type": "integer",
                    "exclusiveMinimum": 0
                  },
                  "expected_match_etag": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "reason",
                  "expected_version",
                  "expected_match_etag"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "requestId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/admin/tournaments/{tournamentId}/lineup-settings": {
      "get": {
        "summary": "Legge i limiti distinta del torneo",
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "put": {
        "summary": "Configura i limiti distinta del torneo",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "max_players": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 99
                  },
                  "max_staff": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 20
                  },
                  "expected_version": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "required": [
                  "max_players",
                  "max_staff",
                  "expected_version"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/public/teams/{teamId}/staff": {
      "get": {
        "summary": "Staff adulto pubblicabile della squadra nella stagione",
        "parameters": [
          {
            "name": "season_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Stagione scelta esplicitamente dal visitatore."
          },
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/admin/report-deadlines": {
      "get": {
        "tags": [
          "admin",
          "report-sla"
        ],
        "summary": "Coda dei referti oltre le 24 ore",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_bound",
        "x-privacy-classification": "tenant_internal",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Coda scaduta",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "match_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "tournament_label": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "home_team_label": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "away_team_label": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "live_ended_at": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "deadline_at": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "state": {
                            "type": "string",
                            "enum": [
                              "open",
                              "expired",
                              "admin_takeover",
                              "conflict"
                            ]
                          },
                          "referee_report_present": {
                            "type": "boolean"
                          },
                          "authoritative_source": {
                            "type": "string",
                            "enum": [
                              "referee"
                            ]
                          },
                          "takeover_version": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "reminder": {
                            "oneOf": [
                              {
                                "type": "object"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "match_id",
                          "tournament_label",
                          "home_team_label",
                          "away_team_label",
                          "live_ended_at",
                          "deadline_at",
                          "state",
                          "referee_report_present",
                          "authoritative_source",
                          "takeover_version",
                          "reminder"
                        ]
                      }
                    },
                    "takeover_policy": {
                      "type": "object",
                      "properties": {
                        "before_deadline": {
                          "type": "boolean"
                        },
                        "data_source_required": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "before_deadline",
                        "data_source_required"
                      ]
                    },
                    "next_cursor": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "server_time": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "items",
                    "takeover_policy",
                    "next_cursor",
                    "server_time"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/admin/report-deadlines/{matchId}/takeover": {
      "post": {
        "tags": [
          "admin",
          "report-sla"
        ],
        "summary": "Registra il subentro amministrativo",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_bound",
        "x-privacy-classification": "tenant_internal",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "in": "path",
            "name": "matchId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "expected_version": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "data_source": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 300
                  }
                },
                "required": [
                  "expected_version"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Subentro registrato",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/admin/organizations/{organizationId}/site-config": {
      "get": {
        "tags": [
          "admin",
          "site-config"
        ],
        "summary": "Legge la configurazione del sito della città",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Configurazione",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "organization_id",
                    "configured",
                    "version",
                    "settings",
                    "logos",
                    "updated_at",
                    "updated_by"
                  ],
                  "properties": {
                    "organization_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "configured": {
                      "type": "boolean"
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "settings": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "company",
                        "social_style",
                        "social_urls",
                        "appearance",
                        "footer_html"
                      ],
                      "properties": {
                        "company": {
                          "type": "object",
                          "additionalProperties": false,
                          "required": [
                            "legal_name",
                            "vat_number",
                            "fiscal_code",
                            "description",
                            "city",
                            "address",
                            "postal_code",
                            "phone",
                            "fax",
                            "email",
                            "website_url",
                            "home_title",
                            "home_description",
                            "document_footer",
                            "data_controller_name",
                            "data_controller_email"
                          ],
                          "properties": {
                            "legal_name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "vat_number": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "fiscal_code": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "description": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "city": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "address": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "postal_code": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "phone": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "fax": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "email": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "home_title": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "home_description": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "document_footer": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "data_controller_name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "data_controller_email": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "website_url": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "uri",
                              "pattern": "^https?://"
                            }
                          }
                        },
                        "social_style": {
                          "type": "string",
                          "enum": [
                            "square",
                            "circle",
                            "rounded"
                          ]
                        },
                        "social_urls": {
                          "type": "object",
                          "additionalProperties": false,
                          "required": [
                            "facebook",
                            "x",
                            "google_plus",
                            "instagram",
                            "youtube",
                            "vimeo",
                            "pinterest",
                            "linkedin",
                            "flickr",
                            "twitch",
                            "tiktok",
                            "discord",
                            "telegram",
                            "whatsapp"
                          ],
                          "properties": {
                            "facebook": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "uri",
                              "pattern": "^https://"
                            },
                            "x": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "uri",
                              "pattern": "^https://"
                            },
                            "google_plus": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "uri",
                              "pattern": "^https://"
                            },
                            "instagram": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "uri",
                              "pattern": "^https://"
                            },
                            "youtube": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "uri",
                              "pattern": "^https://"
                            },
                            "vimeo": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "uri",
                              "pattern": "^https://"
                            },
                            "pinterest": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "uri",
                              "pattern": "^https://"
                            },
                            "linkedin": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "uri",
                              "pattern": "^https://"
                            },
                            "flickr": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "uri",
                              "pattern": "^https://"
                            },
                            "twitch": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "uri",
                              "pattern": "^https://"
                            },
                            "tiktok": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "uri",
                              "pattern": "^https://"
                            },
                            "discord": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "uri",
                              "pattern": "^https://"
                            },
                            "telegram": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "uri",
                              "pattern": "^https://"
                            },
                            "whatsapp": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "uri",
                              "pattern": "^https://"
                            }
                          }
                        },
                        "appearance": {
                          "type": "object",
                          "additionalProperties": false,
                          "required": [
                            "footer_background",
                            "footer_text",
                            "sponsor_background",
                            "sponsor_text",
                            "heading_font",
                            "body_font",
                            "button_font"
                          ],
                          "properties": {
                            "footer_background": {
                              "type": "string",
                              "pattern": "^#[0-9A-Fa-f]{6}$"
                            },
                            "footer_text": {
                              "type": "string",
                              "pattern": "^#[0-9A-Fa-f]{6}$"
                            },
                            "sponsor_background": {
                              "type": "string",
                              "pattern": "^#[0-9A-Fa-f]{6}$"
                            },
                            "sponsor_text": {
                              "type": "string",
                              "pattern": "^#[0-9A-Fa-f]{6}$"
                            },
                            "heading_font": {
                              "type": "string",
                              "enum": [
                                "archivo",
                                "manrope",
                                "jetbrains_mono"
                              ]
                            },
                            "body_font": {
                              "type": "string",
                              "enum": [
                                "archivo",
                                "manrope",
                                "jetbrains_mono"
                              ]
                            },
                            "button_font": {
                              "type": "string",
                              "enum": [
                                "archivo",
                                "manrope",
                                "jetbrains_mono"
                              ]
                            }
                          }
                        },
                        "footer_html": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 20000
                        }
                      }
                    },
                    "logos": {
                      "type": "array",
                      "minItems": 9,
                      "maxItems": 9,
                      "items": {
                        "type": "object",
                        "required": [
                          "variant",
                          "media_id",
                          "locked",
                          "version",
                          "updated_at",
                          "updated_by"
                        ],
                        "properties": {
                          "variant": {
                            "type": "string",
                            "enum": [
                              "web_primary",
                              "communiques",
                              "mobile",
                              "secondary",
                              "match_sheet",
                              "favicon",
                              "social_home",
                              "social_news",
                              "player_card_mask"
                            ]
                          },
                          "media_id": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uuid"
                          },
                          "locked": {
                            "type": "boolean"
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "updated_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          },
                          "updated_by": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uuid"
                          }
                        }
                      }
                    },
                    "updated_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "updated_by": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "admin",
          "site-config"
        ],
        "summary": "Salva dati, social, colori consentiti, font e footer",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "expected_version",
                  "settings"
                ],
                "properties": {
                  "expected_version": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "settings": {
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                      "company",
                      "social_style",
                      "social_urls",
                      "appearance",
                      "footer_html"
                    ],
                    "properties": {
                      "company": {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                          "legal_name",
                          "vat_number",
                          "fiscal_code",
                          "description",
                          "city",
                          "address",
                          "postal_code",
                          "phone",
                          "fax",
                          "email",
                          "website_url",
                          "home_title",
                          "home_description",
                          "document_footer",
                          "data_controller_name",
                          "data_controller_email"
                        ],
                        "properties": {
                          "legal_name": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "vat_number": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "fiscal_code": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "description": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "city": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "address": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "postal_code": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "phone": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "fax": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "email": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "home_title": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "home_description": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "document_footer": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "data_controller_name": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "data_controller_email": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "website_url": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uri",
                            "pattern": "^https?://"
                          }
                        }
                      },
                      "social_style": {
                        "type": "string",
                        "enum": [
                          "square",
                          "circle",
                          "rounded"
                        ]
                      },
                      "social_urls": {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                          "facebook",
                          "x",
                          "google_plus",
                          "instagram",
                          "youtube",
                          "vimeo",
                          "pinterest",
                          "linkedin",
                          "flickr",
                          "twitch",
                          "tiktok",
                          "discord",
                          "telegram",
                          "whatsapp"
                        ],
                        "properties": {
                          "facebook": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uri",
                            "pattern": "^https://"
                          },
                          "x": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uri",
                            "pattern": "^https://"
                          },
                          "google_plus": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uri",
                            "pattern": "^https://"
                          },
                          "instagram": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uri",
                            "pattern": "^https://"
                          },
                          "youtube": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uri",
                            "pattern": "^https://"
                          },
                          "vimeo": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uri",
                            "pattern": "^https://"
                          },
                          "pinterest": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uri",
                            "pattern": "^https://"
                          },
                          "linkedin": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uri",
                            "pattern": "^https://"
                          },
                          "flickr": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uri",
                            "pattern": "^https://"
                          },
                          "twitch": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uri",
                            "pattern": "^https://"
                          },
                          "tiktok": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uri",
                            "pattern": "^https://"
                          },
                          "discord": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uri",
                            "pattern": "^https://"
                          },
                          "telegram": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uri",
                            "pattern": "^https://"
                          },
                          "whatsapp": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uri",
                            "pattern": "^https://"
                          }
                        }
                      },
                      "appearance": {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                          "footer_background",
                          "footer_text",
                          "sponsor_background",
                          "sponsor_text",
                          "heading_font",
                          "body_font",
                          "button_font"
                        ],
                        "properties": {
                          "footer_background": {
                            "type": "string",
                            "pattern": "^#[0-9A-Fa-f]{6}$"
                          },
                          "footer_text": {
                            "type": "string",
                            "pattern": "^#[0-9A-Fa-f]{6}$"
                          },
                          "sponsor_background": {
                            "type": "string",
                            "pattern": "^#[0-9A-Fa-f]{6}$"
                          },
                          "sponsor_text": {
                            "type": "string",
                            "pattern": "^#[0-9A-Fa-f]{6}$"
                          },
                          "heading_font": {
                            "type": "string",
                            "enum": [
                              "archivo",
                              "manrope",
                              "jetbrains_mono"
                            ]
                          },
                          "body_font": {
                            "type": "string",
                            "enum": [
                              "archivo",
                              "manrope",
                              "jetbrains_mono"
                            ]
                          },
                          "button_font": {
                            "type": "string",
                            "enum": [
                              "archivo",
                              "manrope",
                              "jetbrains_mono"
                            ]
                          }
                        }
                      },
                      "footer_html": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 20000
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Configurazione salvata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "organization_id",
                    "configured",
                    "version",
                    "settings",
                    "logos",
                    "updated_at",
                    "updated_by"
                  ],
                  "properties": {
                    "organization_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "configured": {
                      "type": "boolean"
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "settings": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "company",
                        "social_style",
                        "social_urls",
                        "appearance",
                        "footer_html"
                      ],
                      "properties": {
                        "company": {
                          "type": "object",
                          "additionalProperties": false,
                          "required": [
                            "legal_name",
                            "vat_number",
                            "fiscal_code",
                            "description",
                            "city",
                            "address",
                            "postal_code",
                            "phone",
                            "fax",
                            "email",
                            "website_url",
                            "home_title",
                            "home_description",
                            "document_footer",
                            "data_controller_name",
                            "data_controller_email"
                          ],
                          "properties": {
                            "legal_name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "vat_number": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "fiscal_code": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "description": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "city": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "address": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "postal_code": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "phone": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "fax": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "email": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "home_title": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "home_description": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "document_footer": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "data_controller_name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "data_controller_email": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "website_url": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "uri",
                              "pattern": "^https?://"
                            }
                          }
                        },
                        "social_style": {
                          "type": "string",
                          "enum": [
                            "square",
                            "circle",
                            "rounded"
                          ]
                        },
                        "social_urls": {
                          "type": "object",
                          "additionalProperties": false,
                          "required": [
                            "facebook",
                            "x",
                            "google_plus",
                            "instagram",
                            "youtube",
                            "vimeo",
                            "pinterest",
                            "linkedin",
                            "flickr",
                            "twitch",
                            "tiktok",
                            "discord",
                            "telegram",
                            "whatsapp"
                          ],
                          "properties": {
                            "facebook": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "uri",
                              "pattern": "^https://"
                            },
                            "x": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "uri",
                              "pattern": "^https://"
                            },
                            "google_plus": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "uri",
                              "pattern": "^https://"
                            },
                            "instagram": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "uri",
                              "pattern": "^https://"
                            },
                            "youtube": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "uri",
                              "pattern": "^https://"
                            },
                            "vimeo": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "uri",
                              "pattern": "^https://"
                            },
                            "pinterest": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "uri",
                              "pattern": "^https://"
                            },
                            "linkedin": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "uri",
                              "pattern": "^https://"
                            },
                            "flickr": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "uri",
                              "pattern": "^https://"
                            },
                            "twitch": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "uri",
                              "pattern": "^https://"
                            },
                            "tiktok": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "uri",
                              "pattern": "^https://"
                            },
                            "discord": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "uri",
                              "pattern": "^https://"
                            },
                            "telegram": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "uri",
                              "pattern": "^https://"
                            },
                            "whatsapp": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "uri",
                              "pattern": "^https://"
                            }
                          }
                        },
                        "appearance": {
                          "type": "object",
                          "additionalProperties": false,
                          "required": [
                            "footer_background",
                            "footer_text",
                            "sponsor_background",
                            "sponsor_text",
                            "heading_font",
                            "body_font",
                            "button_font"
                          ],
                          "properties": {
                            "footer_background": {
                              "type": "string",
                              "pattern": "^#[0-9A-Fa-f]{6}$"
                            },
                            "footer_text": {
                              "type": "string",
                              "pattern": "^#[0-9A-Fa-f]{6}$"
                            },
                            "sponsor_background": {
                              "type": "string",
                              "pattern": "^#[0-9A-Fa-f]{6}$"
                            },
                            "sponsor_text": {
                              "type": "string",
                              "pattern": "^#[0-9A-Fa-f]{6}$"
                            },
                            "heading_font": {
                              "type": "string",
                              "enum": [
                                "archivo",
                                "manrope",
                                "jetbrains_mono"
                              ]
                            },
                            "body_font": {
                              "type": "string",
                              "enum": [
                                "archivo",
                                "manrope",
                                "jetbrains_mono"
                              ]
                            },
                            "button_font": {
                              "type": "string",
                              "enum": [
                                "archivo",
                                "manrope",
                                "jetbrains_mono"
                              ]
                            }
                          }
                        },
                        "footer_html": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 20000
                        }
                      }
                    },
                    "logos": {
                      "type": "array",
                      "minItems": 9,
                      "maxItems": 9,
                      "items": {
                        "type": "object",
                        "required": [
                          "variant",
                          "media_id",
                          "locked",
                          "version",
                          "updated_at",
                          "updated_by"
                        ],
                        "properties": {
                          "variant": {
                            "type": "string",
                            "enum": [
                              "web_primary",
                              "communiques",
                              "mobile",
                              "secondary",
                              "match_sheet",
                              "favicon",
                              "social_home",
                              "social_news",
                              "player_card_mask"
                            ]
                          },
                          "media_id": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uuid"
                          },
                          "locked": {
                            "type": "boolean"
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "updated_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          },
                          "updated_by": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uuid"
                          }
                        }
                      }
                    },
                    "updated_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "updated_by": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/organizations/{organizationId}/site-config/logos/{variant}": {
      "put": {
        "tags": [
          "admin",
          "site-config"
        ],
        "summary": "Associa o ripristina una variante logo dalla libreria media",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "variant",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "web_primary",
                "communiques",
                "mobile",
                "secondary",
                "match_sheet",
                "favicon",
                "social_home",
                "social_news",
                "player_card_mask"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "media_id",
                  "expected_version"
                ],
                "properties": {
                  "media_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "expected_version": {
                    "type": "integer",
                    "minimum": 0
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Variante logo",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "variant",
                    "media_id",
                    "locked",
                    "version",
                    "updated_at",
                    "updated_by"
                  ],
                  "properties": {
                    "variant": {
                      "type": "string",
                      "enum": [
                        "web_primary",
                        "communiques",
                        "mobile",
                        "secondary",
                        "match_sheet",
                        "favicon",
                        "social_home",
                        "social_news",
                        "player_card_mask"
                      ]
                    },
                    "media_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "locked": {
                      "type": "boolean"
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updated_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "updated_by": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/tournaments/{tournamentId}/site-config/match-sheet-logo": {
      "get": {
        "tags": [
          "admin",
          "site-config"
        ],
        "summary": "Legge il logo governato per un documento ufficiale del torneo",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Anteprima temporanea del logo del documento",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "variant",
                    "state",
                    "download_url",
                    "expires_at"
                  ],
                  "properties": {
                    "variant": {
                      "type": "string",
                      "enum": [
                        "match_sheet"
                      ]
                    },
                    "state": {
                      "type": "string",
                      "enum": [
                        "ready",
                        "not_configured",
                        "unavailable"
                      ]
                    },
                    "download_url": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uri"
                    },
                    "expires_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/public/site-config": {
      "get": {
        "tags": [
          "public",
          "site-config"
        ],
        "summary": "Configurazione pubblica del sito per città (senza città: dati della Lega, Q225)",
        "security": [
          {
            "ApiKey": [
              "read:public.matches"
            ]
          }
        ],
        "x-tenant-scope": "public",
        "x-privacy-classification": "public",
        "x-rate-limit-tier": "public_widget",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Configurazione pubblica",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "organization_id",
                    "configured",
                    "version",
                    "settings",
                    "logos",
                    "updated_at"
                  ],
                  "properties": {
                    "organization_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "configured": {
                      "type": "boolean"
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "settings": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "company",
                        "social_style",
                        "social_urls",
                        "appearance",
                        "footer_html"
                      ],
                      "properties": {
                        "company": {
                          "type": "object",
                          "additionalProperties": false,
                          "required": [
                            "legal_name",
                            "vat_number",
                            "fiscal_code",
                            "description",
                            "city",
                            "address",
                            "postal_code",
                            "phone",
                            "fax",
                            "email",
                            "website_url",
                            "home_title",
                            "home_description",
                            "document_footer",
                            "data_controller_name",
                            "data_controller_email"
                          ],
                          "properties": {
                            "legal_name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "vat_number": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "fiscal_code": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "description": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "city": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "address": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "postal_code": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "phone": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "fax": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "email": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "home_title": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "home_description": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "document_footer": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "data_controller_name": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "data_controller_email": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "website_url": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "uri",
                              "pattern": "^https?://"
                            }
                          }
                        },
                        "social_style": {
                          "type": "string",
                          "enum": [
                            "square",
                            "circle",
                            "rounded"
                          ]
                        },
                        "social_urls": {
                          "type": "object",
                          "additionalProperties": false,
                          "required": [
                            "facebook",
                            "x",
                            "google_plus",
                            "instagram",
                            "youtube",
                            "vimeo",
                            "pinterest",
                            "linkedin",
                            "flickr",
                            "twitch",
                            "tiktok",
                            "discord",
                            "telegram",
                            "whatsapp"
                          ],
                          "properties": {
                            "facebook": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "uri",
                              "pattern": "^https://"
                            },
                            "x": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "uri",
                              "pattern": "^https://"
                            },
                            "google_plus": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "uri",
                              "pattern": "^https://"
                            },
                            "instagram": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "uri",
                              "pattern": "^https://"
                            },
                            "youtube": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "uri",
                              "pattern": "^https://"
                            },
                            "vimeo": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "uri",
                              "pattern": "^https://"
                            },
                            "pinterest": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "uri",
                              "pattern": "^https://"
                            },
                            "linkedin": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "uri",
                              "pattern": "^https://"
                            },
                            "flickr": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "uri",
                              "pattern": "^https://"
                            },
                            "twitch": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "uri",
                              "pattern": "^https://"
                            },
                            "tiktok": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "uri",
                              "pattern": "^https://"
                            },
                            "discord": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "uri",
                              "pattern": "^https://"
                            },
                            "telegram": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "uri",
                              "pattern": "^https://"
                            },
                            "whatsapp": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "uri",
                              "pattern": "^https://"
                            }
                          }
                        },
                        "appearance": {
                          "type": "object",
                          "additionalProperties": false,
                          "required": [
                            "footer_background",
                            "footer_text",
                            "sponsor_background",
                            "sponsor_text",
                            "heading_font",
                            "body_font",
                            "button_font"
                          ],
                          "properties": {
                            "footer_background": {
                              "type": "string",
                              "pattern": "^#[0-9A-Fa-f]{6}$"
                            },
                            "footer_text": {
                              "type": "string",
                              "pattern": "^#[0-9A-Fa-f]{6}$"
                            },
                            "sponsor_background": {
                              "type": "string",
                              "pattern": "^#[0-9A-Fa-f]{6}$"
                            },
                            "sponsor_text": {
                              "type": "string",
                              "pattern": "^#[0-9A-Fa-f]{6}$"
                            },
                            "heading_font": {
                              "type": "string",
                              "enum": [
                                "archivo",
                                "manrope",
                                "jetbrains_mono"
                              ]
                            },
                            "body_font": {
                              "type": "string",
                              "enum": [
                                "archivo",
                                "manrope",
                                "jetbrains_mono"
                              ]
                            },
                            "button_font": {
                              "type": "string",
                              "enum": [
                                "archivo",
                                "manrope",
                                "jetbrains_mono"
                              ]
                            }
                          }
                        },
                        "footer_html": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 20000
                        }
                      }
                    },
                    "logos": {
                      "type": "array",
                      "minItems": 9,
                      "maxItems": 9,
                      "items": {
                        "type": "object",
                        "required": [
                          "variant",
                          "media_id",
                          "locked",
                          "version",
                          "updated_at"
                        ],
                        "properties": {
                          "variant": {
                            "type": "string",
                            "enum": [
                              "web_primary",
                              "communiques",
                              "mobile",
                              "secondary",
                              "match_sheet",
                              "favicon",
                              "social_home",
                              "social_news",
                              "player_card_mask"
                            ]
                          },
                          "media_id": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uuid"
                          },
                          "locked": {
                            "type": "boolean"
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "updated_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          }
                        }
                      }
                    },
                    "updated_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/public/site-navigation": {
      "get": {
        "tags": [
          "public",
          "site-navigation"
        ],
        "summary": "Menu pubblico del sito e sezione «altre pagine» dell’app",
        "security": [
          {
            "ApiKey": [
              "read:public.media"
            ]
          }
        ],
        "x-tenant-scope": "public",
        "x-privacy-classification": "public",
        "x-rate-limit-tier": "public_widget",
        "x-audit-required": false,
        "responses": {
          "200": {
            "description": "Configurazione risolta",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "source": {
                      "type": "string",
                      "enum": [
                        "default",
                        "configured"
                      ]
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "settings": {
                      "type": "object",
                      "properties": {
                        "navbar_uppercase": {
                          "type": "boolean"
                        },
                        "navbar_bold": {
                          "type": "boolean"
                        },
                        "dropdown_type": {
                          "type": "string",
                          "enum": [
                            "panel",
                            "compact"
                          ]
                        },
                        "calendar_display_type": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "enum": [
                            "last_played",
                            "complete"
                          ]
                        }
                      },
                      "required": [
                        "navbar_uppercase",
                        "navbar_bold",
                        "dropdown_type",
                        "calendar_display_type"
                      ],
                      "additionalProperties": false
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "channel": {
                            "type": "string",
                            "enum": [
                              "web",
                              "app",
                              "both"
                            ]
                          },
                          "title": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 120
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "system",
                              "page",
                              "external"
                            ]
                          },
                          "destination": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 2048
                          },
                          "parent_id": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uuid"
                          },
                          "order": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 999
                          },
                          "in_footer": {
                            "type": "boolean"
                          },
                          "active": {
                            "type": "boolean"
                          },
                          "new_tab": {
                            "type": "boolean"
                          },
                          "locked": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "id",
                          "channel",
                          "title",
                          "type",
                          "destination",
                          "parent_id",
                          "order",
                          "in_footer",
                          "active",
                          "new_tab",
                          "locked"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 100
                    },
                    "fixed_system_links": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "title": {
                            "type": "string",
                            "minLength": 1
                          },
                          "destination": {
                            "type": "string",
                            "minLength": 1
                          },
                          "surface": {
                            "type": "string",
                            "enum": [
                              "brand",
                              "access",
                              "personal_area",
                              "legal"
                            ]
                          }
                        },
                        "required": [
                          "title",
                          "destination",
                          "surface"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "header_login_button": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "source",
                    "version",
                    "settings",
                    "items",
                    "fixed_system_links",
                    "header_login_button"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/site-navigation": {
      "get": {
        "tags": [
          "admin",
          "site-navigation"
        ],
        "summary": "Configurazione del menu, paginata a cursore",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "after",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Pagina della configurazione",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "source": {
                      "type": "string",
                      "enum": [
                        "default",
                        "configured"
                      ]
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "settings": {
                      "type": "object",
                      "properties": {
                        "navbar_uppercase": {
                          "type": "boolean"
                        },
                        "navbar_bold": {
                          "type": "boolean"
                        },
                        "dropdown_type": {
                          "type": "string",
                          "enum": [
                            "panel",
                            "compact"
                          ]
                        },
                        "calendar_display_type": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "enum": [
                            "last_played",
                            "complete"
                          ]
                        }
                      },
                      "required": [
                        "navbar_uppercase",
                        "navbar_bold",
                        "dropdown_type",
                        "calendar_display_type"
                      ],
                      "additionalProperties": false
                    },
                    "fixed_system_links": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "title": {
                            "type": "string",
                            "minLength": 1
                          },
                          "destination": {
                            "type": "string",
                            "minLength": 1
                          },
                          "surface": {
                            "type": "string",
                            "enum": [
                              "brand",
                              "access",
                              "personal_area",
                              "legal"
                            ]
                          }
                        },
                        "required": [
                          "title",
                          "destination",
                          "surface"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "channel": {
                            "type": "string",
                            "enum": [
                              "web",
                              "app",
                              "both"
                            ]
                          },
                          "title": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 120
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "system",
                              "page",
                              "external"
                            ]
                          },
                          "destination": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 2048
                          },
                          "parent_id": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uuid"
                          },
                          "order": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 999
                          },
                          "in_footer": {
                            "type": "boolean"
                          },
                          "active": {
                            "type": "boolean"
                          },
                          "new_tab": {
                            "type": "boolean"
                          },
                          "locked": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "id",
                          "channel",
                          "title",
                          "type",
                          "destination",
                          "parent_id",
                          "order",
                          "in_footer",
                          "active",
                          "new_tab",
                          "locked"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "source",
                    "version",
                    "settings",
                    "fixed_system_links",
                    "items",
                    "next_cursor"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "admin",
          "site-navigation"
        ],
        "summary": "Sostituisce menu e stile con controllo di versione",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "expected_version": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "settings": {
                    "type": "object",
                    "properties": {
                      "navbar_uppercase": {
                        "type": "boolean"
                      },
                      "navbar_bold": {
                        "type": "boolean"
                      },
                      "dropdown_type": {
                        "type": "string",
                        "enum": [
                          "panel",
                          "compact"
                        ]
                      },
                      "calendar_display_type": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "enum": [
                          "last_played",
                          "complete"
                        ]
                      }
                    },
                    "required": [
                      "navbar_uppercase",
                      "navbar_bold",
                      "dropdown_type",
                      "calendar_display_type"
                    ],
                    "additionalProperties": false
                  },
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "channel": {
                          "type": "string",
                          "enum": [
                            "web",
                            "app",
                            "both"
                          ]
                        },
                        "title": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 120
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "system",
                            "page",
                            "external"
                          ]
                        },
                        "destination": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 2048
                        },
                        "parent_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "uuid"
                        },
                        "order": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 999
                        },
                        "in_footer": {
                          "type": "boolean"
                        },
                        "active": {
                          "type": "boolean"
                        },
                        "new_tab": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "channel",
                        "title",
                        "type",
                        "destination",
                        "parent_id",
                        "order",
                        "in_footer",
                        "active",
                        "new_tab"
                      ],
                      "additionalProperties": false
                    },
                    "maxItems": 100
                  }
                },
                "required": [
                  "expected_version",
                  "settings",
                  "items"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Configurazione salvata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "source": {
                      "type": "string",
                      "enum": [
                        "default",
                        "configured"
                      ]
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "settings": {
                      "type": "object",
                      "properties": {
                        "navbar_uppercase": {
                          "type": "boolean"
                        },
                        "navbar_bold": {
                          "type": "boolean"
                        },
                        "dropdown_type": {
                          "type": "string",
                          "enum": [
                            "panel",
                            "compact"
                          ]
                        },
                        "calendar_display_type": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "enum": [
                            "last_played",
                            "complete"
                          ]
                        }
                      },
                      "required": [
                        "navbar_uppercase",
                        "navbar_bold",
                        "dropdown_type",
                        "calendar_display_type"
                      ],
                      "additionalProperties": false
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "channel": {
                            "type": "string",
                            "enum": [
                              "web",
                              "app",
                              "both"
                            ]
                          },
                          "title": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 120
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "system",
                              "page",
                              "external"
                            ]
                          },
                          "destination": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 2048
                          },
                          "parent_id": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uuid"
                          },
                          "order": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 999
                          },
                          "in_footer": {
                            "type": "boolean"
                          },
                          "active": {
                            "type": "boolean"
                          },
                          "new_tab": {
                            "type": "boolean"
                          },
                          "locked": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "id",
                          "channel",
                          "title",
                          "type",
                          "destination",
                          "parent_id",
                          "order",
                          "in_footer",
                          "active",
                          "new_tab",
                          "locked"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 100
                    },
                    "fixed_system_links": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "title": {
                            "type": "string",
                            "minLength": 1
                          },
                          "destination": {
                            "type": "string",
                            "minLength": 1
                          },
                          "surface": {
                            "type": "string",
                            "enum": [
                              "brand",
                              "access",
                              "personal_area",
                              "legal"
                            ]
                          }
                        },
                        "required": [
                          "title",
                          "destination",
                          "surface"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "source",
                    "version",
                    "settings",
                    "items",
                    "fixed_system_links"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/organizations/{organizationId}/home-layout/{surface}": {
      "get": {
        "tags": [
          "admin",
          "home-layout"
        ],
        "summary": "Legge il layout Home e i blocchi HTML paginati",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "surface",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "desktop",
                "mobile"
              ]
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Layout e blocchi HTML",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "layout",
                    "html_blocks",
                    "next_cursor"
                  ],
                  "properties": {
                    "layout": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "organization_id",
                        "surface",
                        "source",
                        "blocks",
                        "version",
                        "updated_at"
                      ],
                      "properties": {
                        "organization_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "surface": {
                          "type": "string",
                          "enum": [
                            "desktop",
                            "mobile"
                          ]
                        },
                        "source": {
                          "type": "string",
                          "enum": [
                            "default",
                            "saved"
                          ]
                        },
                        "blocks": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "additionalProperties": false,
                            "required": [
                              "key",
                              "kind",
                              "enabled",
                              "width",
                              "settings"
                            ],
                            "properties": {
                              "key": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 80
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "upcoming",
                                  "timeline",
                                  "media",
                                  "archive",
                                  "promos",
                                  "provenance",
                                  "fantasy",
                                  "feed",
                                  "discovery",
                                  "news",
                                  "featured_competitions",
                                  "sponsors",
                                  "results",
                                  "standings",
                                  "videos",
                                  "photos",
                                  "html",
                                  "ticker",
                                  "spotlight"
                                ]
                              },
                              "enabled": {
                                "type": "boolean"
                              },
                              "width": {
                                "type": "string",
                                "enum": [
                                  "one_third",
                                  "two_thirds",
                                  "full"
                                ]
                              },
                              "settings": {
                                "type": "object",
                                "additionalProperties": false,
                                "required": [
                                  "limit",
                                  "tournament_id",
                                  "group_id",
                                  "from",
                                  "to",
                                  "html_block_id"
                                ],
                                "properties": {
                                  "limit": {
                                    "oneOf": [
                                      {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 20
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "tournament_id": {
                                    "oneOf": [
                                      {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "group_id": {
                                    "oneOf": [
                                      {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "from": {
                                    "oneOf": [
                                      {
                                        "type": "string",
                                        "format": "date"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "to": {
                                    "oneOf": [
                                      {
                                        "type": "string",
                                        "format": "date"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "html_block_id": {
                                    "oneOf": [
                                      {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                }
                              }
                            }
                          },
                          "maxItems": 40
                        },
                        "version": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updated_at": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "date-time"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      }
                    },
                    "html_blocks": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                          "id",
                          "organization_id",
                          "surface",
                          "title",
                          "content_html",
                          "width",
                          "enabled",
                          "version",
                          "created_at",
                          "updated_at"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "organization_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "surface": {
                            "type": "string",
                            "enum": [
                              "desktop",
                              "mobile"
                            ]
                          },
                          "title": {
                            "type": "string"
                          },
                          "content_html": {
                            "type": "string"
                          },
                          "width": {
                            "type": "string",
                            "enum": [
                              "one_third",
                              "two_thirds",
                              "full"
                            ]
                          },
                          "enabled": {
                            "type": "boolean"
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 1
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updated_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    },
                    "next_cursor": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "admin",
          "home-layout"
        ],
        "summary": "Pubblica ordine, larghezze e impostazioni della Home",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "surface",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "desktop",
                "mobile"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "expected_version",
                  "blocks"
                ],
                "properties": {
                  "expected_version": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "blocks": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "key",
                        "kind",
                        "enabled",
                        "width",
                        "settings"
                      ],
                      "properties": {
                        "key": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80
                        },
                        "kind": {
                          "type": "string",
                          "enum": [
                            "upcoming",
                            "timeline",
                            "media",
                            "archive",
                            "promos",
                            "provenance",
                            "fantasy",
                            "feed",
                            "discovery",
                            "news",
                            "featured_competitions",
                            "sponsors",
                            "results",
                            "standings",
                            "videos",
                            "photos",
                            "html",
                            "ticker",
                            "spotlight"
                          ]
                        },
                        "enabled": {
                          "type": "boolean"
                        },
                        "width": {
                          "type": "string",
                          "enum": [
                            "one_third",
                            "two_thirds",
                            "full"
                          ]
                        },
                        "settings": {
                          "type": "object",
                          "additionalProperties": false,
                          "required": [
                            "limit",
                            "tournament_id",
                            "group_id",
                            "from",
                            "to",
                            "html_block_id"
                          ],
                          "properties": {
                            "limit": {
                              "oneOf": [
                                {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 20
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "tournament_id": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "group_id": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "from": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "format": "date"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "to": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "format": "date"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "html_block_id": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          }
                        }
                      }
                    },
                    "maxItems": 40
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Layout pubblicato",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "organization_id",
                    "surface",
                    "source",
                    "blocks",
                    "version",
                    "updated_at"
                  ],
                  "properties": {
                    "organization_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "surface": {
                      "type": "string",
                      "enum": [
                        "desktop",
                        "mobile"
                      ]
                    },
                    "source": {
                      "type": "string",
                      "enum": [
                        "default",
                        "saved"
                      ]
                    },
                    "blocks": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                          "key",
                          "kind",
                          "enabled",
                          "width",
                          "settings"
                        ],
                        "properties": {
                          "key": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 80
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "upcoming",
                              "timeline",
                              "media",
                              "archive",
                              "promos",
                              "provenance",
                              "fantasy",
                              "feed",
                              "discovery",
                              "news",
                              "featured_competitions",
                              "sponsors",
                              "results",
                              "standings",
                              "videos",
                              "photos",
                              "html",
                              "ticker",
                              "spotlight"
                            ]
                          },
                          "enabled": {
                            "type": "boolean"
                          },
                          "width": {
                            "type": "string",
                            "enum": [
                              "one_third",
                              "two_thirds",
                              "full"
                            ]
                          },
                          "settings": {
                            "type": "object",
                            "additionalProperties": false,
                            "required": [
                              "limit",
                              "tournament_id",
                              "group_id",
                              "from",
                              "to",
                              "html_block_id"
                            ],
                            "properties": {
                              "limit": {
                                "oneOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 20
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "tournament_id": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "group_id": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "from": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "format": "date"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "to": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "format": "date"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "html_block_id": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            }
                          }
                        }
                      },
                      "maxItems": 40
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updated_at": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/public/organizations/{organizationId}/home-layout/{surface}": {
      "get": {
        "tags": [
          "public",
          "home-layout"
        ],
        "summary": "Layout pubblico della Home con HTML già sanificato",
        "security": [
          {
            "PublicApiKey": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "public",
        "x-admin-cockpit-required": false,
        "x-rate-limit-tier": "public",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "surface",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "desktop",
                "mobile"
              ]
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Layout pubblico",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "layout",
                    "html_blocks",
                    "next_cursor"
                  ],
                  "properties": {
                    "layout": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "organization_id",
                        "surface",
                        "source",
                        "blocks",
                        "version",
                        "updated_at"
                      ],
                      "properties": {
                        "organization_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "surface": {
                          "type": "string",
                          "enum": [
                            "desktop",
                            "mobile"
                          ]
                        },
                        "source": {
                          "type": "string",
                          "enum": [
                            "default",
                            "saved"
                          ]
                        },
                        "blocks": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "additionalProperties": false,
                            "required": [
                              "key",
                              "kind",
                              "enabled",
                              "width",
                              "settings"
                            ],
                            "properties": {
                              "key": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 80
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "upcoming",
                                  "timeline",
                                  "media",
                                  "archive",
                                  "promos",
                                  "provenance",
                                  "fantasy",
                                  "feed",
                                  "discovery",
                                  "news",
                                  "featured_competitions",
                                  "sponsors",
                                  "results",
                                  "standings",
                                  "videos",
                                  "photos",
                                  "html",
                                  "ticker",
                                  "spotlight"
                                ]
                              },
                              "enabled": {
                                "type": "boolean"
                              },
                              "width": {
                                "type": "string",
                                "enum": [
                                  "one_third",
                                  "two_thirds",
                                  "full"
                                ]
                              },
                              "settings": {
                                "type": "object",
                                "additionalProperties": false,
                                "required": [
                                  "limit",
                                  "tournament_id",
                                  "group_id",
                                  "from",
                                  "to",
                                  "html_block_id"
                                ],
                                "properties": {
                                  "limit": {
                                    "oneOf": [
                                      {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 20
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "tournament_id": {
                                    "oneOf": [
                                      {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "group_id": {
                                    "oneOf": [
                                      {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "from": {
                                    "oneOf": [
                                      {
                                        "type": "string",
                                        "format": "date"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "to": {
                                    "oneOf": [
                                      {
                                        "type": "string",
                                        "format": "date"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "html_block_id": {
                                    "oneOf": [
                                      {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                }
                              }
                            }
                          },
                          "maxItems": 40
                        },
                        "version": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updated_at": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "date-time"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      }
                    },
                    "html_blocks": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                          "id",
                          "organization_id",
                          "surface",
                          "title",
                          "content_html",
                          "width",
                          "enabled",
                          "version",
                          "created_at",
                          "updated_at"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "organization_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "surface": {
                            "type": "string",
                            "enum": [
                              "desktop",
                              "mobile"
                            ]
                          },
                          "title": {
                            "type": "string"
                          },
                          "content_html": {
                            "type": "string"
                          },
                          "width": {
                            "type": "string",
                            "enum": [
                              "one_third",
                              "two_thirds",
                              "full"
                            ]
                          },
                          "enabled": {
                            "type": "boolean"
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 1
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updated_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    },
                    "next_cursor": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/organizations/{organizationId}/home-layout/{surface}/html-blocks": {
      "post": {
        "tags": [
          "admin",
          "home-layout"
        ],
        "summary": "Crea un blocco HTML spento e sanificato",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "surface",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "desktop",
                "mobile"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "request_id",
                  "title",
                  "content_html",
                  "width"
                ],
                "properties": {
                  "request_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "content_html": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 20000
                  },
                  "width": {
                    "type": "string",
                    "enum": [
                      "one_third",
                      "two_thirds",
                      "full"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Richiesta già applicata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "id",
                    "organization_id",
                    "surface",
                    "title",
                    "content_html",
                    "width",
                    "enabled",
                    "version",
                    "created_at",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "organization_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "surface": {
                      "type": "string",
                      "enum": [
                        "desktop",
                        "mobile"
                      ]
                    },
                    "title": {
                      "type": "string"
                    },
                    "content_html": {
                      "type": "string"
                    },
                    "width": {
                      "type": "string",
                      "enum": [
                        "one_third",
                        "two_thirds",
                        "full"
                      ]
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "Blocco creato",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "id",
                    "organization_id",
                    "surface",
                    "title",
                    "content_html",
                    "width",
                    "enabled",
                    "version",
                    "created_at",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "organization_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "surface": {
                      "type": "string",
                      "enum": [
                        "desktop",
                        "mobile"
                      ]
                    },
                    "title": {
                      "type": "string"
                    },
                    "content_html": {
                      "type": "string"
                    },
                    "width": {
                      "type": "string",
                      "enum": [
                        "one_third",
                        "two_thirds",
                        "full"
                      ]
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/organizations/{organizationId}/home-layout/{surface}/html-blocks/{htmlBlockId}": {
      "put": {
        "tags": [
          "admin",
          "home-layout"
        ],
        "summary": "Modifica o accende un blocco HTML",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "surface",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "desktop",
                "mobile"
              ]
            }
          },
          {
            "name": "htmlBlockId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "expected_version",
                  "title",
                  "content_html",
                  "width",
                  "enabled"
                ],
                "properties": {
                  "expected_version": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "content_html": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 20000
                  },
                  "width": {
                    "type": "string",
                    "enum": [
                      "one_third",
                      "two_thirds",
                      "full"
                    ]
                  },
                  "enabled": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Blocco modificato",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "id",
                    "organization_id",
                    "surface",
                    "title",
                    "content_html",
                    "width",
                    "enabled",
                    "version",
                    "created_at",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "organization_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "surface": {
                      "type": "string",
                      "enum": [
                        "desktop",
                        "mobile"
                      ]
                    },
                    "title": {
                      "type": "string"
                    },
                    "content_html": {
                      "type": "string"
                    },
                    "width": {
                      "type": "string",
                      "enum": [
                        "one_third",
                        "two_thirds",
                        "full"
                      ]
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "admin",
          "home-layout"
        ],
        "summary": "Elimina un blocco HTML personalizzato",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "surface",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "desktop",
                "mobile"
              ]
            }
          },
          {
            "name": "htmlBlockId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "expected_version",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Blocco eliminato",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "deleted"
                  ],
                  "properties": {
                    "deleted": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/tournaments/{tournamentId}/home-layout": {
      "get": {
        "tags": [
          "admin",
          "home-layout"
        ],
        "summary": "Legge la Home del torneo",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Home torneo",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "tournament_id",
                    "source",
                    "view_mode",
                    "blocks",
                    "version",
                    "updated_at"
                  ],
                  "properties": {
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "source": {
                      "type": "string",
                      "enum": [
                        "default",
                        "saved"
                      ]
                    },
                    "view_mode": {
                      "type": "string",
                      "enum": [
                        "summary",
                        "full"
                      ]
                    },
                    "blocks": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                          "key",
                          "kind",
                          "enabled"
                        ],
                        "properties": {
                          "key": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 80
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "next_round",
                              "standings",
                              "news",
                              "discipline",
                              "communiques",
                              "media"
                            ]
                          },
                          "enabled": {
                            "type": "boolean"
                          }
                        }
                      },
                      "maxItems": 12
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updated_at": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "admin",
          "home-layout"
        ],
        "summary": "Pubblica ordine e modalità della Home del torneo",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "expected_version",
                  "view_mode",
                  "blocks"
                ],
                "properties": {
                  "expected_version": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "view_mode": {
                    "type": "string",
                    "enum": [
                      "summary",
                      "full"
                    ]
                  },
                  "blocks": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "key",
                        "kind",
                        "enabled"
                      ],
                      "properties": {
                        "key": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80
                        },
                        "kind": {
                          "type": "string",
                          "enum": [
                            "next_round",
                            "standings",
                            "news",
                            "discipline",
                            "communiques",
                            "media"
                          ]
                        },
                        "enabled": {
                          "type": "boolean"
                        }
                      }
                    },
                    "maxItems": 12
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Home torneo pubblicata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "tournament_id",
                    "source",
                    "view_mode",
                    "blocks",
                    "version",
                    "updated_at"
                  ],
                  "properties": {
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "source": {
                      "type": "string",
                      "enum": [
                        "default",
                        "saved"
                      ]
                    },
                    "view_mode": {
                      "type": "string",
                      "enum": [
                        "summary",
                        "full"
                      ]
                    },
                    "blocks": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                          "key",
                          "kind",
                          "enabled"
                        ],
                        "properties": {
                          "key": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 80
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "next_round",
                              "standings",
                              "news",
                              "discipline",
                              "communiques",
                              "media"
                            ]
                          },
                          "enabled": {
                            "type": "boolean"
                          }
                        }
                      },
                      "maxItems": 12
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updated_at": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/public/tournaments/{tournamentId}/home-layout": {
      "get": {
        "tags": [
          "public",
          "home-layout"
        ],
        "summary": "Home pubblica del torneo",
        "security": [
          {
            "PublicApiKey": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "public",
        "x-admin-cockpit-required": false,
        "x-rate-limit-tier": "public",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Home torneo",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "tournament_id",
                    "source",
                    "view_mode",
                    "blocks",
                    "version",
                    "updated_at"
                  ],
                  "properties": {
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "source": {
                      "type": "string",
                      "enum": [
                        "default",
                        "saved"
                      ]
                    },
                    "view_mode": {
                      "type": "string",
                      "enum": [
                        "summary",
                        "full"
                      ]
                    },
                    "blocks": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                          "key",
                          "kind",
                          "enabled"
                        ],
                        "properties": {
                          "key": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 80
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "next_round",
                              "standings",
                              "news",
                              "discipline",
                              "communiques",
                              "media"
                            ]
                          },
                          "enabled": {
                            "type": "boolean"
                          }
                        }
                      },
                      "maxItems": 12
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updated_at": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/galleries": {
      "get": {
        "tags": [
          "admin",
          "galleries"
        ],
        "summary": "Elenco album fotografici paginato a cursore",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "season_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "tournament_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "match_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 400
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "visible",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false",
                "1",
                "0"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Pagina album",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "next_cursor"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "slug",
                          "title",
                          "season_id",
                          "season_label",
                          "tournament_id",
                          "tournament_label",
                          "match_id",
                          "match_label",
                          "publication_date",
                          "featured",
                          "visible",
                          "cover_media_asset_id",
                          "cover_asset_url",
                          "cover_thumbnail_url",
                          "item_count",
                          "version",
                          "created_at",
                          "updated_at"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "slug": {
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          },
                          "season_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "season_label": {
                            "type": "string"
                          },
                          "tournament_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "tournament_label": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "match_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "match_label": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "publication_date": {
                            "type": "string",
                            "format": "date"
                          },
                          "featured": {
                            "type": "boolean"
                          },
                          "visible": {
                            "type": "boolean"
                          },
                          "cover_media_asset_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "cover_asset_url": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "cover_thumbnail_url": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "item_count": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 1
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updated_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    },
                    "next_cursor": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "admin",
          "galleries"
        ],
        "summary": "Crea un album senza caricare nuovi file",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "request_id",
                  "title",
                  "season_id",
                  "publication_date"
                ],
                "properties": {
                  "request_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 160
                  },
                  "season_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "tournament_id": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "match_id": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "publication_date": {
                    "type": "string",
                    "format": "date"
                  },
                  "featured": {
                    "type": "boolean"
                  },
                  "visible": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Album",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "slug",
                    "title",
                    "season_id",
                    "season_label",
                    "tournament_id",
                    "tournament_label",
                    "match_id",
                    "match_label",
                    "publication_date",
                    "featured",
                    "visible",
                    "cover_media_asset_id",
                    "cover_asset_url",
                    "cover_thumbnail_url",
                    "item_count",
                    "version",
                    "created_at",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "slug": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "season_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "season_label": {
                      "type": "string"
                    },
                    "tournament_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "tournament_label": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "match_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "match_label": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "publication_date": {
                      "type": "string",
                      "format": "date"
                    },
                    "featured": {
                      "type": "boolean"
                    },
                    "visible": {
                      "type": "boolean"
                    },
                    "cover_media_asset_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "cover_asset_url": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "cover_thumbnail_url": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "item_count": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "gallery_id",
                          "media_asset_id",
                          "position",
                          "added_at",
                          "media_title",
                          "asset_url",
                          "thumbnail_url"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "gallery_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "media_asset_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "position": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9999
                          },
                          "added_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "media_title": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "asset_url": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "thumbnail_url": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "Album creato",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "slug",
                    "title",
                    "season_id",
                    "season_label",
                    "tournament_id",
                    "tournament_label",
                    "match_id",
                    "match_label",
                    "publication_date",
                    "featured",
                    "visible",
                    "cover_media_asset_id",
                    "cover_asset_url",
                    "cover_thumbnail_url",
                    "item_count",
                    "version",
                    "created_at",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "slug": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "season_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "season_label": {
                      "type": "string"
                    },
                    "tournament_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "tournament_label": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "match_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "match_label": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "publication_date": {
                      "type": "string",
                      "format": "date"
                    },
                    "featured": {
                      "type": "boolean"
                    },
                    "visible": {
                      "type": "boolean"
                    },
                    "cover_media_asset_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "cover_asset_url": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "cover_thumbnail_url": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "item_count": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "gallery_id",
                          "media_asset_id",
                          "position",
                          "added_at",
                          "media_title",
                          "asset_url",
                          "thumbnail_url"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "gallery_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "media_asset_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "position": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9999
                          },
                          "added_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "media_title": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "asset_url": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "thumbnail_url": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/galleries/{galleryId}": {
      "get": {
        "tags": [
          "admin",
          "galleries"
        ],
        "summary": "Dettaglio album",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "galleryId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Album",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "slug",
                    "title",
                    "season_id",
                    "season_label",
                    "tournament_id",
                    "tournament_label",
                    "match_id",
                    "match_label",
                    "publication_date",
                    "featured",
                    "visible",
                    "cover_media_asset_id",
                    "cover_asset_url",
                    "cover_thumbnail_url",
                    "item_count",
                    "version",
                    "created_at",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "slug": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "season_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "season_label": {
                      "type": "string"
                    },
                    "tournament_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "tournament_label": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "match_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "match_label": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "publication_date": {
                      "type": "string",
                      "format": "date"
                    },
                    "featured": {
                      "type": "boolean"
                    },
                    "visible": {
                      "type": "boolean"
                    },
                    "cover_media_asset_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "cover_asset_url": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "cover_thumbnail_url": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "item_count": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "gallery_id",
                          "media_asset_id",
                          "position",
                          "added_at",
                          "media_title",
                          "asset_url",
                          "thumbnail_url"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "gallery_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "media_asset_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "position": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9999
                          },
                          "added_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "media_title": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "asset_url": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "thumbnail_url": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "admin",
          "galleries"
        ],
        "summary": "Aggiorna metadati, evidenza o visibilità con versione attesa",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "galleryId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "expected_version"
                ],
                "properties": {
                  "expected_version": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 160
                  },
                  "season_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "tournament_id": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "match_id": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "publication_date": {
                    "type": "string",
                    "format": "date"
                  },
                  "featured": {
                    "type": "boolean"
                  },
                  "visible": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Album aggiornato",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "slug",
                    "title",
                    "season_id",
                    "season_label",
                    "tournament_id",
                    "tournament_label",
                    "match_id",
                    "match_label",
                    "publication_date",
                    "featured",
                    "visible",
                    "cover_media_asset_id",
                    "cover_asset_url",
                    "cover_thumbnail_url",
                    "item_count",
                    "version",
                    "created_at",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "slug": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "season_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "season_label": {
                      "type": "string"
                    },
                    "tournament_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "tournament_label": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "match_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "match_label": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "publication_date": {
                      "type": "string",
                      "format": "date"
                    },
                    "featured": {
                      "type": "boolean"
                    },
                    "visible": {
                      "type": "boolean"
                    },
                    "cover_media_asset_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "cover_asset_url": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "cover_thumbnail_url": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "item_count": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "gallery_id",
                          "media_asset_id",
                          "position",
                          "added_at",
                          "media_title",
                          "asset_url",
                          "thumbnail_url"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "gallery_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "media_asset_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "position": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9999
                          },
                          "added_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "media_title": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "asset_url": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "thumbnail_url": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "admin",
          "galleries"
        ],
        "summary": "Archivia un album",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "galleryId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "expected_version",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "request_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Album archiviato",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "slug",
                    "title",
                    "season_id",
                    "season_label",
                    "tournament_id",
                    "tournament_label",
                    "match_id",
                    "match_label",
                    "publication_date",
                    "featured",
                    "visible",
                    "cover_media_asset_id",
                    "cover_asset_url",
                    "cover_thumbnail_url",
                    "item_count",
                    "version",
                    "created_at",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "slug": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "season_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "season_label": {
                      "type": "string"
                    },
                    "tournament_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "tournament_label": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "match_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "match_label": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "publication_date": {
                      "type": "string",
                      "format": "date"
                    },
                    "featured": {
                      "type": "boolean"
                    },
                    "visible": {
                      "type": "boolean"
                    },
                    "cover_media_asset_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "cover_asset_url": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "cover_thumbnail_url": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "item_count": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "gallery_id",
                          "media_asset_id",
                          "position",
                          "added_at",
                          "media_title",
                          "asset_url",
                          "thumbnail_url"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "gallery_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "media_asset_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "position": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9999
                          },
                          "added_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "media_title": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "asset_url": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "thumbnail_url": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/galleries/{galleryId}/items": {
      "get": {
        "tags": [
          "admin",
          "galleries"
        ],
        "summary": "Elenca immagini approvate selezionabili dalla libreria",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "galleryId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Immagini selezionabili",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "next_cursor"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "title"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "title": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "next_cursor": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "admin",
          "galleries"
        ],
        "summary": "Collega un media già approvato dalla libreria",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "galleryId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "request_id",
                  "media_asset_id",
                  "position",
                  "expected_version"
                ],
                "properties": {
                  "request_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "media_asset_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "position": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9999
                  },
                  "expected_version": {
                    "type": "integer",
                    "minimum": 1
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Album",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "slug",
                    "title",
                    "season_id",
                    "season_label",
                    "tournament_id",
                    "tournament_label",
                    "match_id",
                    "match_label",
                    "publication_date",
                    "featured",
                    "visible",
                    "cover_media_asset_id",
                    "cover_asset_url",
                    "cover_thumbnail_url",
                    "item_count",
                    "version",
                    "created_at",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "slug": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "season_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "season_label": {
                      "type": "string"
                    },
                    "tournament_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "tournament_label": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "match_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "match_label": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "publication_date": {
                      "type": "string",
                      "format": "date"
                    },
                    "featured": {
                      "type": "boolean"
                    },
                    "visible": {
                      "type": "boolean"
                    },
                    "cover_media_asset_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "cover_asset_url": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "cover_thumbnail_url": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "item_count": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "gallery_id",
                          "media_asset_id",
                          "position",
                          "added_at",
                          "media_title",
                          "asset_url",
                          "thumbnail_url"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "gallery_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "media_asset_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "position": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9999
                          },
                          "added_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "media_title": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "asset_url": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "thumbnail_url": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "Foto collegata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "slug",
                    "title",
                    "season_id",
                    "season_label",
                    "tournament_id",
                    "tournament_label",
                    "match_id",
                    "match_label",
                    "publication_date",
                    "featured",
                    "visible",
                    "cover_media_asset_id",
                    "cover_asset_url",
                    "cover_thumbnail_url",
                    "item_count",
                    "version",
                    "created_at",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "slug": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "season_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "season_label": {
                      "type": "string"
                    },
                    "tournament_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "tournament_label": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "match_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "match_label": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "publication_date": {
                      "type": "string",
                      "format": "date"
                    },
                    "featured": {
                      "type": "boolean"
                    },
                    "visible": {
                      "type": "boolean"
                    },
                    "cover_media_asset_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "cover_asset_url": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "cover_thumbnail_url": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "item_count": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "gallery_id",
                          "media_asset_id",
                          "position",
                          "added_at",
                          "media_title",
                          "asset_url",
                          "thumbnail_url"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "gallery_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "media_asset_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "position": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9999
                          },
                          "added_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "media_title": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "asset_url": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "thumbnail_url": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/galleries/{galleryId}/items/{itemId}": {
      "delete": {
        "tags": [
          "admin",
          "galleries"
        ],
        "summary": "Rimuove una foto dall’album, non dalla libreria media",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "galleryId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "itemId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "expected_version",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "request_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Foto scollegata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "slug",
                    "title",
                    "season_id",
                    "season_label",
                    "tournament_id",
                    "tournament_label",
                    "match_id",
                    "match_label",
                    "publication_date",
                    "featured",
                    "visible",
                    "cover_media_asset_id",
                    "cover_asset_url",
                    "cover_thumbnail_url",
                    "item_count",
                    "version",
                    "created_at",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "slug": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "season_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "season_label": {
                      "type": "string"
                    },
                    "tournament_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "tournament_label": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "match_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "match_label": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "publication_date": {
                      "type": "string",
                      "format": "date"
                    },
                    "featured": {
                      "type": "boolean"
                    },
                    "visible": {
                      "type": "boolean"
                    },
                    "cover_media_asset_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "cover_asset_url": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "cover_thumbnail_url": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "item_count": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "gallery_id",
                          "media_asset_id",
                          "position",
                          "added_at",
                          "media_title",
                          "asset_url",
                          "thumbnail_url"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "gallery_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "media_asset_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "position": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9999
                          },
                          "added_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "media_title": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "asset_url": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "thumbnail_url": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/public/galleries": {
      "get": {
        "tags": [
          "public",
          "galleries"
        ],
        "summary": "Album pubblici con filtri stagione, torneo o partita",
        "security": [
          {
            "ApiKey": [
              "read:public.media"
            ]
          }
        ],
        "x-tenant-scope": "public_scope",
        "x-privacy-classification": "public",
        "x-rate-limit-tier": "public",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "season_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "tournament_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "match_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 400
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "city_slug",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 120
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Pagina album pubblici",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "next_cursor"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "slug",
                          "title",
                          "season_id",
                          "season_label",
                          "tournament_id",
                          "tournament_label",
                          "match_id",
                          "match_label",
                          "publication_date",
                          "featured",
                          "visible",
                          "cover_media_asset_id",
                          "cover_asset_url",
                          "cover_thumbnail_url",
                          "item_count",
                          "version",
                          "created_at",
                          "updated_at"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "slug": {
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          },
                          "season_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "season_label": {
                            "type": "string"
                          },
                          "tournament_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "tournament_label": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "match_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "match_label": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "publication_date": {
                            "type": "string",
                            "format": "date"
                          },
                          "featured": {
                            "type": "boolean"
                          },
                          "visible": {
                            "type": "boolean"
                          },
                          "cover_media_asset_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "cover_asset_url": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "cover_thumbnail_url": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "item_count": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 1
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updated_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    },
                    "next_cursor": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/public/galleries/{slug}": {
      "get": {
        "tags": [
          "public",
          "galleries"
        ],
        "summary": "Album pubblico; gli ID media passano dal gateway media esistente",
        "security": [
          {
            "ApiKey": [
              "read:public.media"
            ]
          }
        ],
        "x-tenant-scope": "public_scope",
        "x-privacy-classification": "public",
        "x-rate-limit-tier": "public",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "city_slug",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 120
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Album pubblico",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "slug",
                    "title",
                    "season_id",
                    "season_label",
                    "tournament_id",
                    "tournament_label",
                    "match_id",
                    "match_label",
                    "publication_date",
                    "featured",
                    "visible",
                    "cover_media_asset_id",
                    "cover_asset_url",
                    "cover_thumbnail_url",
                    "item_count",
                    "version",
                    "created_at",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "slug": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "season_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "season_label": {
                      "type": "string"
                    },
                    "tournament_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "tournament_label": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "match_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "match_label": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "publication_date": {
                      "type": "string",
                      "format": "date"
                    },
                    "featured": {
                      "type": "boolean"
                    },
                    "visible": {
                      "type": "boolean"
                    },
                    "cover_media_asset_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "cover_asset_url": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "cover_thumbnail_url": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "item_count": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "gallery_id",
                          "media_asset_id",
                          "position",
                          "added_at",
                          "media_title",
                          "asset_url",
                          "thumbnail_url"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "gallery_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "media_asset_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "position": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9999
                          },
                          "added_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "media_title": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "asset_url": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "thumbnail_url": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/videos": {
      "get": {
        "tags": [
          "admin",
          "videos"
        ],
        "summary": "Videogallery amministrativa, paginata a cursore",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "public_content",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "season_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "tournament_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "highlighted",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false",
                "1",
                "0"
              ]
            }
          },
          {
            "name": "main",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false",
                "1",
                "0"
              ]
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 300
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Pagina della videogallery",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "next_cursor"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "organization_id",
                          "season_id",
                          "tournament_id",
                          "title",
                          "description",
                          "provider",
                          "external_url",
                          "embed_url",
                          "publication_date",
                          "highlighted",
                          "main",
                          "version",
                          "created_at",
                          "updated_at"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "organization_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "season_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "tournament_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "title": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 160
                          },
                          "description": {
                            "oneOf": [
                              {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 2000
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "provider": {
                            "type": "string",
                            "enum": [
                              "youtube",
                              "vimeo",
                              "facebook",
                              "instagram",
                              "tiktok"
                            ]
                          },
                          "external_url": {
                            "type": "string",
                            "format": "uri"
                          },
                          "embed_url": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uri"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "publication_date": {
                            "type": "string",
                            "format": "date"
                          },
                          "highlighted": {
                            "type": "boolean"
                          },
                          "main": {
                            "type": "boolean"
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 1
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updated_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    },
                    "next_cursor": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "admin",
          "videos"
        ],
        "summary": "Aggiunge un collegamento video esterno",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "public_content",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "season_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "tournament_id": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 160
                  },
                  "description": {
                    "oneOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 2000
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "external_url": {
                    "type": "string",
                    "format": "uri",
                    "maxLength": 2000
                  },
                  "publication_date": {
                    "type": "string",
                    "format": "date"
                  },
                  "highlighted": {
                    "type": "boolean",
                    "default": false
                  },
                  "main": {
                    "type": "boolean",
                    "default": false
                  },
                  "request_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "season_id",
                  "tournament_id",
                  "title",
                  "external_url",
                  "publication_date",
                  "request_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Richiesta già applicata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "organization_id",
                    "season_id",
                    "tournament_id",
                    "title",
                    "description",
                    "provider",
                    "external_url",
                    "embed_url",
                    "publication_date",
                    "highlighted",
                    "main",
                    "version",
                    "created_at",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "organization_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "season_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "tournament_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "title": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 160
                    },
                    "description": {
                      "oneOf": [
                        {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 2000
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "provider": {
                      "type": "string",
                      "enum": [
                        "youtube",
                        "vimeo",
                        "facebook",
                        "instagram",
                        "tiktok"
                      ]
                    },
                    "external_url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "embed_url": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uri"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "publication_date": {
                      "type": "string",
                      "format": "date"
                    },
                    "highlighted": {
                      "type": "boolean"
                    },
                    "main": {
                      "type": "boolean"
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "Creato",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "organization_id",
                    "season_id",
                    "tournament_id",
                    "title",
                    "description",
                    "provider",
                    "external_url",
                    "embed_url",
                    "publication_date",
                    "highlighted",
                    "main",
                    "version",
                    "created_at",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "organization_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "season_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "tournament_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "title": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 160
                    },
                    "description": {
                      "oneOf": [
                        {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 2000
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "provider": {
                      "type": "string",
                      "enum": [
                        "youtube",
                        "vimeo",
                        "facebook",
                        "instagram",
                        "tiktok"
                      ]
                    },
                    "external_url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "embed_url": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uri"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "publication_date": {
                      "type": "string",
                      "format": "date"
                    },
                    "highlighted": {
                      "type": "boolean"
                    },
                    "main": {
                      "type": "boolean"
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/videos/{videoId}": {
      "patch": {
        "tags": [
          "admin",
          "videos"
        ],
        "summary": "Aggiorna un collegamento video con versione attesa",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "public_content",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "videoId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "season_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "tournament_id": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 160
                  },
                  "description": {
                    "oneOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 2000
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "external_url": {
                    "type": "string",
                    "format": "uri",
                    "maxLength": 2000
                  },
                  "publication_date": {
                    "type": "string",
                    "format": "date"
                  },
                  "highlighted": {
                    "type": "boolean",
                    "default": false
                  },
                  "main": {
                    "type": "boolean",
                    "default": false
                  },
                  "expected_version": {
                    "type": "integer",
                    "exclusiveMinimum": 0
                  }
                },
                "required": [
                  "season_id",
                  "tournament_id",
                  "title",
                  "external_url",
                  "publication_date",
                  "expected_version"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Aggiornato",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "organization_id",
                    "season_id",
                    "tournament_id",
                    "title",
                    "description",
                    "provider",
                    "external_url",
                    "embed_url",
                    "publication_date",
                    "highlighted",
                    "main",
                    "version",
                    "created_at",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "organization_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "season_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "tournament_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "title": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 160
                    },
                    "description": {
                      "oneOf": [
                        {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 2000
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "provider": {
                      "type": "string",
                      "enum": [
                        "youtube",
                        "vimeo",
                        "facebook",
                        "instagram",
                        "tiktok"
                      ]
                    },
                    "external_url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "embed_url": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uri"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "publication_date": {
                      "type": "string",
                      "format": "date"
                    },
                    "highlighted": {
                      "type": "boolean"
                    },
                    "main": {
                      "type": "boolean"
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "admin",
          "videos"
        ],
        "summary": "Rimuove un collegamento video",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "public_content",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "videoId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "expected_version",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Rimosso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "organization_id",
                    "season_id",
                    "tournament_id",
                    "title",
                    "description",
                    "provider",
                    "external_url",
                    "embed_url",
                    "publication_date",
                    "highlighted",
                    "main",
                    "version",
                    "created_at",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "organization_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "season_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "tournament_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "title": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 160
                    },
                    "description": {
                      "oneOf": [
                        {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 2000
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "provider": {
                      "type": "string",
                      "enum": [
                        "youtube",
                        "vimeo",
                        "facebook",
                        "instagram",
                        "tiktok"
                      ]
                    },
                    "external_url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "embed_url": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uri"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "publication_date": {
                      "type": "string",
                      "format": "date"
                    },
                    "highlighted": {
                      "type": "boolean"
                    },
                    "main": {
                      "type": "boolean"
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/public/videos": {
      "get": {
        "tags": [
          "public",
          "videos"
        ],
        "summary": "Videogallery pubblica, paginata a cursore e filtrabile per torneo",
        "security": [
          {
            "ApiKey": [
              "read:public.media"
            ]
          }
        ],
        "x-tenant-scope": "tenant_bound",
        "x-privacy-classification": "public_content",
        "x-rate-limit-tier": "public",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "season_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "tournament_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "highlighted",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false",
                "1",
                "0"
              ]
            }
          },
          {
            "name": "main",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false",
                "1",
                "0"
              ]
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 300
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Pagina della videogallery",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "next_cursor"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "organization_id",
                          "season_id",
                          "tournament_id",
                          "title",
                          "description",
                          "provider",
                          "external_url",
                          "embed_url",
                          "publication_date",
                          "highlighted",
                          "main",
                          "version",
                          "created_at",
                          "updated_at"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "organization_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "season_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "tournament_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "title": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 160
                          },
                          "description": {
                            "oneOf": [
                              {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 2000
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "provider": {
                            "type": "string",
                            "enum": [
                              "youtube",
                              "vimeo",
                              "facebook",
                              "instagram",
                              "tiktok"
                            ]
                          },
                          "external_url": {
                            "type": "string",
                            "format": "uri"
                          },
                          "embed_url": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uri"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "publication_date": {
                            "type": "string",
                            "format": "date"
                          },
                          "highlighted": {
                            "type": "boolean"
                          },
                          "main": {
                            "type": "boolean"
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 1
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updated_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    },
                    "next_cursor": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/public/gold-book/competitions": {
      "get": {
        "tags": [
          "public",
          "gold-book"
        ],
        "summary": "Indice pubblico dell'albo d'oro.",
        "security": [
          {
            "ApiKey": [
              "read:public.matches"
            ]
          }
        ],
        "x-tenant-scope": "public",
        "x-privacy-classification": "public",
        "x-rate-limit-tier": "public_widget",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "organization_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 300
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/public/gold-book/competitions/{slug}": {
      "get": {
        "tags": [
          "public",
          "gold-book"
        ],
        "summary": "Edizioni pubblicate di una competizione dell'albo d'oro.",
        "security": [
          {
            "ApiKey": [
              "read:public.matches"
            ]
          }
        ],
        "x-tenant-scope": "public",
        "x-privacy-classification": "public",
        "x-rate-limit-tier": "public_widget",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "organization_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 300
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "parameters": [
        {
          "name": "slug",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ]
    },
    "/admin/gold-book/competitions": {
      "get": {
        "tags": [
          "admin",
          "gold-book"
        ],
        "summary": "Elenco amministrativo delle competizioni dell'albo.",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 300
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "include_archived",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "201": {
            "description": "Creato"
          },
          "204": {
            "description": "Archiviato"
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "admin",
          "gold-book"
        ],
        "summary": "Crea una competizione dell'albo.",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "request_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "organization_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 160
                  },
                  "slug": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 64,
                    "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
                  },
                  "order": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 999
                  }
                },
                "required": [
                  "request_id",
                  "name",
                  "slug",
                  "order"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "201": {
            "description": "Creato"
          },
          "204": {
            "description": "Archiviato"
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/gold-book/competitions/{competitionId}": {
      "patch": {
        "tags": [
          "admin",
          "gold-book"
        ],
        "summary": "Corregge una competizione dell'albo.",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "expected_version": {
                    "type": "integer",
                    "exclusiveMinimum": 0
                  },
                  "organization_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 160
                  },
                  "slug": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 64,
                    "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
                  },
                  "order": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 999
                  }
                },
                "required": [
                  "expected_version",
                  "name",
                  "slug",
                  "order"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "201": {
            "description": "Creato"
          },
          "204": {
            "description": "Archiviato"
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "admin",
          "gold-book"
        ],
        "summary": "Archivia una competizione dell'albo.",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "expected_version",
            "in": "query",
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "201": {
            "description": "Creato"
          },
          "204": {
            "description": "Archiviato"
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "parameters": [
        {
          "name": "competitionId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ]
    },
    "/admin/gold-book/competitions/{competitionId}/entries": {
      "get": {
        "tags": [
          "admin",
          "gold-book"
        ],
        "summary": "Elenca le edizioni di una competizione.",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 300
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "201": {
            "description": "Creato"
          },
          "204": {
            "description": "Archiviato"
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "admin",
          "gold-book"
        ],
        "summary": "Inserisce manualmente un'edizione confermata.",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "request_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "organization_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "season_label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40
                  },
                  "tournament_id": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "winner_team_id": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "winner_name": {
                    "oneOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 160
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "finalist_team_id": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "finalist_name": {
                    "oneOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 160
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "include_confirmed_recognitions": {
                    "type": "boolean",
                    "default": false
                  }
                },
                "required": [
                  "request_id",
                  "season_label"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "201": {
            "description": "Creato"
          },
          "204": {
            "description": "Archiviato"
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "parameters": [
        {
          "name": "competitionId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ]
    },
    "/admin/gold-book/entries/{entryId}": {
      "patch": {
        "tags": [
          "admin",
          "gold-book"
        ],
        "summary": "Corregge un'edizione dell'albo.",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "expected_version": {
                    "type": "integer",
                    "exclusiveMinimum": 0
                  },
                  "organization_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "season_label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40
                  },
                  "winner_team_id": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "winner_name": {
                    "oneOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 160
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "finalist_team_id": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "finalist_name": {
                    "oneOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 160
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "expected_version",
                  "season_label",
                  "winner_team_id",
                  "winner_name",
                  "finalist_team_id",
                  "finalist_name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "201": {
            "description": "Creato"
          },
          "204": {
            "description": "Archiviato"
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "admin",
          "gold-book"
        ],
        "summary": "Archivia un'edizione dell'albo.",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "expected_version",
            "in": "query",
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "201": {
            "description": "Creato"
          },
          "204": {
            "description": "Archiviato"
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "parameters": [
        {
          "name": "entryId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ]
    },
    "/admin/tournaments/{tournamentId}/gold-book": {
      "get": {
        "tags": [
          "admin",
          "gold-book"
        ],
        "summary": "Stato albo d'oro del torneo.",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-city-scope-source": "path",
        "responses": {
          "200": {
            "description": "OK"
          },
          "201": {
            "description": "Creato"
          },
          "204": {
            "description": "Archiviato"
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "organization_id",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "parameters": [
        {
          "name": "tournamentId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ]
    },
    "/admin/tournaments/{tournamentId}/gold-book/proposal": {
      "post": {
        "tags": [
          "admin",
          "gold-book"
        ],
        "summary": "Prepara una proposta dal vincitore di finale proclamato.",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "organization_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "additionalProperties": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "201": {
            "description": "Creato"
          },
          "204": {
            "description": "Archiviato"
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "parameters": [
        {
          "name": "tournamentId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ]
    },
    "/admin/tournaments/{tournamentId}/gold-book/confirm": {
      "post": {
        "tags": [
          "admin",
          "gold-book"
        ],
        "summary": "Conferma la proposta e pubblica l'edizione.",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "competition_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "organization_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "season_label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40
                  },
                  "expected_version": {
                    "type": "integer",
                    "exclusiveMinimum": 0
                  }
                },
                "required": [
                  "competition_id",
                  "season_label",
                  "expected_version"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "201": {
            "description": "Creato"
          },
          "204": {
            "description": "Archiviato"
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "parameters": [
        {
          "name": "tournamentId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ]
    },
    "/admin/tournaments/{tournamentId}/gold-book/dismiss": {
      "post": {
        "tags": [
          "admin",
          "gold-book"
        ],
        "summary": "Scarta la proposta senza cambiare l'albo.",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "expected_version": {
                    "type": "integer",
                    "exclusiveMinimum": 0
                  },
                  "organization_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 500
                  }
                },
                "required": [
                  "expected_version",
                  "reason"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "201": {
            "description": "Creato"
          },
          "204": {
            "description": "Archiviato"
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "parameters": [
        {
          "name": "tournamentId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ]
    },
    "/admin/media/archive": {
      "get": {
        "tags": [
          "admin",
          "media-extras"
        ],
        "summary": "Archivio foto approvato, paginato a cursore",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 2,
              "maxLength": 80
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Pagina archivio",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "next_cursor"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "title",
                          "caption",
                          "mime_type",
                          "byte_size",
                          "captured_at",
                          "preview_url"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "title": {
                            "type": "string"
                          },
                          "caption": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "mime_type": {
                            "type": "string"
                          },
                          "byte_size": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "captured_at": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "preview_url": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uri"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "additionalProperties": false
                      }
                    },
                    "next_cursor": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/tournaments/{tournamentId}/photo-suggestions": {
      "get": {
        "tags": [
          "admin",
          "media-extras"
        ],
        "summary": "Vista torneo della coda moderazione per figurine e scudetti",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "pending",
                "approved",
                "rejected"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Pagina proposte",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "next_cursor"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "media_id",
                          "kind",
                          "target_id",
                          "target_label",
                          "minor",
                          "guardian_consent_required",
                          "guardian_consent_granted",
                          "moderation_status",
                          "processing_status",
                          "preview_url",
                          "version",
                          "created_at"
                        ],
                        "properties": {
                          "media_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "player_card",
                              "team_shield"
                            ]
                          },
                          "target_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "target_label": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "minor": {
                            "type": "boolean"
                          },
                          "guardian_consent_required": {
                            "type": "boolean"
                          },
                          "guardian_consent_granted": {
                            "type": "boolean"
                          },
                          "moderation_status": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "approved",
                              "rejected"
                            ]
                          },
                          "processing_status": {
                            "type": "string",
                            "enum": [
                              "queued",
                              "processing",
                              "ready",
                              "failed"
                            ]
                          },
                          "preview_url": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uri"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 1
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "additionalProperties": false
                      }
                    },
                    "next_cursor": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/tournaments/{tournamentId}/photo-suggestions/{mediaId}/decision": {
      "post": {
        "tags": [
          "admin",
          "media-extras"
        ],
        "summary": "Accetta o rifiuta una proposta della moderazione esistente",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "mediaId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "decision",
                  "reason",
                  "expected_version"
                ],
                "properties": {
                  "decision": {
                    "type": "string",
                    "enum": [
                      "approved",
                      "rejected"
                    ]
                  },
                  "reason": {
                    "oneOf": [
                      {
                        "type": "string",
                        "minLength": 3,
                        "maxLength": 500
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "expected_version": {
                    "type": "integer",
                    "minimum": 1
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Decisione applicata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "suggestion",
                    "visual"
                  ],
                  "properties": {
                    "suggestion": {
                      "type": "object",
                      "required": [
                        "media_id",
                        "kind",
                        "target_id",
                        "target_label",
                        "minor",
                        "guardian_consent_required",
                        "guardian_consent_granted",
                        "moderation_status",
                        "processing_status",
                        "preview_url",
                        "version",
                        "created_at"
                      ],
                      "properties": {
                        "media_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "kind": {
                          "type": "string",
                          "enum": [
                            "player_card",
                            "team_shield"
                          ]
                        },
                        "target_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "target_label": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "minor": {
                          "type": "boolean"
                        },
                        "guardian_consent_required": {
                          "type": "boolean"
                        },
                        "guardian_consent_granted": {
                          "type": "boolean"
                        },
                        "moderation_status": {
                          "type": "string",
                          "enum": [
                            "pending",
                            "approved",
                            "rejected"
                          ]
                        },
                        "processing_status": {
                          "type": "string",
                          "enum": [
                            "queued",
                            "processing",
                            "ready",
                            "failed"
                          ]
                        },
                        "preview_url": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uri"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "version": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "additionalProperties": false
                    },
                    "visual": {
                      "oneOf": [
                        {
                          "type": "object",
                          "required": [
                            "id",
                            "team_id",
                            "tournament_id",
                            "season_id",
                            "subject_kind",
                            "subject_id",
                            "kind",
                            "media_id",
                            "source",
                            "crop",
                            "preset_key",
                            "primary_color",
                            "secondary_color",
                            "current",
                            "previous_visual_id",
                            "version",
                            "created_at",
                            "updated_at"
                          ],
                          "properties": {
                            "id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "team_id": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "tournament_id": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "season_id": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "subject_kind": {
                              "type": "string",
                              "enum": [
                                "team",
                                "player"
                              ]
                            },
                            "subject_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "kind": {
                              "type": "string",
                              "enum": [
                                "team_shield",
                                "team_photo",
                                "seasonal_team_photo",
                                "player_card"
                              ]
                            },
                            "media_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "source": {
                              "type": "string",
                              "enum": [
                                "archive",
                                "upload",
                                "preset",
                                "editor",
                                "suggestion"
                              ]
                            },
                            "crop": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "additionalProperties": false
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "preset_key": {
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "primary_color": {
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "secondary_color": {
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "current": {
                              "type": "boolean"
                            },
                            "previous_visual_id": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "version": {
                              "type": "integer",
                              "minimum": 1
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "updated_at": {
                              "type": "string",
                              "format": "date-time"
                            }
                          },
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/teams/{teamId}/visuals": {
      "get": {
        "tags": [
          "admin",
          "media-extras"
        ],
        "summary": "Storico paginato delle immagini squadra",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "season_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Storico immagini",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "next_cursor"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "team_id",
                          "tournament_id",
                          "season_id",
                          "subject_kind",
                          "subject_id",
                          "kind",
                          "media_id",
                          "source",
                          "crop",
                          "preset_key",
                          "primary_color",
                          "secondary_color",
                          "current",
                          "previous_visual_id",
                          "version",
                          "created_at",
                          "updated_at"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "team_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "tournament_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "season_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "subject_kind": {
                            "type": "string",
                            "enum": [
                              "team",
                              "player"
                            ]
                          },
                          "subject_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "team_shield",
                              "team_photo",
                              "seasonal_team_photo",
                              "player_card"
                            ]
                          },
                          "media_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "source": {
                            "type": "string",
                            "enum": [
                              "archive",
                              "upload",
                              "preset",
                              "editor",
                              "suggestion"
                            ]
                          },
                          "crop": {
                            "oneOf": [
                              {
                                "type": "object",
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "preset_key": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "primary_color": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "secondary_color": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "current": {
                            "type": "boolean"
                          },
                          "previous_visual_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 1
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updated_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "additionalProperties": false
                      }
                    },
                    "next_cursor": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "admin",
          "media-extras"
        ],
        "summary": "Imposta scudetto o foto squadra da un media approvato",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "media_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "team_shield",
                      "team_photo",
                      "seasonal_team_photo"
                    ]
                  },
                  "season_id": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "source": {
                    "type": "string",
                    "enum": [
                      "archive",
                      "upload",
                      "preset",
                      "editor"
                    ]
                  },
                  "crop": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "x": {
                            "type": "number",
                            "minimum": 0
                          },
                          "y": {
                            "type": "number",
                            "minimum": 0
                          },
                          "width": {
                            "type": "number",
                            "exclusiveMinimum": 0
                          },
                          "height": {
                            "type": "number",
                            "exclusiveMinimum": 0
                          },
                          "output_width": {
                            "type": "integer",
                            "exclusiveMinimum": 0
                          },
                          "output_height": {
                            "type": "integer",
                            "exclusiveMinimum": 0
                          }
                        },
                        "required": [
                          "x",
                          "y",
                          "width",
                          "height",
                          "output_width",
                          "output_height"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "preset_key": {
                    "oneOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 80
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "primary_color": {
                    "oneOf": [
                      {
                        "type": "string",
                        "pattern": "^#[0-9a-fA-F]{6}$"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "secondary_color": {
                    "oneOf": [
                      {
                        "type": "string",
                        "pattern": "^#[0-9a-fA-F]{6}$"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "expected_current_version": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "idempotency_key": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 120
                  }
                },
                "required": [
                  "media_id",
                  "kind",
                  "source",
                  "expected_current_version",
                  "idempotency_key"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Immagine impostata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "team_id",
                    "tournament_id",
                    "season_id",
                    "subject_kind",
                    "subject_id",
                    "kind",
                    "media_id",
                    "source",
                    "crop",
                    "preset_key",
                    "primary_color",
                    "secondary_color",
                    "current",
                    "previous_visual_id",
                    "version",
                    "created_at",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "team_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "tournament_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "season_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "subject_kind": {
                      "type": "string",
                      "enum": [
                        "team",
                        "player"
                      ]
                    },
                    "subject_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "team_shield",
                        "team_photo",
                        "seasonal_team_photo",
                        "player_card"
                      ]
                    },
                    "media_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "source": {
                      "type": "string",
                      "enum": [
                        "archive",
                        "upload",
                        "preset",
                        "editor",
                        "suggestion"
                      ]
                    },
                    "crop": {
                      "oneOf": [
                        {
                          "type": "object",
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "preset_key": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "primary_color": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "secondary_color": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "current": {
                      "type": "boolean"
                    },
                    "previous_visual_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/teams/{teamId}/visuals/{visualId}/restore": {
      "post": {
        "tags": [
          "admin",
          "media-extras"
        ],
        "summary": "Ripristina una versione precedente dell’immagine squadra",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "visualId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "expected_current_version"
                ],
                "properties": {
                  "expected_current_version": {
                    "type": "integer",
                    "minimum": 1
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Versione ripristinata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "team_id",
                    "tournament_id",
                    "season_id",
                    "subject_kind",
                    "subject_id",
                    "kind",
                    "media_id",
                    "source",
                    "crop",
                    "preset_key",
                    "primary_color",
                    "secondary_color",
                    "current",
                    "previous_visual_id",
                    "version",
                    "created_at",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "team_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "tournament_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "season_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "subject_kind": {
                      "type": "string",
                      "enum": [
                        "team",
                        "player"
                      ]
                    },
                    "subject_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "team_shield",
                        "team_photo",
                        "seasonal_team_photo",
                        "player_card"
                      ]
                    },
                    "media_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "source": {
                      "type": "string",
                      "enum": [
                        "archive",
                        "upload",
                        "preset",
                        "editor",
                        "suggestion"
                      ]
                    },
                    "crop": {
                      "oneOf": [
                        {
                          "type": "object",
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "preset_key": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "primary_color": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "secondary_color": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "current": {
                      "type": "boolean"
                    },
                    "previous_visual_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/players/{playerId}/visuals": {
      "get": {
        "tags": [
          "admin",
          "media-extras"
        ],
        "summary": "Storico paginato delle figurine giocatore",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "playerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "season_id",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Storico figurine",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "next_cursor"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "team_id",
                          "tournament_id",
                          "season_id",
                          "subject_kind",
                          "subject_id",
                          "kind",
                          "media_id",
                          "source",
                          "crop",
                          "preset_key",
                          "primary_color",
                          "secondary_color",
                          "current",
                          "previous_visual_id",
                          "version",
                          "created_at",
                          "updated_at"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "team_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "tournament_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "season_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "subject_kind": {
                            "type": "string",
                            "enum": [
                              "team",
                              "player"
                            ]
                          },
                          "subject_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "team_shield",
                              "team_photo",
                              "seasonal_team_photo",
                              "player_card"
                            ]
                          },
                          "media_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "source": {
                            "type": "string",
                            "enum": [
                              "archive",
                              "upload",
                              "preset",
                              "editor",
                              "suggestion"
                            ]
                          },
                          "crop": {
                            "oneOf": [
                              {
                                "type": "object",
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "preset_key": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "primary_color": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "secondary_color": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "current": {
                            "type": "boolean"
                          },
                          "previous_visual_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 1
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updated_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "additionalProperties": false
                      }
                    },
                    "next_cursor": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/players/{playerId}/visuals/{visualId}/restore": {
      "post": {
        "tags": [
          "admin",
          "media-extras"
        ],
        "summary": "Ripristina una figurina precedente",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "playerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "visualId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "expected_current_version"
                ],
                "properties": {
                  "expected_current_version": {
                    "type": "integer",
                    "minimum": 1
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Figurina ripristinata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "team_id",
                    "tournament_id",
                    "season_id",
                    "subject_kind",
                    "subject_id",
                    "kind",
                    "media_id",
                    "source",
                    "crop",
                    "preset_key",
                    "primary_color",
                    "secondary_color",
                    "current",
                    "previous_visual_id",
                    "version",
                    "created_at",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "team_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "tournament_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "season_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "subject_kind": {
                      "type": "string",
                      "enum": [
                        "team",
                        "player"
                      ]
                    },
                    "subject_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "team_shield",
                        "team_photo",
                        "seasonal_team_photo",
                        "player_card"
                      ]
                    },
                    "media_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "source": {
                      "type": "string",
                      "enum": [
                        "archive",
                        "upload",
                        "preset",
                        "editor",
                        "suggestion"
                      ]
                    },
                    "crop": {
                      "oneOf": [
                        {
                          "type": "object",
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "preset_key": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "primary_color": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "secondary_color": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "current": {
                      "type": "boolean"
                    },
                    "previous_visual_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/content-push": {
      "post": {
        "tags": [
          "admin",
          "media-extras"
        ],
        "summary": "Invia o reinvia una notifica push per un contenuto",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "content_kind": {
                    "type": "string",
                    "enum": [
                      "news",
                      "gallery",
                      "video",
                      "communique"
                    ]
                  },
                  "content_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "template_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "idempotency_key": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 120
                  },
                  "confirm_resend": {
                    "type": "boolean",
                    "default": false
                  }
                },
                "required": [
                  "content_kind",
                  "content_id",
                  "template_id",
                  "idempotency_key"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ricevuta invio",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "content_kind",
                    "content_id",
                    "send_number",
                    "sent_at",
                    "recipient_count",
                    "enqueued_count",
                    "suppressed_count",
                    "channel_mode"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "content_kind": {
                      "type": "string",
                      "enum": [
                        "news",
                        "gallery",
                        "video",
                        "communique"
                      ]
                    },
                    "content_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "send_number": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "sent_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "recipient_count": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "enqueued_count": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "suppressed_count": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "channel_mode": {
                      "type": "string",
                      "enum": [
                        "live",
                        "degraded"
                      ]
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/phonebook": {
      "get": {
        "tags": [
          "admin",
          "phonebook"
        ],
        "summary": "Elenca la rubrica della città; ogni lettura è registrata senza valori personali",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "organization_scoped",
        "x-privacy-classification": "personal_data",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 120
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 1000
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Pagina della rubrica",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "next_cursor"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "organization_id",
                          "last_name",
                          "first_name",
                          "birth_date",
                          "mobile_e164",
                          "email",
                          "notes",
                          "version",
                          "created_at",
                          "updated_at"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "organization_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "last_name": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 120
                          },
                          "first_name": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 120
                          },
                          "birth_date": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "date"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "mobile_e164": {
                            "type": "string",
                            "pattern": "^\\+[1-9]\\d{7,14}$"
                          },
                          "email": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "email",
                                "maxLength": 254
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "notes": {
                            "oneOf": [
                              {
                                "type": "string",
                                "maxLength": 1000
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 1
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updated_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "additionalProperties": false
                      }
                    },
                    "next_cursor": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "admin",
          "phonebook"
        ],
        "summary": "Crea un contatto; ripetibile con lo stesso request_id",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "organization_scoped",
        "x-privacy-classification": "personal_data",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "last_name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "first_name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "birth_date": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "date"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "mobile_e164": {
                    "type": "string",
                    "pattern": "^\\+[1-9]\\d{7,14}$"
                  },
                  "email": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "email",
                        "maxLength": 254
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "notes": {
                    "oneOf": [
                      {
                        "type": "string",
                        "maxLength": 1000
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "request_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "organization_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "last_name",
                  "first_name",
                  "mobile_e164",
                  "request_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Richiesta già applicata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "organization_id",
                    "last_name",
                    "first_name",
                    "birth_date",
                    "mobile_e164",
                    "email",
                    "notes",
                    "version",
                    "created_at",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "organization_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "last_name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 120
                    },
                    "first_name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 120
                    },
                    "birth_date": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "date"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "mobile_e164": {
                      "type": "string",
                      "pattern": "^\\+[1-9]\\d{7,14}$"
                    },
                    "email": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "email",
                          "maxLength": 254
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "notes": {
                      "oneOf": [
                        {
                          "type": "string",
                          "maxLength": 1000
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "201": {
            "description": "Creato",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "organization_id",
                    "last_name",
                    "first_name",
                    "birth_date",
                    "mobile_e164",
                    "email",
                    "notes",
                    "version",
                    "created_at",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "organization_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "last_name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 120
                    },
                    "first_name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 120
                    },
                    "birth_date": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "date"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "mobile_e164": {
                      "type": "string",
                      "pattern": "^\\+[1-9]\\d{7,14}$"
                    },
                    "email": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "email",
                          "maxLength": 254
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "notes": {
                      "oneOf": [
                        {
                          "type": "string",
                          "maxLength": 1000
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/phonebook/{contactId}": {
      "get": {
        "tags": [
          "admin",
          "phonebook"
        ],
        "summary": "Legge un contatto della città",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "organization_scoped",
        "x-privacy-classification": "personal_data",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "contactId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Contatto",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "organization_id",
                    "last_name",
                    "first_name",
                    "birth_date",
                    "mobile_e164",
                    "email",
                    "notes",
                    "version",
                    "created_at",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "organization_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "last_name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 120
                    },
                    "first_name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 120
                    },
                    "birth_date": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "date"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "mobile_e164": {
                      "type": "string",
                      "pattern": "^\\+[1-9]\\d{7,14}$"
                    },
                    "email": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "email",
                          "maxLength": 254
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "notes": {
                      "oneOf": [
                        {
                          "type": "string",
                          "maxLength": 1000
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "admin",
          "phonebook"
        ],
        "summary": "Aggiorna un contatto con controllo di versione",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "organization_scoped",
        "x-privacy-classification": "personal_data",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "contactId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "last_name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "first_name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "birth_date": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "date"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "mobile_e164": {
                    "type": "string",
                    "pattern": "^\\+[1-9]\\d{7,14}$"
                  },
                  "email": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "email",
                        "maxLength": 254
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "notes": {
                    "oneOf": [
                      {
                        "type": "string",
                        "maxLength": 1000
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "expected_version": {
                    "type": "integer",
                    "exclusiveMinimum": 0
                  },
                  "organization_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "last_name",
                  "first_name",
                  "mobile_e164",
                  "expected_version"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Aggiornato",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "organization_id",
                    "last_name",
                    "first_name",
                    "birth_date",
                    "mobile_e164",
                    "email",
                    "notes",
                    "version",
                    "created_at",
                    "updated_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "organization_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "last_name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 120
                    },
                    "first_name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 120
                    },
                    "birth_date": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "date"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "mobile_e164": {
                      "type": "string",
                      "pattern": "^\\+[1-9]\\d{7,14}$"
                    },
                    "email": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "email",
                          "maxLength": 254
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "notes": {
                      "oneOf": [
                        {
                          "type": "string",
                          "maxLength": 1000
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "admin",
          "phonebook"
        ],
        "summary": "Cancella definitivamente un contatto con controllo di versione",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "organization_scoped",
        "x-privacy-classification": "personal_data",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "contactId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "expected_version",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Cancellato definitivamente"
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/phonebook/privacy-policy": {
      "get": {
        "tags": [
          "admin",
          "phonebook"
        ],
        "summary": "Legge la politica di trattamento e cancellazione della rubrica",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "organization_scoped",
        "x-privacy-classification": "personal_data",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "responses": {
          "200": {
            "description": "Politica",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "table",
                    "personal_data",
                    "automatic_messages",
                    "external_sync",
                    "export_available",
                    "deletion"
                  ],
                  "properties": {
                    "table": {
                      "type": "string",
                      "enum": [
                        "phonebook_contacts"
                      ]
                    },
                    "personal_data": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "automatic_messages": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "external_sync": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "export_available": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "deletion": {
                      "type": "string",
                      "enum": [
                        "hard_delete_on_admin_or_data_subject_request"
                      ]
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/analytics/registrations": {
      "get": {
        "tags": [
          "admin",
          "analytics"
        ],
        "summary": "Conteggi aggregati delle registrazioni per canale, con intervallo opzionale di confronto",
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "granularity",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "day",
                "month",
                "year"
              ]
            }
          },
          {
            "name": "mode",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "partial",
                "total"
              ]
            }
          },
          {
            "name": "compare_from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "compare_to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Serie aggregate; ogni gruppo tra 1 e 4 è restituito come <5",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "granularity",
                    "mode",
                    "minimum_group_size",
                    "observed_since",
                    "primary",
                    "comparison"
                  ],
                  "properties": {
                    "granularity": {
                      "type": "string",
                      "enum": [
                        "day",
                        "month",
                        "year"
                      ]
                    },
                    "mode": {
                      "type": "string",
                      "enum": [
                        "partial",
                        "total"
                      ]
                    },
                    "minimum_group_size": {
                      "type": "integer",
                      "enum": [
                        5
                      ]
                    },
                    "observed_since": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date"
                    },
                    "primary": {
                      "type": "object",
                      "required": [
                        "from",
                        "to",
                        "points"
                      ],
                      "properties": {
                        "from": {
                          "type": "string",
                          "format": "date"
                        },
                        "to": {
                          "type": "string",
                          "format": "date"
                        },
                        "points": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "bucket",
                              "values"
                            ],
                            "properties": {
                              "bucket": {
                                "type": "string",
                                "format": "date"
                              },
                              "values": {
                                "type": "object",
                                "required": [
                                  "total",
                                  "desktop",
                                  "mobile_web",
                                  "app",
                                  "not_available"
                                ],
                                "properties": {
                                  "total": {
                                    "oneOf": [
                                      {
                                        "type": "integer",
                                        "enum": [
                                          0
                                        ]
                                      },
                                      {
                                        "type": "integer",
                                        "minimum": 5
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "<5"
                                        ]
                                      }
                                    ]
                                  },
                                  "desktop": {
                                    "oneOf": [
                                      {
                                        "type": "integer",
                                        "enum": [
                                          0
                                        ]
                                      },
                                      {
                                        "type": "integer",
                                        "minimum": 5
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "<5"
                                        ]
                                      }
                                    ]
                                  },
                                  "mobile_web": {
                                    "oneOf": [
                                      {
                                        "type": "integer",
                                        "enum": [
                                          0
                                        ]
                                      },
                                      {
                                        "type": "integer",
                                        "minimum": 5
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "<5"
                                        ]
                                      }
                                    ]
                                  },
                                  "app": {
                                    "oneOf": [
                                      {
                                        "type": "integer",
                                        "enum": [
                                          0
                                        ]
                                      },
                                      {
                                        "type": "integer",
                                        "minimum": 5
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "<5"
                                        ]
                                      }
                                    ]
                                  },
                                  "not_available": {
                                    "oneOf": [
                                      {
                                        "type": "integer",
                                        "enum": [
                                          0
                                        ]
                                      },
                                      {
                                        "type": "integer",
                                        "minimum": 5
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "<5"
                                        ]
                                      }
                                    ]
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    },
                    "comparison": {
                      "oneOf": [
                        {
                          "type": "object",
                          "required": [
                            "from",
                            "to",
                            "points"
                          ],
                          "properties": {
                            "from": {
                              "type": "string",
                              "format": "date"
                            },
                            "to": {
                              "type": "string",
                              "format": "date"
                            },
                            "points": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "required": [
                                  "bucket",
                                  "values"
                                ],
                                "properties": {
                                  "bucket": {
                                    "type": "string",
                                    "format": "date"
                                  },
                                  "values": {
                                    "type": "object",
                                    "required": [
                                      "total",
                                      "desktop",
                                      "mobile_web",
                                      "app",
                                      "not_available"
                                    ],
                                    "properties": {
                                      "total": {
                                        "oneOf": [
                                          {
                                            "type": "integer",
                                            "enum": [
                                              0
                                            ]
                                          },
                                          {
                                            "type": "integer",
                                            "minimum": 5
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "<5"
                                            ]
                                          }
                                        ]
                                      },
                                      "desktop": {
                                        "oneOf": [
                                          {
                                            "type": "integer",
                                            "enum": [
                                              0
                                            ]
                                          },
                                          {
                                            "type": "integer",
                                            "minimum": 5
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "<5"
                                            ]
                                          }
                                        ]
                                      },
                                      "mobile_web": {
                                        "oneOf": [
                                          {
                                            "type": "integer",
                                            "enum": [
                                              0
                                            ]
                                          },
                                          {
                                            "type": "integer",
                                            "minimum": 5
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "<5"
                                            ]
                                          }
                                        ]
                                      },
                                      "app": {
                                        "oneOf": [
                                          {
                                            "type": "integer",
                                            "enum": [
                                              0
                                            ]
                                          },
                                          {
                                            "type": "integer",
                                            "minimum": 5
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "<5"
                                            ]
                                          }
                                        ]
                                      },
                                      "not_available": {
                                        "oneOf": [
                                          {
                                            "type": "integer",
                                            "enum": [
                                              0
                                            ]
                                          },
                                          {
                                            "type": "integer",
                                            "minimum": 5
                                          },
                                          {
                                            "type": "string",
                                            "enum": [
                                              "<5"
                                            ]
                                          }
                                        ]
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          }
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_scoped",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "aggregate_non_personal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/search": {
      "get": {
        "tags": [
          "admin",
          "search-support"
        ],
        "summary": "Ricerca per prefisso di tornei, squadre e giocatori nell’ambito autorizzato",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 3,
              "maxLength": 80
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Risultati autorizzati",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "query": {
                      "type": "string"
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "tournament",
                              "team",
                              "player"
                            ]
                          },
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "label": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 160
                          },
                          "meta": {
                            "oneOf": [
                              {
                                "type": "string",
                                "maxLength": 160
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "href": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "kind",
                          "id",
                          "label",
                          "meta",
                          "href"
                        ]
                      }
                    }
                  },
                  "required": [
                    "query",
                    "items"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/public/search/autocomplete": {
      "get": {
        "tags": [
          "public",
          "search-support"
        ],
        "summary": "Autocompletamento pubblico per prefisso",
        "security": [
          {
            "ApiKey": [
              "read:public.matches"
            ]
          }
        ],
        "x-tenant-scope": "public",
        "x-privacy-classification": "public",
        "x-rate-limit-tier": "public_widget",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 3,
              "maxLength": 80
            }
          },
          {
            "name": "city_slug",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Suggerimenti pubblici",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "query": {
                      "type": "string"
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "tournament",
                              "team",
                              "player"
                            ]
                          },
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "label": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 160
                          },
                          "meta": {
                            "oneOf": [
                              {
                                "type": "string",
                                "maxLength": 160
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "href": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "kind",
                          "id",
                          "label",
                          "meta",
                          "href"
                        ]
                      }
                    }
                  },
                  "required": [
                    "query",
                    "items"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/public/support-requests": {
      "post": {
        "tags": [
          "public",
          "search-support"
        ],
        "summary": "Invia una richiesta di assistenza visitatore",
        "security": [
          {
            "ApiKey": [
              "write:public.support"
            ]
          },
          {
            "ApiKey": [
              "read:public.matches"
            ]
          }
        ],
        "x-tenant-scope": "public",
        "x-privacy-classification": "personal",
        "x-rate-limit-tier": "sensitive_mutation",
        "x-audit-required": true,
        "description": "`read:public.matches` è accettato per una sola release di compatibilità ed è deprecato; usare `write:public.support`.",
        "x-legacy-scope-deprecation": {
          "scope": "read:public.matches",
          "replacement": "write:public.support",
          "removal": "next_release"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "category": {
                    "type": "string",
                    "enum": [
                      "general",
                      "team_registration"
                    ]
                  },
                  "reply_email": {
                    "type": "string",
                    "format": "email",
                    "maxLength": 160
                  },
                  "subject": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 120
                  },
                  "message": {
                    "type": "string",
                    "minLength": 10,
                    "maxLength": 2000
                  },
                  "website": {
                    "type": "string",
                    "maxLength": 0
                  },
                  "started_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "answers": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "field_id": {
                          "type": "string",
                          "pattern": "^[a-z][a-z0-9_]{1,39}$"
                        },
                        "value": {
                          "type": "string",
                          "maxLength": 1000
                        }
                      },
                      "required": [
                        "field_id",
                        "value"
                      ],
                      "additionalProperties": false
                    },
                    "maxItems": 12
                  }
                },
                "required": [
                  "category",
                  "reply_email",
                  "subject",
                  "message",
                  "website",
                  "started_at"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Richiesta ricevuta",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "received_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "request_id",
                    "received_at"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/public/support-forms/{category}": {
      "get": {
        "tags": [
          "public",
          "search-support"
        ],
        "summary": "Campi aggiuntivi di un modulo pubblico (contatti, iscrizione squadra)",
        "security": [
          {
            "ApiKey": [
              "read:public.matches"
            ]
          }
        ],
        "x-tenant-scope": "public",
        "x-privacy-classification": "public",
        "x-rate-limit-tier": "public_widget",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "category",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "general",
                "team_registration"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Modulo pubblico",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "category": {
                      "type": "string",
                      "enum": [
                        "general",
                        "team_registration"
                      ]
                    },
                    "state": {
                      "type": "string",
                      "enum": [
                        "active",
                        "gated"
                      ]
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-z][a-z0-9_]{1,39}$"
                          },
                          "label": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 80
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "text",
                              "textarea",
                              "select",
                              "phone",
                              "date"
                            ]
                          },
                          "required": {
                            "type": "boolean"
                          },
                          "help": {
                            "oneOf": [
                              {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 200
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "options": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 80
                            },
                            "maxItems": 20
                          }
                        },
                        "required": [
                          "id",
                          "label",
                          "kind",
                          "required",
                          "help",
                          "options"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "category",
                    "state",
                    "fields"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/support-forms/{category}": {
      "get": {
        "tags": [
          "admin",
          "search-support"
        ],
        "summary": "Configurazione dei campi aggiuntivi di un modulo pubblico",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "category",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "general",
                "team_registration"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Configurazione del modulo",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "category": {
                      "type": "string",
                      "enum": [
                        "general",
                        "team_registration"
                      ]
                    },
                    "state": {
                      "type": "string",
                      "enum": [
                        "active",
                        "gated"
                      ]
                    },
                    "questions": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-z][a-z0-9_]{1,39}$"
                          },
                          "label": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 80
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "text",
                              "textarea",
                              "select",
                              "phone",
                              "date"
                            ]
                          },
                          "required": {
                            "type": "boolean"
                          },
                          "help": {
                            "oneOf": [
                              {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 200
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "options": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 80
                            },
                            "maxItems": 20
                          }
                        },
                        "required": [
                          "id",
                          "label",
                          "kind",
                          "required",
                          "help",
                          "options"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updated_at": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "category",
                    "state",
                    "questions",
                    "fields",
                    "version",
                    "updated_at"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "admin",
          "search-support"
        ],
        "summary": "Sostituisce i campi aggiuntivi di un modulo pubblico",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "category",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "general",
                "team_registration"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "expected_version": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "fields": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "pattern": "^[a-z][a-z0-9_]{1,39}$"
                        },
                        "label": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80
                        },
                        "kind": {
                          "type": "string",
                          "enum": [
                            "text",
                            "textarea",
                            "select",
                            "phone",
                            "date"
                          ]
                        },
                        "required": {
                          "type": "boolean"
                        },
                        "help": {
                          "oneOf": [
                            {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 200
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "options": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 80
                          },
                          "maxItems": 20
                        }
                      },
                      "required": [
                        "id",
                        "label",
                        "kind",
                        "required",
                        "help",
                        "options"
                      ],
                      "additionalProperties": false
                    },
                    "maxItems": 12
                  }
                },
                "required": [
                  "expected_version",
                  "fields"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Configurazione salvata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "category": {
                      "type": "string",
                      "enum": [
                        "general",
                        "team_registration"
                      ]
                    },
                    "state": {
                      "type": "string",
                      "enum": [
                        "active",
                        "gated"
                      ]
                    },
                    "questions": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-z][a-z0-9_]{1,39}$"
                          },
                          "label": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 80
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "text",
                              "textarea",
                              "select",
                              "phone",
                              "date"
                            ]
                          },
                          "required": {
                            "type": "boolean"
                          },
                          "help": {
                            "oneOf": [
                              {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 200
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "options": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 80
                            },
                            "maxItems": 20
                          }
                        },
                        "required": [
                          "id",
                          "label",
                          "kind",
                          "required",
                          "help",
                          "options"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updated_at": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "category",
                    "state",
                    "questions",
                    "fields",
                    "version",
                    "updated_at"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/visitor-support-requests": {
      "get": {
        "tags": [
          "admin",
          "search-support"
        ],
        "summary": "Richieste visitatore paginate a cursore",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "open",
                "in_progress",
                "closed"
              ]
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 400
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Pagina richieste",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "category": {
                            "type": "string",
                            "enum": [
                              "general",
                              "team_registration"
                            ]
                          },
                          "reply_email": {
                            "type": "string",
                            "format": "email"
                          },
                          "subject": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          },
                          "answers": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "field_id": {
                                  "type": "string"
                                },
                                "label": {
                                  "type": "string"
                                },
                                "value": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "field_id",
                                "label",
                                "value"
                              ]
                            }
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "open",
                              "in_progress",
                              "closed"
                            ]
                          },
                          "version": {
                            "type": "integer",
                            "exclusiveMinimum": 0
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updated_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "id",
                          "category",
                          "reply_email",
                          "subject",
                          "message",
                          "answers",
                          "status",
                          "version",
                          "created_at",
                          "updated_at"
                        ]
                      }
                    },
                    "next_cursor": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "items",
                    "next_cursor"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/visitor-support-requests/{requestId}": {
      "patch": {
        "tags": [
          "admin",
          "search-support"
        ],
        "summary": "Prende in carico o chiude una richiesta visitatore",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "requestId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "in_progress",
                      "closed"
                    ]
                  },
                  "expected_version": {
                    "type": "integer",
                    "exclusiveMinimum": 0
                  }
                },
                "required": [
                  "status",
                  "expected_version"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Richiesta aggiornata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "category": {
                      "type": "string",
                      "enum": [
                        "general",
                        "team_registration"
                      ]
                    },
                    "reply_email": {
                      "type": "string",
                      "format": "email"
                    },
                    "subject": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "answers": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field_id": {
                            "type": "string"
                          },
                          "label": {
                            "type": "string"
                          },
                          "value": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field_id",
                          "label",
                          "value"
                        ]
                      }
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "open",
                        "in_progress",
                        "closed"
                      ]
                    },
                    "version": {
                      "type": "integer",
                      "exclusiveMinimum": 0
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "category",
                    "reply_email",
                    "subject",
                    "message",
                    "answers",
                    "status",
                    "version",
                    "created_at",
                    "updated_at"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/legacy-urls": {
      "get": {
        "tags": [
          "admin",
          "legacy-urls"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "summary": "Corrispondenze e lacune degli URL storici, paginate a cursore",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "after",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 64
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "kind",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "tournament",
                "standings",
                "group_standings",
                "calendar",
                "match",
                "team_registration",
                "team",
                "player_registration",
                "player",
                "news",
                "album",
                "page",
                "gold_book",
                "facility"
              ]
            }
          },
          {
            "name": "state",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "mapped",
                "unresolved",
                "gone"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Pagina di corrispondenze",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "next_cursor"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "kind",
                          "legacy_id",
                          "state",
                          "destination_path",
                          "source_ref",
                          "first_seen_at",
                          "last_seen_at",
                          "hit_count",
                          "version",
                          "created_at",
                          "updated_at"
                        ],
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "tournament",
                              "standings",
                              "group_standings",
                              "calendar",
                              "match",
                              "team_registration",
                              "team",
                              "player_registration",
                              "player",
                              "news",
                              "album",
                              "page",
                              "gold_book",
                              "facility"
                            ]
                          },
                          "legacy_id": {
                            "type": "string",
                            "pattern": "^\\d{1,20}$"
                          },
                          "state": {
                            "type": "string",
                            "enum": [
                              "mapped",
                              "unresolved",
                              "gone"
                            ]
                          },
                          "destination_path": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "source_ref": {
                            "type": "string"
                          },
                          "first_seen_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          },
                          "last_seen_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          },
                          "hit_count": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 1
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updated_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/legacy-urls/import": {
      "post": {
        "tags": [
          "admin",
          "legacy-urls"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "summary": "Importa un lotto verificato dai crosswalk del gestionale storico",
        "x-audit-required": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "request_id",
                  "items"
                ],
                "properties": {
                  "request_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "items": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 500,
                    "items": {
                      "type": "object",
                      "required": [
                        "kind",
                        "legacy_id",
                        "state",
                        "destination_path",
                        "public_verified",
                        "source_ref"
                      ],
                      "properties": {
                        "kind": {
                          "type": "string",
                          "enum": [
                            "tournament",
                            "standings",
                            "group_standings",
                            "calendar",
                            "match",
                            "team_registration",
                            "team",
                            "player_registration",
                            "player",
                            "news",
                            "album",
                            "page",
                            "gold_book",
                            "facility"
                          ]
                        },
                        "legacy_id": {
                          "type": "string",
                          "pattern": "^\\d{1,20}$"
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "mapped",
                            "gone"
                          ]
                        },
                        "destination_path": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "public_verified": {
                          "type": "boolean"
                        },
                        "source_ref": {
                          "type": "string",
                          "maxLength": 300
                        },
                        "expected_version": {
                          "type": "integer",
                          "minimum": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Esito importazione",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "created",
                    "updated",
                    "unchanged",
                    "items"
                  ],
                  "properties": {
                    "created": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updated": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "unchanged": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "kind",
                          "legacy_id",
                          "state",
                          "destination_path",
                          "source_ref",
                          "first_seen_at",
                          "last_seen_at",
                          "hit_count",
                          "version",
                          "created_at",
                          "updated_at"
                        ],
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "tournament",
                              "standings",
                              "group_standings",
                              "calendar",
                              "match",
                              "team_registration",
                              "team",
                              "player_registration",
                              "player",
                              "news",
                              "album",
                              "page",
                              "gold_book",
                              "facility"
                            ]
                          },
                          "legacy_id": {
                            "type": "string",
                            "pattern": "^\\d{1,20}$"
                          },
                          "state": {
                            "type": "string",
                            "enum": [
                              "mapped",
                              "unresolved",
                              "gone"
                            ]
                          },
                          "destination_path": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "source_ref": {
                            "type": "string"
                          },
                          "first_seen_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          },
                          "last_seen_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          },
                          "hit_count": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 1
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updated_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/public/legacy-urls/resolve": {
      "get": {
        "tags": [
          "public",
          "legacy-urls"
        ],
        "summary": "Risolve un percorso storico in una destinazione interna pubblica",
        "security": [
          {
            "ApiKey": [
              "read:public.matches"
            ]
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "public",
        "x-rate-limit-tier": "public_widget",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "path",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 2048
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Destinazione interna",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "destination_path"
                  ],
                  "properties": {
                    "destination_path": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "410": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/public/seo/sitemap-segments": {
      "get": {
        "tags": [
          "public",
          "seo"
        ],
        "security": [
          {
            "ApiKey": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "public",
        "x-rate-limit-tier": "public",
        "x-audit-required": false,
        "summary": "Indice paginato dei segmenti della sitemap pubblica",
        "parameters": [
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 5000,
              "default": 1000
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Pagina dell’indice sitemap",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "next_cursor"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "kind",
                          "updated_at"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^(competition|team|match|player|news|page|facility)-[0-9a-f]$"
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "competition",
                              "team",
                              "match",
                              "player",
                              "news",
                              "page",
                              "facility"
                            ]
                          },
                          "updated_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/public/seo/sitemap-segments/{segmentId}": {
      "get": {
        "tags": [
          "public",
          "seo"
        ],
        "security": [
          {
            "ApiKey": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "public",
        "x-rate-limit-tier": "public",
        "x-audit-required": false,
        "summary": "URL indicizzabili di un segmento sitemap",
        "parameters": [
          {
            "name": "segmentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(competition|team|match|player|news|page|facility)-[0-9a-f]$"
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 5000,
              "default": 1000
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Pagina di URL sitemap",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "segment",
                    "items",
                    "next_cursor"
                  ],
                  "properties": {
                    "segment": {
                      "type": "string",
                      "pattern": "^(competition|team|match|player|news|page|facility)-[0-9a-f]$"
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "kind",
                          "canonical_path",
                          "last_modified"
                        ],
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "competition",
                              "team",
                              "match",
                              "player",
                              "news",
                              "page",
                              "facility"
                            ]
                          },
                          "canonical_path": {
                            "type": "string",
                            "pattern": "^/"
                          },
                          "last_modified": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/tournaments/{tournamentId}/admins": {
      "get": {
        "tags": [
          "admin",
          "role-scopes"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "summary": "Amministratori del torneo (paginati a cursore)",
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "responses": {
          "200": {
            "description": "Pagina di amministratori",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "next_cursor"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "assignment_id",
                          "user_id",
                          "display_name",
                          "email",
                          "role",
                          "tournament_id",
                          "phase_id",
                          "granted_at"
                        ],
                        "properties": {
                          "assignment_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "user_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "display_name": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "email": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "role": {
                            "type": "string",
                            "enum": [
                              "tournament_admin",
                              "group_admin"
                            ]
                          },
                          "tournament_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "phase_id": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uuid"
                          },
                          "granted_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "admin",
          "role-scopes"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "summary": "Nomina un amministratore del torneo (ripetibile: 200 se già nominato)",
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "user_id"
                ],
                "additionalProperties": false,
                "properties": {
                  "user_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                }
              }
            }
          }
        },
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "responses": {
          "200": {
            "description": "Era già amministratore",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "assignment_id",
                    "user_id",
                    "display_name",
                    "email",
                    "role",
                    "tournament_id",
                    "phase_id",
                    "granted_at"
                  ],
                  "properties": {
                    "assignment_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "user_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "display_name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "email": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "tournament_admin",
                        "group_admin"
                      ]
                    },
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "phase_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "granted_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "Nominato",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "assignment_id",
                    "user_id",
                    "display_name",
                    "email",
                    "role",
                    "tournament_id",
                    "phase_id",
                    "granted_at"
                  ],
                  "properties": {
                    "assignment_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "user_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "display_name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "email": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "tournament_admin",
                        "group_admin"
                      ]
                    },
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "phase_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "granted_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/tournaments/{tournamentId}/admins/{assignmentId}": {
      "delete": {
        "tags": [
          "admin",
          "role-scopes"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "summary": "Rimuove un amministratore del torneo",
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "assignmentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "responses": {
          "200": {
            "description": "Rimosso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "assignment_id",
                    "user_id",
                    "display_name",
                    "email",
                    "role",
                    "tournament_id",
                    "phase_id",
                    "granted_at"
                  ],
                  "properties": {
                    "assignment_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "user_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "display_name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "email": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "tournament_admin",
                        "group_admin"
                      ]
                    },
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "phase_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "granted_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/tournaments/{tournamentId}/phases/{phaseId}/admins": {
      "get": {
        "tags": [
          "admin",
          "role-scopes"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "summary": "Amministratori del fase (paginati a cursore)",
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "phaseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "responses": {
          "200": {
            "description": "Pagina di amministratori",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "next_cursor"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "assignment_id",
                          "user_id",
                          "display_name",
                          "email",
                          "role",
                          "tournament_id",
                          "phase_id",
                          "granted_at"
                        ],
                        "properties": {
                          "assignment_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "user_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "display_name": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "email": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "role": {
                            "type": "string",
                            "enum": [
                              "tournament_admin",
                              "group_admin"
                            ]
                          },
                          "tournament_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "phase_id": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uuid"
                          },
                          "granted_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "admin",
          "role-scopes"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "summary": "Nomina un amministratore del fase (ripetibile: 200 se già nominato)",
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "phaseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "user_id"
                ],
                "additionalProperties": false,
                "properties": {
                  "user_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                }
              }
            }
          }
        },
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "responses": {
          "200": {
            "description": "Era già amministratore",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "assignment_id",
                    "user_id",
                    "display_name",
                    "email",
                    "role",
                    "tournament_id",
                    "phase_id",
                    "granted_at"
                  ],
                  "properties": {
                    "assignment_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "user_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "display_name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "email": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "tournament_admin",
                        "group_admin"
                      ]
                    },
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "phase_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "granted_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "Nominato",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "assignment_id",
                    "user_id",
                    "display_name",
                    "email",
                    "role",
                    "tournament_id",
                    "phase_id",
                    "granted_at"
                  ],
                  "properties": {
                    "assignment_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "user_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "display_name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "email": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "tournament_admin",
                        "group_admin"
                      ]
                    },
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "phase_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "granted_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/tournaments/{tournamentId}/phases/{phaseId}/admins/{assignmentId}": {
      "delete": {
        "tags": [
          "admin",
          "role-scopes"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "summary": "Rimuove un amministratore del fase",
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "phaseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "assignmentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "responses": {
          "200": {
            "description": "Rimosso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "assignment_id",
                    "user_id",
                    "display_name",
                    "email",
                    "role",
                    "tournament_id",
                    "phase_id",
                    "granted_at"
                  ],
                  "properties": {
                    "assignment_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "user_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "display_name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "email": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "tournament_admin",
                        "group_admin"
                      ]
                    },
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "phase_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "granted_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/route-usage/routes": {
      "get": {
        "tags": [
          "admin",
          "route-telemetry"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "summary": "Route registrate con ultimo uso e client che le chiamano (paginate a cursore): base delle rimozioni N-10",
        "parameters": [
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 600
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "unused",
                "stale",
                "active"
              ]
            }
          },
          {
            "name": "stale_days",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 400
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Pagina di route",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "next_cursor",
                    "observation"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "route_key",
                          "method",
                          "route",
                          "state",
                          "first_seen_day",
                          "last_seen_day",
                          "count_total",
                          "unattributed_count_total",
                          "unattributed_last_seen_day",
                          "clients"
                        ],
                        "properties": {
                          "route_key": {
                            "type": "string"
                          },
                          "method": {
                            "type": "string"
                          },
                          "route": {
                            "type": "string"
                          },
                          "state": {
                            "type": "string",
                            "enum": [
                              "unused",
                              "stale",
                              "active"
                            ]
                          },
                          "first_seen_day": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date"
                          },
                          "last_seen_day": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date"
                          },
                          "count_total": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "unattributed_count_total": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "unattributed_last_seen_day": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date"
                          },
                          "clients": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "client",
                                "last_seen_day"
                              ],
                              "properties": {
                                "client": {
                                  "type": "string"
                                },
                                "last_seen_day": {
                                  "type": "string",
                                  "format": "date"
                                }
                              }
                            }
                          }
                        }
                      }
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "observation": {
                      "type": "object",
                      "required": [
                        "observed_since_day",
                        "retention_days",
                        "stale_days",
                        "catalog_size"
                      ],
                      "properties": {
                        "observed_since_day": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date"
                        },
                        "retention_days": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "stale_days": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "catalog_size": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/route-usage/days/{day}": {
      "get": {
        "tags": [
          "admin",
          "route-telemetry"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "summary": "Contatori di un giorno UTC per route: status, client, durata, lente, byte",
        "parameters": [
          {
            "name": "day",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 600
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Pagina di contatori del giorno",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "day",
                    "items",
                    "next_cursor",
                    "slow_threshold_ms"
                  ],
                  "properties": {
                    "day": {
                      "type": "string",
                      "format": "date"
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "route_key",
                          "method",
                          "route",
                          "count",
                          "status",
                          "clients",
                          "avg_duration_ms",
                          "max_duration_ms",
                          "slow_count",
                          "bytes_total",
                          "avg_bytes"
                        ],
                        "properties": {
                          "route_key": {
                            "type": "string"
                          },
                          "method": {
                            "type": "string"
                          },
                          "route": {
                            "type": "string"
                          },
                          "count": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "status": {
                            "type": "object",
                            "required": [
                              "2xx",
                              "3xx",
                              "4xx",
                              "5xx"
                            ],
                            "properties": {
                              "2xx": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "3xx": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "4xx": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "5xx": {
                                "type": "integer",
                                "minimum": 0
                              }
                            }
                          },
                          "clients": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "client",
                                "count"
                              ],
                              "properties": {
                                "client": {
                                  "type": "string"
                                },
                                "count": {
                                  "type": "integer",
                                  "minimum": 0
                                }
                              }
                            }
                          },
                          "avg_duration_ms": {
                            "type": [
                              "number",
                              "null"
                            ],
                            "minimum": 0
                          },
                          "max_duration_ms": {
                            "type": [
                              "number",
                              "null"
                            ],
                            "minimum": 0
                          },
                          "slow_count": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "bytes_total": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "avg_bytes": {
                            "type": [
                              "number",
                              "null"
                            ],
                            "minimum": 0
                          }
                        }
                      }
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "slow_threshold_ms": {
                      "type": "integer",
                      "minimum": 1
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/owner-decisions": {
      "get": {
        "tags": [
          "admin",
          "owner-decisions"
        ],
        "summary": "Parametri in attesa di decisione del titolare (registro 208 domande)",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "responses": {
          "200": {
            "description": "Registro",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "counts"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "definition",
                          "resolution"
                        ],
                        "properties": {
                          "definition": {
                            "type": "object",
                            "required": [
                              "key",
                              "group",
                              "questions",
                              "label",
                              "help",
                              "value",
                              "consumers",
                              "gate_while_undecided"
                            ],
                            "properties": {
                              "key": {
                                "type": "string"
                              },
                              "group": {
                                "type": "string",
                                "enum": [
                                  "governance",
                                  "ruoli",
                                  "tesseramento",
                                  "stagioni",
                                  "formati_classifiche",
                                  "calendario",
                                  "distinte_referto",
                                  "disciplina",
                                  "valutatore",
                                  "fanta_regole",
                                  "fanta_mercato_aste",
                                  "fanta_correzioni",
                                  "media_contenuti",
                                  "notifiche",
                                  "operativita_admin",
                                  "economia_dati",
                                  "parametri_gara"
                                ]
                              },
                              "questions": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "pattern": "^Q\\d{3}$"
                                }
                              },
                              "label": {
                                "type": "string"
                              },
                              "help": {
                                "type": "string"
                              },
                              "value": {
                                "type": "object",
                                "required": [
                                  "kind"
                                ],
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "boolean",
                                      "integer",
                                      "decimal",
                                      "choice",
                                      "multi_choice",
                                      "text"
                                    ]
                                  }
                                }
                              },
                              "consumers": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "gate_while_undecided": {
                                "type": "string"
                              }
                            }
                          },
                          "resolution": {
                            "type": "object",
                            "required": [
                              "key",
                              "state",
                              "revision"
                            ],
                            "properties": {
                              "key": {
                                "type": "string"
                              },
                              "state": {
                                "type": "string",
                                "enum": [
                                  "undecided",
                                  "decided"
                                ]
                              },
                              "revision": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "value": {
                                "oneOf": [
                                  {
                                    "type": "boolean"
                                  },
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "array",
                                    "items": {
                                      "type": "string"
                                    }
                                  }
                                ]
                              },
                              "reason": {
                                "type": "string"
                              },
                              "source_reference": {
                                "type": "string"
                              },
                              "decided_at": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "decided_by_user_id": {
                                "type": "string",
                                "format": "uuid"
                              }
                            }
                          }
                        }
                      }
                    },
                    "counts": {
                      "type": "object",
                      "required": [
                        "total",
                        "undecided",
                        "decided"
                      ],
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "undecided": {
                          "type": "integer"
                        },
                        "decided": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/owner-decisions/{key}": {
      "get": {
        "tags": [
          "admin",
          "owner-decisions"
        ],
        "summary": "Un parametro di decisione con il suo stato",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)+$",
              "maxLength": 96
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Parametro",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "definition",
                    "resolution"
                  ],
                  "properties": {
                    "definition": {
                      "type": "object",
                      "required": [
                        "key",
                        "group",
                        "questions",
                        "label",
                        "help",
                        "value",
                        "consumers",
                        "gate_while_undecided"
                      ],
                      "properties": {
                        "key": {
                          "type": "string"
                        },
                        "group": {
                          "type": "string",
                          "enum": [
                            "governance",
                            "ruoli",
                            "tesseramento",
                            "stagioni",
                            "formati_classifiche",
                            "calendario",
                            "distinte_referto",
                            "disciplina",
                            "valutatore",
                            "fanta_regole",
                            "fanta_mercato_aste",
                            "fanta_correzioni",
                            "media_contenuti",
                            "notifiche",
                            "operativita_admin",
                            "economia_dati",
                            "parametri_gara"
                          ]
                        },
                        "questions": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "pattern": "^Q\\d{3}$"
                          }
                        },
                        "label": {
                          "type": "string"
                        },
                        "help": {
                          "type": "string"
                        },
                        "value": {
                          "type": "object",
                          "required": [
                            "kind"
                          ],
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "boolean",
                                "integer",
                                "decimal",
                                "choice",
                                "multi_choice",
                                "text"
                              ]
                            }
                          }
                        },
                        "consumers": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "gate_while_undecided": {
                          "type": "string"
                        }
                      }
                    },
                    "resolution": {
                      "type": "object",
                      "required": [
                        "key",
                        "state",
                        "revision"
                      ],
                      "properties": {
                        "key": {
                          "type": "string"
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "undecided",
                            "decided"
                          ]
                        },
                        "revision": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "value": {
                          "oneOf": [
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "string"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        },
                        "reason": {
                          "type": "string"
                        },
                        "source_reference": {
                          "type": "string"
                        },
                        "decided_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "decided_by_user_id": {
                          "type": "string",
                          "format": "uuid"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "admin",
          "owner-decisions"
        ],
        "summary": "Registra (o riporta a «non deciso» con value null) la risposta del titolare",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)+$",
              "maxLength": 96
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "value",
                  "reason",
                  "source_reference",
                  "expected_revision"
                ],
                "properties": {
                  "value": {
                    "oneOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "string"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 500
                  },
                  "source_reference": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 240
                  },
                  "expected_revision": {
                    "type": "integer",
                    "minimum": 0
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Parametro aggiornato",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "definition",
                    "resolution"
                  ],
                  "properties": {
                    "definition": {
                      "type": "object",
                      "required": [
                        "key",
                        "group",
                        "questions",
                        "label",
                        "help",
                        "value",
                        "consumers",
                        "gate_while_undecided"
                      ],
                      "properties": {
                        "key": {
                          "type": "string"
                        },
                        "group": {
                          "type": "string",
                          "enum": [
                            "governance",
                            "ruoli",
                            "tesseramento",
                            "stagioni",
                            "formati_classifiche",
                            "calendario",
                            "distinte_referto",
                            "disciplina",
                            "valutatore",
                            "fanta_regole",
                            "fanta_mercato_aste",
                            "fanta_correzioni",
                            "media_contenuti",
                            "notifiche",
                            "operativita_admin",
                            "economia_dati",
                            "parametri_gara"
                          ]
                        },
                        "questions": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "pattern": "^Q\\d{3}$"
                          }
                        },
                        "label": {
                          "type": "string"
                        },
                        "help": {
                          "type": "string"
                        },
                        "value": {
                          "type": "object",
                          "required": [
                            "kind"
                          ],
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "boolean",
                                "integer",
                                "decimal",
                                "choice",
                                "multi_choice",
                                "text"
                              ]
                            }
                          }
                        },
                        "consumers": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "gate_while_undecided": {
                          "type": "string"
                        }
                      }
                    },
                    "resolution": {
                      "type": "object",
                      "required": [
                        "key",
                        "state",
                        "revision"
                      ],
                      "properties": {
                        "key": {
                          "type": "string"
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "undecided",
                            "decided"
                          ]
                        },
                        "revision": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "value": {
                          "oneOf": [
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "string"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          ]
                        },
                        "reason": {
                          "type": "string"
                        },
                        "source_reference": {
                          "type": "string"
                        },
                        "decided_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "decided_by_user_id": {
                          "type": "string",
                          "format": "uuid"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/legacy-sync": {
      "get": {
        "tags": [
          "admin",
          "legacy-sync"
        ],
        "summary": "Aggiornamento dal vecchio sito — interruttori, frequenza e ultime esecuzioni di ogni job. Permesso archive_public.manage.",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "responses": {
          "200": {
            "description": "Stato",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "master",
                    "dispatcher",
                    "jobs"
                  ],
                  "properties": {
                    "master": {
                      "type": "object",
                      "required": [
                        "enabled"
                      ],
                      "properties": {
                        "enabled": {
                          "type": "boolean"
                        },
                        "updated_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "updated_by_user_id": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    },
                    "dispatcher": {
                      "oneOf": [
                        {
                          "type": "object",
                          "required": [
                            "environment",
                            "host",
                            "seen_at",
                            "stale"
                          ],
                          "properties": {
                            "environment": {
                              "type": "string",
                              "enum": [
                                "TEST",
                                "PROD"
                              ]
                            },
                            "host": {
                              "type": "string"
                            },
                            "seen_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "stale": {
                              "type": "boolean"
                            }
                          }
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "jobs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "key",
                          "label",
                          "installed",
                          "enabled",
                          "min_interval_minutes",
                          "last_run"
                        ],
                        "properties": {
                          "key": {
                            "type": "string"
                          },
                          "label": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          },
                          "writes": {
                            "type": "boolean"
                          },
                          "timer_label": {
                            "type": "string"
                          },
                          "installed": {
                            "type": "boolean"
                          },
                          "enabled": {
                            "type": "boolean"
                          },
                          "min_interval_minutes": {
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "frequency_label": {
                            "type": "string"
                          },
                          "frequency_choices": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "value": {
                                  "type": [
                                    "integer",
                                    "null"
                                  ]
                                },
                                "label": {
                                  "type": "string"
                                }
                              }
                            }
                          },
                          "next_run_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          },
                          "running": {
                            "type": "boolean"
                          },
                          "control_state": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "enum": [
                              "disabled",
                              "deferred",
                              null
                            ]
                          },
                          "run_requested_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          },
                          "run_pending": {
                            "type": "boolean"
                          },
                          "last_run": {
                            "oneOf": [
                              {
                                "type": "object",
                                "required": [
                                  "started_at",
                                  "finished_at",
                                  "outcome",
                                  "rows_changed",
                                  "changes_detected"
                                ],
                                "properties": {
                                  "started_at": {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  "finished_at": {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  "outcome": {
                                    "type": "string",
                                    "enum": [
                                      "success",
                                      "failure",
                                      "degraded"
                                    ]
                                  },
                                  "rows_changed": {
                                    "type": [
                                      "integer",
                                      "null"
                                    ],
                                    "minimum": 0
                                  },
                                  "changes_detected": {
                                    "type": [
                                      "integer",
                                      "null"
                                    ],
                                    "minimum": 0
                                  },
                                  "error_message": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "counters": {
                                    "type": "object",
                                    "additionalProperties": {
                                      "type": "number"
                                    }
                                  }
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "recent_runs": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "started_at",
                                "finished_at",
                                "outcome",
                                "rows_changed",
                                "changes_detected"
                              ],
                              "properties": {
                                "started_at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "finished_at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "outcome": {
                                  "type": "string",
                                  "enum": [
                                    "success",
                                    "failure",
                                    "degraded"
                                  ]
                                },
                                "rows_changed": {
                                  "type": [
                                    "integer",
                                    "null"
                                  ],
                                  "minimum": 0
                                },
                                "changes_detected": {
                                  "type": [
                                    "integer",
                                    "null"
                                  ],
                                  "minimum": 0
                                },
                                "error_message": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "counters": {
                                  "type": "object",
                                  "additionalProperties": {
                                    "type": "number"
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/legacy-sync/master": {
      "patch": {
        "tags": [
          "admin",
          "legacy-sync"
        ],
        "summary": "Interruttore generale («Spegni tutto» / «Riaccendi»). Audit.",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "enabled"
                ],
                "properties": {
                  "enabled": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Stato aggiornato",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "master",
                    "dispatcher",
                    "jobs"
                  ],
                  "properties": {
                    "master": {
                      "type": "object",
                      "required": [
                        "enabled"
                      ],
                      "properties": {
                        "enabled": {
                          "type": "boolean"
                        },
                        "updated_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "updated_by_user_id": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    },
                    "dispatcher": {
                      "oneOf": [
                        {
                          "type": "object",
                          "required": [
                            "environment",
                            "host",
                            "seen_at",
                            "stale"
                          ],
                          "properties": {
                            "environment": {
                              "type": "string",
                              "enum": [
                                "TEST",
                                "PROD"
                              ]
                            },
                            "host": {
                              "type": "string"
                            },
                            "seen_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "stale": {
                              "type": "boolean"
                            }
                          }
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "jobs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "key",
                          "label",
                          "installed",
                          "enabled",
                          "min_interval_minutes",
                          "last_run"
                        ],
                        "properties": {
                          "key": {
                            "type": "string"
                          },
                          "label": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          },
                          "writes": {
                            "type": "boolean"
                          },
                          "timer_label": {
                            "type": "string"
                          },
                          "installed": {
                            "type": "boolean"
                          },
                          "enabled": {
                            "type": "boolean"
                          },
                          "min_interval_minutes": {
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "frequency_label": {
                            "type": "string"
                          },
                          "frequency_choices": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "value": {
                                  "type": [
                                    "integer",
                                    "null"
                                  ]
                                },
                                "label": {
                                  "type": "string"
                                }
                              }
                            }
                          },
                          "next_run_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          },
                          "running": {
                            "type": "boolean"
                          },
                          "control_state": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "enum": [
                              "disabled",
                              "deferred",
                              null
                            ]
                          },
                          "run_requested_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          },
                          "run_pending": {
                            "type": "boolean"
                          },
                          "last_run": {
                            "oneOf": [
                              {
                                "type": "object",
                                "required": [
                                  "started_at",
                                  "finished_at",
                                  "outcome",
                                  "rows_changed",
                                  "changes_detected"
                                ],
                                "properties": {
                                  "started_at": {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  "finished_at": {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  "outcome": {
                                    "type": "string",
                                    "enum": [
                                      "success",
                                      "failure",
                                      "degraded"
                                    ]
                                  },
                                  "rows_changed": {
                                    "type": [
                                      "integer",
                                      "null"
                                    ],
                                    "minimum": 0
                                  },
                                  "changes_detected": {
                                    "type": [
                                      "integer",
                                      "null"
                                    ],
                                    "minimum": 0
                                  },
                                  "error_message": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "counters": {
                                    "type": "object",
                                    "additionalProperties": {
                                      "type": "number"
                                    }
                                  }
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "recent_runs": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "started_at",
                                "finished_at",
                                "outcome",
                                "rows_changed",
                                "changes_detected"
                              ],
                              "properties": {
                                "started_at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "finished_at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "outcome": {
                                  "type": "string",
                                  "enum": [
                                    "success",
                                    "failure",
                                    "degraded"
                                  ]
                                },
                                "rows_changed": {
                                  "type": [
                                    "integer",
                                    "null"
                                  ],
                                  "minimum": 0
                                },
                                "changes_detected": {
                                  "type": [
                                    "integer",
                                    "null"
                                  ],
                                  "minimum": 0
                                },
                                "error_message": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "counters": {
                                  "type": "object",
                                  "additionalProperties": {
                                    "type": "number"
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/legacy-sync/jobs/{key}": {
      "patch": {
        "tags": [
          "admin",
          "legacy-sync"
        ],
        "summary": "Accende o spegne un job, o ne cambia la frequenza. Audit.",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z][a-z0-9-]{0,62}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "enabled": {
                    "type": "boolean"
                  },
                  "min_interval_minutes": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "enum": [
                      30,
                      60,
                      120,
                      360,
                      720,
                      1440,
                      null
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Stato aggiornato",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "master",
                    "dispatcher",
                    "jobs"
                  ],
                  "properties": {
                    "master": {
                      "type": "object",
                      "required": [
                        "enabled"
                      ],
                      "properties": {
                        "enabled": {
                          "type": "boolean"
                        },
                        "updated_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "updated_by_user_id": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    },
                    "dispatcher": {
                      "oneOf": [
                        {
                          "type": "object",
                          "required": [
                            "environment",
                            "host",
                            "seen_at",
                            "stale"
                          ],
                          "properties": {
                            "environment": {
                              "type": "string",
                              "enum": [
                                "TEST",
                                "PROD"
                              ]
                            },
                            "host": {
                              "type": "string"
                            },
                            "seen_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "stale": {
                              "type": "boolean"
                            }
                          }
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "jobs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "key",
                          "label",
                          "installed",
                          "enabled",
                          "min_interval_minutes",
                          "last_run"
                        ],
                        "properties": {
                          "key": {
                            "type": "string"
                          },
                          "label": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          },
                          "writes": {
                            "type": "boolean"
                          },
                          "timer_label": {
                            "type": "string"
                          },
                          "installed": {
                            "type": "boolean"
                          },
                          "enabled": {
                            "type": "boolean"
                          },
                          "min_interval_minutes": {
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "frequency_label": {
                            "type": "string"
                          },
                          "frequency_choices": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "value": {
                                  "type": [
                                    "integer",
                                    "null"
                                  ]
                                },
                                "label": {
                                  "type": "string"
                                }
                              }
                            }
                          },
                          "next_run_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          },
                          "running": {
                            "type": "boolean"
                          },
                          "control_state": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "enum": [
                              "disabled",
                              "deferred",
                              null
                            ]
                          },
                          "run_requested_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          },
                          "run_pending": {
                            "type": "boolean"
                          },
                          "last_run": {
                            "oneOf": [
                              {
                                "type": "object",
                                "required": [
                                  "started_at",
                                  "finished_at",
                                  "outcome",
                                  "rows_changed",
                                  "changes_detected"
                                ],
                                "properties": {
                                  "started_at": {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  "finished_at": {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  "outcome": {
                                    "type": "string",
                                    "enum": [
                                      "success",
                                      "failure",
                                      "degraded"
                                    ]
                                  },
                                  "rows_changed": {
                                    "type": [
                                      "integer",
                                      "null"
                                    ],
                                    "minimum": 0
                                  },
                                  "changes_detected": {
                                    "type": [
                                      "integer",
                                      "null"
                                    ],
                                    "minimum": 0
                                  },
                                  "error_message": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "counters": {
                                    "type": "object",
                                    "additionalProperties": {
                                      "type": "number"
                                    }
                                  }
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "recent_runs": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "started_at",
                                "finished_at",
                                "outcome",
                                "rows_changed",
                                "changes_detected"
                              ],
                              "properties": {
                                "started_at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "finished_at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "outcome": {
                                  "type": "string",
                                  "enum": [
                                    "success",
                                    "failure",
                                    "degraded"
                                  ]
                                },
                                "rows_changed": {
                                  "type": [
                                    "integer",
                                    "null"
                                  ],
                                  "minimum": 0
                                },
                                "changes_detected": {
                                  "type": [
                                    "integer",
                                    "null"
                                  ],
                                  "minimum": 0
                                },
                                "error_message": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "counters": {
                                  "type": "object",
                                  "additionalProperties": {
                                    "type": "number"
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/legacy-sync/jobs/{key}/run-now": {
      "post": {
        "tags": [
          "admin",
          "legacy-sync"
        ],
        "summary": "«Esegui ora»: il job parte entro un minuto, anche se la frequenza scelta non è ancora trascorsa. Rifiutato (409) se il job o l’interruttore generale sono spenti, o se il job non è installato su questo ambiente. Audit.",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z][a-z0-9-]{0,62}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Richiesta registrata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "master",
                    "dispatcher",
                    "jobs"
                  ],
                  "properties": {
                    "master": {
                      "type": "object",
                      "required": [
                        "enabled"
                      ],
                      "properties": {
                        "enabled": {
                          "type": "boolean"
                        },
                        "updated_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "updated_by_user_id": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    },
                    "dispatcher": {
                      "oneOf": [
                        {
                          "type": "object",
                          "required": [
                            "environment",
                            "host",
                            "seen_at",
                            "stale"
                          ],
                          "properties": {
                            "environment": {
                              "type": "string",
                              "enum": [
                                "TEST",
                                "PROD"
                              ]
                            },
                            "host": {
                              "type": "string"
                            },
                            "seen_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "stale": {
                              "type": "boolean"
                            }
                          }
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "jobs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "key",
                          "label",
                          "installed",
                          "enabled",
                          "min_interval_minutes",
                          "last_run"
                        ],
                        "properties": {
                          "key": {
                            "type": "string"
                          },
                          "label": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          },
                          "writes": {
                            "type": "boolean"
                          },
                          "timer_label": {
                            "type": "string"
                          },
                          "installed": {
                            "type": "boolean"
                          },
                          "enabled": {
                            "type": "boolean"
                          },
                          "min_interval_minutes": {
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "frequency_label": {
                            "type": "string"
                          },
                          "frequency_choices": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "value": {
                                  "type": [
                                    "integer",
                                    "null"
                                  ]
                                },
                                "label": {
                                  "type": "string"
                                }
                              }
                            }
                          },
                          "next_run_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          },
                          "running": {
                            "type": "boolean"
                          },
                          "control_state": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "enum": [
                              "disabled",
                              "deferred",
                              null
                            ]
                          },
                          "run_requested_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          },
                          "run_pending": {
                            "type": "boolean"
                          },
                          "last_run": {
                            "oneOf": [
                              {
                                "type": "object",
                                "required": [
                                  "started_at",
                                  "finished_at",
                                  "outcome",
                                  "rows_changed",
                                  "changes_detected"
                                ],
                                "properties": {
                                  "started_at": {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  "finished_at": {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  "outcome": {
                                    "type": "string",
                                    "enum": [
                                      "success",
                                      "failure",
                                      "degraded"
                                    ]
                                  },
                                  "rows_changed": {
                                    "type": [
                                      "integer",
                                      "null"
                                    ],
                                    "minimum": 0
                                  },
                                  "changes_detected": {
                                    "type": [
                                      "integer",
                                      "null"
                                    ],
                                    "minimum": 0
                                  },
                                  "error_message": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "counters": {
                                    "type": "object",
                                    "additionalProperties": {
                                      "type": "number"
                                    }
                                  }
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "recent_runs": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "started_at",
                                "finished_at",
                                "outcome",
                                "rows_changed",
                                "changes_detected"
                              ],
                              "properties": {
                                "started_at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "finished_at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "outcome": {
                                  "type": "string",
                                  "enum": [
                                    "success",
                                    "failure",
                                    "degraded"
                                  ]
                                },
                                "rows_changed": {
                                  "type": [
                                    "integer",
                                    "null"
                                  ],
                                  "minimum": 0
                                },
                                "changes_detected": {
                                  "type": [
                                    "integer",
                                    "null"
                                  ],
                                  "minimum": 0
                                },
                                "error_message": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "counters": {
                                  "type": "object",
                                  "additionalProperties": {
                                    "type": "number"
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/legacy-sync/dispatch": {
      "post": {
        "tags": [
          "admin",
          "legacy-sync"
        ],
        "summary": "Chiamata del dispatcher del VPS (ogni minuto): riporta i job installati e le esecuzioni concluse (solo conteggi), riceve gli interruttori e i job da avviare subito. Non scrive dati di dominio.",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_scoped",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "environment",
                  "host",
                  "installed",
                  "job_states",
                  "runs"
                ],
                "properties": {
                  "environment": {
                    "type": "string",
                    "enum": [
                      "TEST",
                      "PROD"
                    ]
                  },
                  "host": {
                    "type": "string"
                  },
                  "installed": {
                    "type": "array",
                    "items": {
                      "type": "object"
                    }
                  },
                  "job_states": {
                    "type": "array",
                    "items": {
                      "type": "object"
                    }
                  },
                  "runs": {
                    "type": "array",
                    "items": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Interruttori",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "control",
                    "start",
                    "runs_recorded"
                  ],
                  "properties": {
                    "control": {
                      "type": "object",
                      "required": [
                        "master_enabled",
                        "jobs",
                        "run_now"
                      ],
                      "properties": {
                        "master_enabled": {
                          "type": "boolean"
                        },
                        "jobs": {
                          "type": "object"
                        },
                        "run_now": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    },
                    "start": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "runs_recorded": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/leagues": {
      "get": {
        "tags": [
          "admin",
          "tenant-sites"
        ],
        "summary": "Leghe della piattaforma e i loro domini. Solo super admin.",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "cross_tenant_platform",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "responses": {
          "200": {
            "description": "Leghe",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "target",
                    "host_routing_ready"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "tenant_id",
                          "slug",
                          "display_name",
                          "sport_format",
                          "domains"
                        ],
                        "properties": {
                          "tenant_id": {
                            "type": "string"
                          },
                          "slug": {
                            "type": "string"
                          },
                          "display_name": {
                            "type": "string"
                          },
                          "is_active": {
                            "type": "boolean"
                          },
                          "is_platform_default": {
                            "type": "boolean"
                          },
                          "sport_format": {
                            "type": "string",
                            "enum": [
                              "calcio_a_5",
                              "calcio_a_7",
                              "calcio_a_8",
                              "calcio_a_11"
                            ]
                          },
                          "sport_format_label": {
                            "type": "string"
                          },
                          "site_key_ready": {
                            "type": "boolean"
                          },
                          "provisional_hostname": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "domains": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "id",
                                "tenant_id",
                                "hostname",
                                "status",
                                "dns_records",
                                "status_label"
                              ],
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "tenant_id": {
                                  "type": "string"
                                },
                                "hostname": {
                                  "type": "string"
                                },
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "pending_dns",
                                    "dns_ok",
                                    "approved",
                                    "active",
                                    "failed",
                                    "removed"
                                  ]
                                },
                                "status_label": {
                                  "type": "string"
                                },
                                "dns": {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "checked_at": {
                                          "type": "string"
                                        },
                                        "ok": {
                                          "type": "boolean"
                                        },
                                        "ipv4": {
                                          "type": "array",
                                          "items": {
                                            "type": "string"
                                          }
                                        },
                                        "ipv6": {
                                          "type": "array",
                                          "items": {
                                            "type": "string"
                                          }
                                        },
                                        "problem": {
                                          "type": [
                                            "string",
                                            "null"
                                          ]
                                        }
                                      }
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "dns_records": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "A",
                                          "AAAA"
                                        ]
                                      },
                                      "name": {
                                        "type": "string"
                                      },
                                      "value": {
                                        "type": "string"
                                      }
                                    }
                                  }
                                },
                                "approved_at": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "activated_at": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "job_message": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                }
                              }
                            }
                          }
                        }
                      }
                    },
                    "target": {
                      "type": "object",
                      "properties": {
                        "ipv4": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "ipv6": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "host_routing_ready": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "admin",
          "tenant-sites"
        ],
        "summary": "Crea una nuova lega (tenant) con città, marchio, formato, primo amministratore e chiave del sito. Solo super admin. Audit.",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "cross_tenant_platform",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "display_name",
                  "short_name",
                  "slug",
                  "sport_format",
                  "primary_color",
                  "logo_url",
                  "city_name",
                  "admin_email",
                  "hostname"
                ],
                "properties": {
                  "display_name": {
                    "type": "string"
                  },
                  "short_name": {
                    "type": "string"
                  },
                  "slug": {
                    "type": "string"
                  },
                  "sport_format": {
                    "type": "string",
                    "enum": [
                      "calcio_a_5",
                      "calcio_a_7",
                      "calcio_a_8",
                      "calcio_a_11"
                    ]
                  },
                  "primary_color": {
                    "type": "string"
                  },
                  "logo_url": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "city_name": {
                    "type": "string"
                  },
                  "admin_email": {
                    "type": "string",
                    "format": "email"
                  },
                  "hostname": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Lega creata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "league": {
                      "type": "object",
                      "required": [
                        "tenant_id",
                        "slug",
                        "display_name",
                        "sport_format",
                        "domains"
                      ],
                      "properties": {
                        "tenant_id": {
                          "type": "string"
                        },
                        "slug": {
                          "type": "string"
                        },
                        "display_name": {
                          "type": "string"
                        },
                        "is_active": {
                          "type": "boolean"
                        },
                        "is_platform_default": {
                          "type": "boolean"
                        },
                        "sport_format": {
                          "type": "string",
                          "enum": [
                            "calcio_a_5",
                            "calcio_a_7",
                            "calcio_a_8",
                            "calcio_a_11"
                          ]
                        },
                        "sport_format_label": {
                          "type": "string"
                        },
                        "site_key_ready": {
                          "type": "boolean"
                        },
                        "provisional_hostname": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "domains": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "id",
                              "tenant_id",
                              "hostname",
                              "status",
                              "dns_records",
                              "status_label"
                            ],
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "tenant_id": {
                                "type": "string"
                              },
                              "hostname": {
                                "type": "string"
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "pending_dns",
                                  "dns_ok",
                                  "approved",
                                  "active",
                                  "failed",
                                  "removed"
                                ]
                              },
                              "status_label": {
                                "type": "string"
                              },
                              "dns": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "checked_at": {
                                        "type": "string"
                                      },
                                      "ok": {
                                        "type": "boolean"
                                      },
                                      "ipv4": {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      },
                                      "ipv6": {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      },
                                      "problem": {
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      }
                                    }
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "dns_records": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "type": "string",
                                      "enum": [
                                        "A",
                                        "AAAA"
                                      ]
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "value": {
                                      "type": "string"
                                    }
                                  }
                                }
                              },
                              "approved_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "activated_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "job_message": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            }
                          }
                        }
                      }
                    },
                    "admin": {
                      "type": "object",
                      "properties": {
                        "email": {
                          "type": "string"
                        },
                        "mode": {
                          "type": "string",
                          "enum": [
                            "granted",
                            "invited"
                          ]
                        },
                        "invite_url": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/leagues/{tenant_id}/domains": {
      "post": {
        "tags": [
          "admin",
          "tenant-sites"
        ],
        "summary": "Aggiunge un dominio alla lega (stato «da verificare»). Audit.",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "cross_tenant_platform",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "tenant_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "hostname"
                ],
                "properties": {
                  "hostname": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Dominio",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "tenant_id",
                    "hostname",
                    "status",
                    "dns_records",
                    "status_label"
                  ],
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "tenant_id": {
                      "type": "string"
                    },
                    "hostname": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending_dns",
                        "dns_ok",
                        "approved",
                        "active",
                        "failed",
                        "removed"
                      ]
                    },
                    "status_label": {
                      "type": "string"
                    },
                    "dns": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "checked_at": {
                              "type": "string"
                            },
                            "ok": {
                              "type": "boolean"
                            },
                            "ipv4": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "ipv6": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "problem": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "dns_records": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "A",
                              "AAAA"
                            ]
                          },
                          "name": {
                            "type": "string"
                          },
                          "value": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "approved_at": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "activated_at": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "job_message": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/leagues/{tenant_id}/domains/{domain_id}/check": {
      "post": {
        "tags": [
          "admin",
          "tenant-sites"
        ],
        "summary": "Controlla ora i record DNS del dominio. Audit.",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "cross_tenant_platform",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "tenant_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "domain_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Dominio",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "tenant_id",
                    "hostname",
                    "status",
                    "dns_records",
                    "status_label"
                  ],
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "tenant_id": {
                      "type": "string"
                    },
                    "hostname": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending_dns",
                        "dns_ok",
                        "approved",
                        "active",
                        "failed",
                        "removed"
                      ]
                    },
                    "status_label": {
                      "type": "string"
                    },
                    "dns": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "checked_at": {
                              "type": "string"
                            },
                            "ok": {
                              "type": "boolean"
                            },
                            "ipv4": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "ipv6": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "problem": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "dns_records": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "A",
                              "AAAA"
                            ]
                          },
                          "name": {
                            "type": "string"
                          },
                          "value": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "approved_at": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "activated_at": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "job_message": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/leagues/{tenant_id}/domains/{domain_id}/approve": {
      "post": {
        "tags": [
          "admin",
          "tenant-sites"
        ],
        "summary": "Approva il dominio: il lavoro del server crea il sito e il certificato HTTPS. Richiede DNS corretti. Audit.",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "cross_tenant_platform",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "tenant_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "domain_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Dominio",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "tenant_id",
                    "hostname",
                    "status",
                    "dns_records",
                    "status_label"
                  ],
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "tenant_id": {
                      "type": "string"
                    },
                    "hostname": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending_dns",
                        "dns_ok",
                        "approved",
                        "active",
                        "failed",
                        "removed"
                      ]
                    },
                    "status_label": {
                      "type": "string"
                    },
                    "dns": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "checked_at": {
                              "type": "string"
                            },
                            "ok": {
                              "type": "boolean"
                            },
                            "ipv4": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "ipv6": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "problem": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "dns_records": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "A",
                              "AAAA"
                            ]
                          },
                          "name": {
                            "type": "string"
                          },
                          "value": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "approved_at": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "activated_at": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "job_message": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/leagues/{tenant_id}/domains/{domain_id}/remove": {
      "post": {
        "tags": [
          "admin",
          "tenant-sites"
        ],
        "summary": "Scollega il dominio: il lavoro del server rimuove il sito. Audit.",
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "cross_tenant_platform",
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "parameters": [
          {
            "name": "tenant_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "domain_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Dominio",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "tenant_id",
                    "hostname",
                    "status",
                    "dns_records",
                    "status_label"
                  ],
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "tenant_id": {
                      "type": "string"
                    },
                    "hostname": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending_dns",
                        "dns_ok",
                        "approved",
                        "active",
                        "failed",
                        "removed"
                      ]
                    },
                    "status_label": {
                      "type": "string"
                    },
                    "dns": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "checked_at": {
                              "type": "string"
                            },
                            "ok": {
                              "type": "boolean"
                            },
                            "ipv4": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "ipv6": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "problem": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "dns_records": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "A",
                              "AAAA"
                            ]
                          },
                          "name": {
                            "type": "string"
                          },
                          "value": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "approved_at": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "activated_at": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "job_message": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/sites/resolve": {
      "get": {
        "tags": [
          "public",
          "tenant-sites"
        ],
        "summary": "A quale lega appartiene un dominio attivo. Pubblico, senza chiave: lo usa il sito web per scegliere la lega dalla richiesta.",
        "security": [],
        "x-tenant-scope": "public",
        "x-privacy-classification": "public",
        "x-rate-limit-tier": "public_widget",
        "x-audit-required": false,
        "parameters": [
          {
            "name": "host",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Lega del dominio",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "tenant_id",
                    "slug",
                    "display_name",
                    "hostname"
                  ],
                  "properties": {
                    "tenant_id": {
                      "type": "string"
                    },
                    "slug": {
                      "type": "string"
                    },
                    "display_name": {
                      "type": "string"
                    },
                    "hostname": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Errore",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/me/official-designations/v2": {
      "get": {
        "summary": "List server-authoritative official assignment cards with scope and honest gaps",
        "tags": [
          "matches",
          "official-workflow"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Official assignment cards with evaluation_authority",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "evaluation_authority"
                        ],
                        "properties": {
                          "evaluation_authority": {
                            "$ref": "#/components/schemas/EvaluationAuthorityV2"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/matches/{matchId}/sporting-check-in": {
      "get": {
        "summary": "Read the sporting presence dossier without reusing fan QR check-in",
        "tags": [
          "matches",
          "official-workflow"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sporting check-in dossier and server-side capability reasons",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": false,
        "x-privacy-classification": "sensitive_pii"
      }
    },
    "/admin/matches/{matchId}/sporting-check-in": {
      "get": {
        "summary": "Read the sporting presence dossier from the admin cockpit",
        "tags": [
          "admin",
          "matches",
          "official-workflow"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Admin sporting check-in dossier",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "sensitive_pii",
        "x-admin-cockpit-required": true
      }
    },
    "/matches/{matchId}/official-snapshots": {
      "post": {
        "summary": "Issue an expiring match-scoped snapshot for encrypted cold-restart recovery",
        "tags": [
          "matches",
          "official-workflow"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "known_snapshot_id": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "known_event_sequence": {
                    "oneOf": [
                      {
                        "type": "integer",
                        "minimum": 0
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "idempotency_key": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 200
                  }
                },
                "required": [
                  "idempotency_key"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Snapshot and causal reconciliation state",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "503": {
            "description": "Retention policy is not configured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "sensitive_mutation",
        "x-audit-required": true,
        "x-privacy-classification": "sensitive_pii"
      }
    },
    "/matches/{matchId}/official-terminal-actions/reviews": {
      "post": {
        "summary": "Prepare a short-lived review for a terminal period or match action",
        "tags": [
          "matches",
          "official-workflow"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "snapshot_id",
                  "snapshot_content_hash",
                  "action",
                  "period",
                  "minute",
                  "idempotency_key"
                ],
                "properties": {
                  "snapshot_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "snapshot_content_hash": {
                    "type": "string",
                    "minLength": 64,
                    "maxLength": 64
                  },
                  "action": {
                    "type": "string",
                    "enum": [
                      "period_end",
                      "match_end"
                    ]
                  },
                  "period": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "minute": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "idempotency_key": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 200
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Terminal action review",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "sensitive_mutation",
        "x-audit-required": true,
        "x-privacy-classification": "sensitive_pii"
      }
    },
    "/matches/{matchId}/official-terminal-actions/reviews/{reviewId}/commit": {
      "post": {
        "summary": "Commit a reviewed terminal action under lock with an idempotent receipt",
        "tags": [
          "matches",
          "official-workflow"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "reviewId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "review_hash",
                  "idempotency_key"
                ],
                "properties": {
                  "review_hash": {
                    "type": "string",
                    "minLength": 64,
                    "maxLength": 64
                  },
                  "idempotency_key": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 200
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Accepted terminal action receipt",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "409": {
            "description": "Review stale or payload conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "sensitive_mutation",
        "x-audit-required": true,
        "x-privacy-classification": "sensitive_pii"
      }
    },
    "/matches/{matchId}/official-workflow/config": {
      "get": {
        "summary": "Read the server-driven official matchday configuration",
        "tags": [
          "matches",
          "official-workflow"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Official workflow configuration",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/competitions/{competitionId}/official-workflow-config/revisions": {
      "post": {
        "summary": "Publish an append-only competition official-workflow override",
        "tags": [
          "admin",
          "official-workflow"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "competitionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "checklist",
                  "role_capabilities",
                  "owner_decision_reference",
                  "idempotency_key"
                ],
                "properties": {
                  "checklist": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 64,
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "id",
                        "label",
                        "description",
                        "owner",
                        "completion_criteria",
                        "severity",
                        "evidence_required",
                        "enabled"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80
                        },
                        "label": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 160
                        },
                        "description": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 1000
                        },
                        "owner": {
                          "type": "string",
                          "enum": [
                            "home_team",
                            "away_team",
                            "assigned_official",
                            "secretariat"
                          ]
                        },
                        "completion_criteria": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 1000
                        },
                        "severity": {
                          "type": "string",
                          "enum": [
                            "warning",
                            "requires_acknowledgement",
                            "hard_stop"
                          ]
                        },
                        "evidence_required": {
                          "type": "boolean"
                        },
                        "enabled": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "role_capabilities": {
                    "type": "object",
                    "required": [
                      "referee",
                      "assistant_referee",
                      "scorer",
                      "evaluator",
                      "media_operator"
                    ],
                    "properties": {
                      "referee": {
                        "type": "object",
                        "required": [
                          "read_workflow_config",
                          "record_pre_match_check",
                          "record_live_event",
                          "review_official_dossier",
                          "sign_report"
                        ],
                        "properties": {
                          "read_workflow_config": {
                            "oneOf": [
                              {
                                "type": "object",
                                "required": [
                                  "state",
                                  "source"
                                ],
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "enabled"
                                    ]
                                  },
                                  "source": {
                                    "type": "string",
                                    "enum": [
                                      "owner_decision",
                                      "competition_override"
                                    ]
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "required": [
                                  "state",
                                  "reason"
                                ],
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "disabled"
                                    ]
                                  },
                                  "reason": {
                                    "type": "string",
                                    "enum": [
                                      "owner_input_required",
                                      "not_applicable",
                                      "amendment_policy_not_configured"
                                    ]
                                  }
                                }
                              }
                            ]
                          },
                          "record_pre_match_check": {
                            "oneOf": [
                              {
                                "type": "object",
                                "required": [
                                  "state",
                                  "source"
                                ],
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "enabled"
                                    ]
                                  },
                                  "source": {
                                    "type": "string",
                                    "enum": [
                                      "owner_decision",
                                      "competition_override"
                                    ]
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "required": [
                                  "state",
                                  "reason"
                                ],
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "disabled"
                                    ]
                                  },
                                  "reason": {
                                    "type": "string",
                                    "enum": [
                                      "owner_input_required",
                                      "not_applicable",
                                      "amendment_policy_not_configured"
                                    ]
                                  }
                                }
                              }
                            ]
                          },
                          "record_live_event": {
                            "oneOf": [
                              {
                                "type": "object",
                                "required": [
                                  "state",
                                  "source"
                                ],
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "enabled"
                                    ]
                                  },
                                  "source": {
                                    "type": "string",
                                    "enum": [
                                      "owner_decision",
                                      "competition_override"
                                    ]
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "required": [
                                  "state",
                                  "reason"
                                ],
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "disabled"
                                    ]
                                  },
                                  "reason": {
                                    "type": "string",
                                    "enum": [
                                      "owner_input_required",
                                      "not_applicable",
                                      "amendment_policy_not_configured"
                                    ]
                                  }
                                }
                              }
                            ]
                          },
                          "review_official_dossier": {
                            "oneOf": [
                              {
                                "type": "object",
                                "required": [
                                  "state",
                                  "source"
                                ],
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "enabled"
                                    ]
                                  },
                                  "source": {
                                    "type": "string",
                                    "enum": [
                                      "owner_decision",
                                      "competition_override"
                                    ]
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "required": [
                                  "state",
                                  "reason"
                                ],
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "disabled"
                                    ]
                                  },
                                  "reason": {
                                    "type": "string",
                                    "enum": [
                                      "owner_input_required",
                                      "not_applicable",
                                      "amendment_policy_not_configured"
                                    ]
                                  }
                                }
                              }
                            ]
                          },
                          "sign_report": {
                            "oneOf": [
                              {
                                "type": "object",
                                "required": [
                                  "state",
                                  "source"
                                ],
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "enabled"
                                    ]
                                  },
                                  "source": {
                                    "type": "string",
                                    "enum": [
                                      "owner_decision",
                                      "competition_override"
                                    ]
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "required": [
                                  "state",
                                  "reason"
                                ],
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "disabled"
                                    ]
                                  },
                                  "reason": {
                                    "type": "string",
                                    "enum": [
                                      "owner_input_required",
                                      "not_applicable",
                                      "amendment_policy_not_configured"
                                    ]
                                  }
                                }
                              }
                            ]
                          },
                          "amend_accepted_event": {
                            "oneOf": [
                              {
                                "type": "object",
                                "required": [
                                  "state",
                                  "source"
                                ],
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "enabled"
                                    ]
                                  },
                                  "source": {
                                    "type": "string",
                                    "enum": [
                                      "owner_decision",
                                      "competition_override"
                                    ]
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "required": [
                                  "state",
                                  "reason"
                                ],
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "disabled"
                                    ]
                                  },
                                  "reason": {
                                    "type": "string",
                                    "enum": [
                                      "owner_input_required",
                                      "not_applicable",
                                      "amendment_policy_not_configured"
                                    ]
                                  }
                                }
                              }
                            ]
                          }
                        }
                      },
                      "assistant_referee": {
                        "type": "object",
                        "required": [
                          "read_workflow_config",
                          "record_pre_match_check",
                          "record_live_event",
                          "review_official_dossier",
                          "sign_report"
                        ],
                        "properties": {
                          "read_workflow_config": {
                            "oneOf": [
                              {
                                "type": "object",
                                "required": [
                                  "state",
                                  "source"
                                ],
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "enabled"
                                    ]
                                  },
                                  "source": {
                                    "type": "string",
                                    "enum": [
                                      "owner_decision",
                                      "competition_override"
                                    ]
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "required": [
                                  "state",
                                  "reason"
                                ],
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "disabled"
                                    ]
                                  },
                                  "reason": {
                                    "type": "string",
                                    "enum": [
                                      "owner_input_required",
                                      "not_applicable",
                                      "amendment_policy_not_configured"
                                    ]
                                  }
                                }
                              }
                            ]
                          },
                          "record_pre_match_check": {
                            "oneOf": [
                              {
                                "type": "object",
                                "required": [
                                  "state",
                                  "source"
                                ],
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "enabled"
                                    ]
                                  },
                                  "source": {
                                    "type": "string",
                                    "enum": [
                                      "owner_decision",
                                      "competition_override"
                                    ]
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "required": [
                                  "state",
                                  "reason"
                                ],
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "disabled"
                                    ]
                                  },
                                  "reason": {
                                    "type": "string",
                                    "enum": [
                                      "owner_input_required",
                                      "not_applicable",
                                      "amendment_policy_not_configured"
                                    ]
                                  }
                                }
                              }
                            ]
                          },
                          "record_live_event": {
                            "oneOf": [
                              {
                                "type": "object",
                                "required": [
                                  "state",
                                  "source"
                                ],
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "enabled"
                                    ]
                                  },
                                  "source": {
                                    "type": "string",
                                    "enum": [
                                      "owner_decision",
                                      "competition_override"
                                    ]
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "required": [
                                  "state",
                                  "reason"
                                ],
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "disabled"
                                    ]
                                  },
                                  "reason": {
                                    "type": "string",
                                    "enum": [
                                      "owner_input_required",
                                      "not_applicable",
                                      "amendment_policy_not_configured"
                                    ]
                                  }
                                }
                              }
                            ]
                          },
                          "review_official_dossier": {
                            "oneOf": [
                              {
                                "type": "object",
                                "required": [
                                  "state",
                                  "source"
                                ],
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "enabled"
                                    ]
                                  },
                                  "source": {
                                    "type": "string",
                                    "enum": [
                                      "owner_decision",
                                      "competition_override"
                                    ]
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "required": [
                                  "state",
                                  "reason"
                                ],
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "disabled"
                                    ]
                                  },
                                  "reason": {
                                    "type": "string",
                                    "enum": [
                                      "owner_input_required",
                                      "not_applicable",
                                      "amendment_policy_not_configured"
                                    ]
                                  }
                                }
                              }
                            ]
                          },
                          "sign_report": {
                            "oneOf": [
                              {
                                "type": "object",
                                "required": [
                                  "state",
                                  "source"
                                ],
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "enabled"
                                    ]
                                  },
                                  "source": {
                                    "type": "string",
                                    "enum": [
                                      "owner_decision",
                                      "competition_override"
                                    ]
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "required": [
                                  "state",
                                  "reason"
                                ],
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "disabled"
                                    ]
                                  },
                                  "reason": {
                                    "type": "string",
                                    "enum": [
                                      "owner_input_required",
                                      "not_applicable",
                                      "amendment_policy_not_configured"
                                    ]
                                  }
                                }
                              }
                            ]
                          },
                          "amend_accepted_event": {
                            "oneOf": [
                              {
                                "type": "object",
                                "required": [
                                  "state",
                                  "source"
                                ],
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "enabled"
                                    ]
                                  },
                                  "source": {
                                    "type": "string",
                                    "enum": [
                                      "owner_decision",
                                      "competition_override"
                                    ]
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "required": [
                                  "state",
                                  "reason"
                                ],
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "disabled"
                                    ]
                                  },
                                  "reason": {
                                    "type": "string",
                                    "enum": [
                                      "owner_input_required",
                                      "not_applicable",
                                      "amendment_policy_not_configured"
                                    ]
                                  }
                                }
                              }
                            ]
                          }
                        }
                      },
                      "scorer": {
                        "type": "object",
                        "required": [
                          "read_workflow_config",
                          "record_pre_match_check",
                          "record_live_event",
                          "review_official_dossier",
                          "sign_report"
                        ],
                        "properties": {
                          "read_workflow_config": {
                            "oneOf": [
                              {
                                "type": "object",
                                "required": [
                                  "state",
                                  "source"
                                ],
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "enabled"
                                    ]
                                  },
                                  "source": {
                                    "type": "string",
                                    "enum": [
                                      "owner_decision",
                                      "competition_override"
                                    ]
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "required": [
                                  "state",
                                  "reason"
                                ],
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "disabled"
                                    ]
                                  },
                                  "reason": {
                                    "type": "string",
                                    "enum": [
                                      "owner_input_required",
                                      "not_applicable",
                                      "amendment_policy_not_configured"
                                    ]
                                  }
                                }
                              }
                            ]
                          },
                          "record_pre_match_check": {
                            "oneOf": [
                              {
                                "type": "object",
                                "required": [
                                  "state",
                                  "source"
                                ],
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "enabled"
                                    ]
                                  },
                                  "source": {
                                    "type": "string",
                                    "enum": [
                                      "owner_decision",
                                      "competition_override"
                                    ]
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "required": [
                                  "state",
                                  "reason"
                                ],
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "disabled"
                                    ]
                                  },
                                  "reason": {
                                    "type": "string",
                                    "enum": [
                                      "owner_input_required",
                                      "not_applicable",
                                      "amendment_policy_not_configured"
                                    ]
                                  }
                                }
                              }
                            ]
                          },
                          "record_live_event": {
                            "oneOf": [
                              {
                                "type": "object",
                                "required": [
                                  "state",
                                  "source"
                                ],
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "enabled"
                                    ]
                                  },
                                  "source": {
                                    "type": "string",
                                    "enum": [
                                      "owner_decision",
                                      "competition_override"
                                    ]
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "required": [
                                  "state",
                                  "reason"
                                ],
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "disabled"
                                    ]
                                  },
                                  "reason": {
                                    "type": "string",
                                    "enum": [
                                      "owner_input_required",
                                      "not_applicable",
                                      "amendment_policy_not_configured"
                                    ]
                                  }
                                }
                              }
                            ]
                          },
                          "review_official_dossier": {
                            "oneOf": [
                              {
                                "type": "object",
                                "required": [
                                  "state",
                                  "source"
                                ],
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "enabled"
                                    ]
                                  },
                                  "source": {
                                    "type": "string",
                                    "enum": [
                                      "owner_decision",
                                      "competition_override"
                                    ]
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "required": [
                                  "state",
                                  "reason"
                                ],
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "disabled"
                                    ]
                                  },
                                  "reason": {
                                    "type": "string",
                                    "enum": [
                                      "owner_input_required",
                                      "not_applicable",
                                      "amendment_policy_not_configured"
                                    ]
                                  }
                                }
                              }
                            ]
                          },
                          "sign_report": {
                            "oneOf": [
                              {
                                "type": "object",
                                "required": [
                                  "state",
                                  "source"
                                ],
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "enabled"
                                    ]
                                  },
                                  "source": {
                                    "type": "string",
                                    "enum": [
                                      "owner_decision",
                                      "competition_override"
                                    ]
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "required": [
                                  "state",
                                  "reason"
                                ],
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "disabled"
                                    ]
                                  },
                                  "reason": {
                                    "type": "string",
                                    "enum": [
                                      "owner_input_required",
                                      "not_applicable",
                                      "amendment_policy_not_configured"
                                    ]
                                  }
                                }
                              }
                            ]
                          },
                          "amend_accepted_event": {
                            "oneOf": [
                              {
                                "type": "object",
                                "required": [
                                  "state",
                                  "source"
                                ],
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "enabled"
                                    ]
                                  },
                                  "source": {
                                    "type": "string",
                                    "enum": [
                                      "owner_decision",
                                      "competition_override"
                                    ]
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "required": [
                                  "state",
                                  "reason"
                                ],
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "disabled"
                                    ]
                                  },
                                  "reason": {
                                    "type": "string",
                                    "enum": [
                                      "owner_input_required",
                                      "not_applicable",
                                      "amendment_policy_not_configured"
                                    ]
                                  }
                                }
                              }
                            ]
                          }
                        }
                      },
                      "evaluator": {
                        "type": "object",
                        "required": [
                          "read_workflow_config",
                          "record_pre_match_check",
                          "record_live_event",
                          "review_official_dossier",
                          "sign_report"
                        ],
                        "properties": {
                          "read_workflow_config": {
                            "oneOf": [
                              {
                                "type": "object",
                                "required": [
                                  "state",
                                  "source"
                                ],
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "enabled"
                                    ]
                                  },
                                  "source": {
                                    "type": "string",
                                    "enum": [
                                      "owner_decision",
                                      "competition_override"
                                    ]
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "required": [
                                  "state",
                                  "reason"
                                ],
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "disabled"
                                    ]
                                  },
                                  "reason": {
                                    "type": "string",
                                    "enum": [
                                      "owner_input_required",
                                      "not_applicable",
                                      "amendment_policy_not_configured"
                                    ]
                                  }
                                }
                              }
                            ]
                          },
                          "record_pre_match_check": {
                            "oneOf": [
                              {
                                "type": "object",
                                "required": [
                                  "state",
                                  "source"
                                ],
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "enabled"
                                    ]
                                  },
                                  "source": {
                                    "type": "string",
                                    "enum": [
                                      "owner_decision",
                                      "competition_override"
                                    ]
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "required": [
                                  "state",
                                  "reason"
                                ],
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "disabled"
                                    ]
                                  },
                                  "reason": {
                                    "type": "string",
                                    "enum": [
                                      "owner_input_required",
                                      "not_applicable",
                                      "amendment_policy_not_configured"
                                    ]
                                  }
                                }
                              }
                            ]
                          },
                          "record_live_event": {
                            "oneOf": [
                              {
                                "type": "object",
                                "required": [
                                  "state",
                                  "source"
                                ],
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "enabled"
                                    ]
                                  },
                                  "source": {
                                    "type": "string",
                                    "enum": [
                                      "owner_decision",
                                      "competition_override"
                                    ]
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "required": [
                                  "state",
                                  "reason"
                                ],
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "disabled"
                                    ]
                                  },
                                  "reason": {
                                    "type": "string",
                                    "enum": [
                                      "owner_input_required",
                                      "not_applicable",
                                      "amendment_policy_not_configured"
                                    ]
                                  }
                                }
                              }
                            ]
                          },
                          "review_official_dossier": {
                            "oneOf": [
                              {
                                "type": "object",
                                "required": [
                                  "state",
                                  "source"
                                ],
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "enabled"
                                    ]
                                  },
                                  "source": {
                                    "type": "string",
                                    "enum": [
                                      "owner_decision",
                                      "competition_override"
                                    ]
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "required": [
                                  "state",
                                  "reason"
                                ],
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "disabled"
                                    ]
                                  },
                                  "reason": {
                                    "type": "string",
                                    "enum": [
                                      "owner_input_required",
                                      "not_applicable",
                                      "amendment_policy_not_configured"
                                    ]
                                  }
                                }
                              }
                            ]
                          },
                          "sign_report": {
                            "oneOf": [
                              {
                                "type": "object",
                                "required": [
                                  "state",
                                  "source"
                                ],
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "enabled"
                                    ]
                                  },
                                  "source": {
                                    "type": "string",
                                    "enum": [
                                      "owner_decision",
                                      "competition_override"
                                    ]
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "required": [
                                  "state",
                                  "reason"
                                ],
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "disabled"
                                    ]
                                  },
                                  "reason": {
                                    "type": "string",
                                    "enum": [
                                      "owner_input_required",
                                      "not_applicable",
                                      "amendment_policy_not_configured"
                                    ]
                                  }
                                }
                              }
                            ]
                          },
                          "amend_accepted_event": {
                            "oneOf": [
                              {
                                "type": "object",
                                "required": [
                                  "state",
                                  "source"
                                ],
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "enabled"
                                    ]
                                  },
                                  "source": {
                                    "type": "string",
                                    "enum": [
                                      "owner_decision",
                                      "competition_override"
                                    ]
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "required": [
                                  "state",
                                  "reason"
                                ],
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "disabled"
                                    ]
                                  },
                                  "reason": {
                                    "type": "string",
                                    "enum": [
                                      "owner_input_required",
                                      "not_applicable",
                                      "amendment_policy_not_configured"
                                    ]
                                  }
                                }
                              }
                            ]
                          }
                        }
                      },
                      "media_operator": {
                        "type": "object",
                        "required": [
                          "read_workflow_config",
                          "record_pre_match_check",
                          "record_live_event",
                          "review_official_dossier",
                          "sign_report"
                        ],
                        "properties": {
                          "read_workflow_config": {
                            "oneOf": [
                              {
                                "type": "object",
                                "required": [
                                  "state",
                                  "source"
                                ],
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "enabled"
                                    ]
                                  },
                                  "source": {
                                    "type": "string",
                                    "enum": [
                                      "owner_decision",
                                      "competition_override"
                                    ]
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "required": [
                                  "state",
                                  "reason"
                                ],
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "disabled"
                                    ]
                                  },
                                  "reason": {
                                    "type": "string",
                                    "enum": [
                                      "owner_input_required",
                                      "not_applicable",
                                      "amendment_policy_not_configured"
                                    ]
                                  }
                                }
                              }
                            ]
                          },
                          "record_pre_match_check": {
                            "oneOf": [
                              {
                                "type": "object",
                                "required": [
                                  "state",
                                  "source"
                                ],
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "enabled"
                                    ]
                                  },
                                  "source": {
                                    "type": "string",
                                    "enum": [
                                      "owner_decision",
                                      "competition_override"
                                    ]
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "required": [
                                  "state",
                                  "reason"
                                ],
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "disabled"
                                    ]
                                  },
                                  "reason": {
                                    "type": "string",
                                    "enum": [
                                      "owner_input_required",
                                      "not_applicable",
                                      "amendment_policy_not_configured"
                                    ]
                                  }
                                }
                              }
                            ]
                          },
                          "record_live_event": {
                            "oneOf": [
                              {
                                "type": "object",
                                "required": [
                                  "state",
                                  "source"
                                ],
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "enabled"
                                    ]
                                  },
                                  "source": {
                                    "type": "string",
                                    "enum": [
                                      "owner_decision",
                                      "competition_override"
                                    ]
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "required": [
                                  "state",
                                  "reason"
                                ],
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "disabled"
                                    ]
                                  },
                                  "reason": {
                                    "type": "string",
                                    "enum": [
                                      "owner_input_required",
                                      "not_applicable",
                                      "amendment_policy_not_configured"
                                    ]
                                  }
                                }
                              }
                            ]
                          },
                          "review_official_dossier": {
                            "oneOf": [
                              {
                                "type": "object",
                                "required": [
                                  "state",
                                  "source"
                                ],
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "enabled"
                                    ]
                                  },
                                  "source": {
                                    "type": "string",
                                    "enum": [
                                      "owner_decision",
                                      "competition_override"
                                    ]
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "required": [
                                  "state",
                                  "reason"
                                ],
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "disabled"
                                    ]
                                  },
                                  "reason": {
                                    "type": "string",
                                    "enum": [
                                      "owner_input_required",
                                      "not_applicable",
                                      "amendment_policy_not_configured"
                                    ]
                                  }
                                }
                              }
                            ]
                          },
                          "sign_report": {
                            "oneOf": [
                              {
                                "type": "object",
                                "required": [
                                  "state",
                                  "source"
                                ],
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "enabled"
                                    ]
                                  },
                                  "source": {
                                    "type": "string",
                                    "enum": [
                                      "owner_decision",
                                      "competition_override"
                                    ]
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "required": [
                                  "state",
                                  "reason"
                                ],
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "disabled"
                                    ]
                                  },
                                  "reason": {
                                    "type": "string",
                                    "enum": [
                                      "owner_input_required",
                                      "not_applicable",
                                      "amendment_policy_not_configured"
                                    ]
                                  }
                                }
                              }
                            ]
                          },
                          "amend_accepted_event": {
                            "oneOf": [
                              {
                                "type": "object",
                                "required": [
                                  "state",
                                  "source"
                                ],
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "enabled"
                                    ]
                                  },
                                  "source": {
                                    "type": "string",
                                    "enum": [
                                      "owner_decision",
                                      "competition_override"
                                    ]
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "required": [
                                  "state",
                                  "reason"
                                ],
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "disabled"
                                    ]
                                  },
                                  "reason": {
                                    "type": "string",
                                    "enum": [
                                      "owner_input_required",
                                      "not_applicable",
                                      "amendment_policy_not_configured"
                                    ]
                                  }
                                }
                              }
                            ]
                          }
                        }
                      }
                    }
                  },
                  "amendment_policy": {
                    "oneOf": [
                      {
                        "type": "object",
                        "required": [
                          "state",
                          "reason"
                        ],
                        "properties": {
                          "state": {
                            "type": "string",
                            "enum": [
                              "disabled"
                            ]
                          },
                          "reason": {
                            "type": "string",
                            "enum": [
                              "amendment_policy_not_configured"
                            ]
                          }
                        }
                      },
                      {
                        "type": "object",
                        "required": [
                          "state",
                          "ruleset_revision_id",
                          "ruleset_content_hash",
                          "allowed_base_state",
                          "allowed_operations",
                          "window_minutes_after_homologation"
                        ],
                        "properties": {
                          "state": {
                            "type": "string",
                            "enum": [
                              "enabled"
                            ]
                          },
                          "ruleset_revision_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "ruleset_content_hash": {
                            "type": "string",
                            "minLength": 64,
                            "maxLength": 64
                          },
                          "allowed_base_state": {
                            "type": "string",
                            "enum": [
                              "homologated"
                            ]
                          },
                          "allowed_operations": {
                            "type": "array",
                            "minItems": 1,
                            "uniqueItems": true,
                            "items": {
                              "type": "string",
                              "enum": [
                                "add",
                                "replace",
                                "void"
                              ]
                            }
                          },
                          "window_minutes_after_homologation": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 43200
                          }
                        }
                      }
                    ]
                  },
                  "offline_snapshot_policy": {
                    "oneOf": [
                      {
                        "type": "object",
                        "required": [
                          "state",
                          "reason"
                        ],
                        "properties": {
                          "state": {
                            "type": "string",
                            "enum": [
                              "disabled"
                            ]
                          },
                          "reason": {
                            "type": "string",
                            "enum": [
                              "retention_policy_not_configured"
                            ]
                          }
                        }
                      },
                      {
                        "type": "object",
                        "required": [
                          "state",
                          "ttl_minutes",
                          "terminal_review_ttl_seconds",
                          "device_encryption_required",
                          "wipe_on_assignment_revocation"
                        ],
                        "properties": {
                          "state": {
                            "type": "string",
                            "enum": [
                              "enabled"
                            ]
                          },
                          "ttl_minutes": {
                            "type": "integer",
                            "minimum": 30,
                            "maximum": 2880
                          },
                          "terminal_review_ttl_seconds": {
                            "type": "integer",
                            "minimum": 30,
                            "maximum": 300
                          },
                          "device_encryption_required": {
                            "type": "boolean",
                            "enum": [
                              true
                            ]
                          },
                          "wipe_on_assignment_revocation": {
                            "type": "boolean",
                            "enum": [
                              true
                            ]
                          }
                        }
                      }
                    ]
                  },
                  "role_matrix": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 5,
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "role",
                        "min_count",
                        "required"
                      ],
                      "properties": {
                        "role": {
                          "type": "string",
                          "enum": [
                            "referee",
                            "assistant_referee",
                            "scorer",
                            "evaluator",
                            "media_operator"
                          ]
                        },
                        "min_count": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 8
                        },
                        "required": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "logistics_policy": {
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                      "required_fields"
                    ],
                    "properties": {
                      "required_fields": {
                        "type": "array",
                        "maxItems": 5,
                        "uniqueItems": true,
                        "items": {
                          "type": "string",
                          "enum": [
                            "field",
                            "access_notes",
                            "arrival_at",
                            "privacy_safe_contact",
                            "escalation"
                          ]
                        }
                      }
                    }
                  },
                  "disciplinary_reason_codes": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 32,
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "code",
                        "label"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 2,
                          "maxLength": 40,
                          "pattern": "^[A-Z][A-Z0-9_]*$"
                        },
                        "label": {
                          "type": "string",
                          "minLength": 2,
                          "maxLength": 80
                        }
                      }
                    }
                  },
                  "owner_decision_reference": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 500
                  },
                  "idempotency_key": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 200
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Published configuration revision",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "sensitive_mutation",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/competitions/{competitionId}/official-workflow-config/latest": {
      "get": {
        "summary": "Read the latest competition official-workflow revision",
        "tags": [
          "admin",
          "official-workflow"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "competitionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Latest revision or null when no base was published",
            "content": {
              "application/json": {
                "schema": {
                  "type": [
                    "object",
                    "null"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/competitions/{competitionId}/official-workflow-config/publish-base": {
      "get": {
        "summary": "Read the server-owned base for a first workflow publication",
        "tags": [
          "admin",
          "official-workflow"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "competitionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Default checklist and role capabilities",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "checklist",
                    "role_capabilities"
                  ],
                  "properties": {
                    "checklist": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                          "id",
                          "label",
                          "description",
                          "owner",
                          "completion_criteria",
                          "severity",
                          "evidence_required",
                          "enabled"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 80
                          },
                          "label": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 160
                          },
                          "description": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 1000
                          },
                          "owner": {
                            "type": "string",
                            "enum": [
                              "home_team",
                              "away_team",
                              "assigned_official",
                              "secretariat"
                            ]
                          },
                          "completion_criteria": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 1000
                          },
                          "severity": {
                            "type": "string",
                            "enum": [
                              "warning",
                              "requires_acknowledgement",
                              "hard_stop"
                            ]
                          },
                          "evidence_required": {
                            "type": "boolean"
                          },
                          "enabled": {
                            "type": "boolean"
                          }
                        }
                      }
                    },
                    "role_capabilities": {
                      "type": "object",
                      "required": [
                        "referee",
                        "assistant_referee",
                        "scorer",
                        "evaluator",
                        "media_operator"
                      ],
                      "properties": {
                        "referee": {
                          "type": "object",
                          "required": [
                            "read_workflow_config",
                            "record_pre_match_check",
                            "record_live_event",
                            "review_official_dossier",
                            "sign_report"
                          ],
                          "properties": {
                            "read_workflow_config": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "required": [
                                    "state",
                                    "source"
                                  ],
                                  "properties": {
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "enabled"
                                      ]
                                    },
                                    "source": {
                                      "type": "string",
                                      "enum": [
                                        "owner_decision",
                                        "competition_override"
                                      ]
                                    }
                                  }
                                },
                                {
                                  "type": "object",
                                  "required": [
                                    "state",
                                    "reason"
                                  ],
                                  "properties": {
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "disabled"
                                      ]
                                    },
                                    "reason": {
                                      "type": "string",
                                      "enum": [
                                        "owner_input_required",
                                        "not_applicable",
                                        "amendment_policy_not_configured"
                                      ]
                                    }
                                  }
                                }
                              ]
                            },
                            "record_pre_match_check": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "required": [
                                    "state",
                                    "source"
                                  ],
                                  "properties": {
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "enabled"
                                      ]
                                    },
                                    "source": {
                                      "type": "string",
                                      "enum": [
                                        "owner_decision",
                                        "competition_override"
                                      ]
                                    }
                                  }
                                },
                                {
                                  "type": "object",
                                  "required": [
                                    "state",
                                    "reason"
                                  ],
                                  "properties": {
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "disabled"
                                      ]
                                    },
                                    "reason": {
                                      "type": "string",
                                      "enum": [
                                        "owner_input_required",
                                        "not_applicable",
                                        "amendment_policy_not_configured"
                                      ]
                                    }
                                  }
                                }
                              ]
                            },
                            "record_live_event": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "required": [
                                    "state",
                                    "source"
                                  ],
                                  "properties": {
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "enabled"
                                      ]
                                    },
                                    "source": {
                                      "type": "string",
                                      "enum": [
                                        "owner_decision",
                                        "competition_override"
                                      ]
                                    }
                                  }
                                },
                                {
                                  "type": "object",
                                  "required": [
                                    "state",
                                    "reason"
                                  ],
                                  "properties": {
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "disabled"
                                      ]
                                    },
                                    "reason": {
                                      "type": "string",
                                      "enum": [
                                        "owner_input_required",
                                        "not_applicable",
                                        "amendment_policy_not_configured"
                                      ]
                                    }
                                  }
                                }
                              ]
                            },
                            "review_official_dossier": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "required": [
                                    "state",
                                    "source"
                                  ],
                                  "properties": {
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "enabled"
                                      ]
                                    },
                                    "source": {
                                      "type": "string",
                                      "enum": [
                                        "owner_decision",
                                        "competition_override"
                                      ]
                                    }
                                  }
                                },
                                {
                                  "type": "object",
                                  "required": [
                                    "state",
                                    "reason"
                                  ],
                                  "properties": {
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "disabled"
                                      ]
                                    },
                                    "reason": {
                                      "type": "string",
                                      "enum": [
                                        "owner_input_required",
                                        "not_applicable",
                                        "amendment_policy_not_configured"
                                      ]
                                    }
                                  }
                                }
                              ]
                            },
                            "sign_report": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "required": [
                                    "state",
                                    "source"
                                  ],
                                  "properties": {
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "enabled"
                                      ]
                                    },
                                    "source": {
                                      "type": "string",
                                      "enum": [
                                        "owner_decision",
                                        "competition_override"
                                      ]
                                    }
                                  }
                                },
                                {
                                  "type": "object",
                                  "required": [
                                    "state",
                                    "reason"
                                  ],
                                  "properties": {
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "disabled"
                                      ]
                                    },
                                    "reason": {
                                      "type": "string",
                                      "enum": [
                                        "owner_input_required",
                                        "not_applicable",
                                        "amendment_policy_not_configured"
                                      ]
                                    }
                                  }
                                }
                              ]
                            },
                            "amend_accepted_event": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "required": [
                                    "state",
                                    "source"
                                  ],
                                  "properties": {
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "enabled"
                                      ]
                                    },
                                    "source": {
                                      "type": "string",
                                      "enum": [
                                        "owner_decision",
                                        "competition_override"
                                      ]
                                    }
                                  }
                                },
                                {
                                  "type": "object",
                                  "required": [
                                    "state",
                                    "reason"
                                  ],
                                  "properties": {
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "disabled"
                                      ]
                                    },
                                    "reason": {
                                      "type": "string",
                                      "enum": [
                                        "owner_input_required",
                                        "not_applicable",
                                        "amendment_policy_not_configured"
                                      ]
                                    }
                                  }
                                }
                              ]
                            }
                          }
                        },
                        "assistant_referee": {
                          "type": "object",
                          "required": [
                            "read_workflow_config",
                            "record_pre_match_check",
                            "record_live_event",
                            "review_official_dossier",
                            "sign_report"
                          ],
                          "properties": {
                            "read_workflow_config": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "required": [
                                    "state",
                                    "source"
                                  ],
                                  "properties": {
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "enabled"
                                      ]
                                    },
                                    "source": {
                                      "type": "string",
                                      "enum": [
                                        "owner_decision",
                                        "competition_override"
                                      ]
                                    }
                                  }
                                },
                                {
                                  "type": "object",
                                  "required": [
                                    "state",
                                    "reason"
                                  ],
                                  "properties": {
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "disabled"
                                      ]
                                    },
                                    "reason": {
                                      "type": "string",
                                      "enum": [
                                        "owner_input_required",
                                        "not_applicable",
                                        "amendment_policy_not_configured"
                                      ]
                                    }
                                  }
                                }
                              ]
                            },
                            "record_pre_match_check": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "required": [
                                    "state",
                                    "source"
                                  ],
                                  "properties": {
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "enabled"
                                      ]
                                    },
                                    "source": {
                                      "type": "string",
                                      "enum": [
                                        "owner_decision",
                                        "competition_override"
                                      ]
                                    }
                                  }
                                },
                                {
                                  "type": "object",
                                  "required": [
                                    "state",
                                    "reason"
                                  ],
                                  "properties": {
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "disabled"
                                      ]
                                    },
                                    "reason": {
                                      "type": "string",
                                      "enum": [
                                        "owner_input_required",
                                        "not_applicable",
                                        "amendment_policy_not_configured"
                                      ]
                                    }
                                  }
                                }
                              ]
                            },
                            "record_live_event": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "required": [
                                    "state",
                                    "source"
                                  ],
                                  "properties": {
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "enabled"
                                      ]
                                    },
                                    "source": {
                                      "type": "string",
                                      "enum": [
                                        "owner_decision",
                                        "competition_override"
                                      ]
                                    }
                                  }
                                },
                                {
                                  "type": "object",
                                  "required": [
                                    "state",
                                    "reason"
                                  ],
                                  "properties": {
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "disabled"
                                      ]
                                    },
                                    "reason": {
                                      "type": "string",
                                      "enum": [
                                        "owner_input_required",
                                        "not_applicable",
                                        "amendment_policy_not_configured"
                                      ]
                                    }
                                  }
                                }
                              ]
                            },
                            "review_official_dossier": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "required": [
                                    "state",
                                    "source"
                                  ],
                                  "properties": {
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "enabled"
                                      ]
                                    },
                                    "source": {
                                      "type": "string",
                                      "enum": [
                                        "owner_decision",
                                        "competition_override"
                                      ]
                                    }
                                  }
                                },
                                {
                                  "type": "object",
                                  "required": [
                                    "state",
                                    "reason"
                                  ],
                                  "properties": {
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "disabled"
                                      ]
                                    },
                                    "reason": {
                                      "type": "string",
                                      "enum": [
                                        "owner_input_required",
                                        "not_applicable",
                                        "amendment_policy_not_configured"
                                      ]
                                    }
                                  }
                                }
                              ]
                            },
                            "sign_report": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "required": [
                                    "state",
                                    "source"
                                  ],
                                  "properties": {
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "enabled"
                                      ]
                                    },
                                    "source": {
                                      "type": "string",
                                      "enum": [
                                        "owner_decision",
                                        "competition_override"
                                      ]
                                    }
                                  }
                                },
                                {
                                  "type": "object",
                                  "required": [
                                    "state",
                                    "reason"
                                  ],
                                  "properties": {
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "disabled"
                                      ]
                                    },
                                    "reason": {
                                      "type": "string",
                                      "enum": [
                                        "owner_input_required",
                                        "not_applicable",
                                        "amendment_policy_not_configured"
                                      ]
                                    }
                                  }
                                }
                              ]
                            },
                            "amend_accepted_event": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "required": [
                                    "state",
                                    "source"
                                  ],
                                  "properties": {
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "enabled"
                                      ]
                                    },
                                    "source": {
                                      "type": "string",
                                      "enum": [
                                        "owner_decision",
                                        "competition_override"
                                      ]
                                    }
                                  }
                                },
                                {
                                  "type": "object",
                                  "required": [
                                    "state",
                                    "reason"
                                  ],
                                  "properties": {
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "disabled"
                                      ]
                                    },
                                    "reason": {
                                      "type": "string",
                                      "enum": [
                                        "owner_input_required",
                                        "not_applicable",
                                        "amendment_policy_not_configured"
                                      ]
                                    }
                                  }
                                }
                              ]
                            }
                          }
                        },
                        "scorer": {
                          "type": "object",
                          "required": [
                            "read_workflow_config",
                            "record_pre_match_check",
                            "record_live_event",
                            "review_official_dossier",
                            "sign_report"
                          ],
                          "properties": {
                            "read_workflow_config": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "required": [
                                    "state",
                                    "source"
                                  ],
                                  "properties": {
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "enabled"
                                      ]
                                    },
                                    "source": {
                                      "type": "string",
                                      "enum": [
                                        "owner_decision",
                                        "competition_override"
                                      ]
                                    }
                                  }
                                },
                                {
                                  "type": "object",
                                  "required": [
                                    "state",
                                    "reason"
                                  ],
                                  "properties": {
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "disabled"
                                      ]
                                    },
                                    "reason": {
                                      "type": "string",
                                      "enum": [
                                        "owner_input_required",
                                        "not_applicable",
                                        "amendment_policy_not_configured"
                                      ]
                                    }
                                  }
                                }
                              ]
                            },
                            "record_pre_match_check": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "required": [
                                    "state",
                                    "source"
                                  ],
                                  "properties": {
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "enabled"
                                      ]
                                    },
                                    "source": {
                                      "type": "string",
                                      "enum": [
                                        "owner_decision",
                                        "competition_override"
                                      ]
                                    }
                                  }
                                },
                                {
                                  "type": "object",
                                  "required": [
                                    "state",
                                    "reason"
                                  ],
                                  "properties": {
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "disabled"
                                      ]
                                    },
                                    "reason": {
                                      "type": "string",
                                      "enum": [
                                        "owner_input_required",
                                        "not_applicable",
                                        "amendment_policy_not_configured"
                                      ]
                                    }
                                  }
                                }
                              ]
                            },
                            "record_live_event": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "required": [
                                    "state",
                                    "source"
                                  ],
                                  "properties": {
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "enabled"
                                      ]
                                    },
                                    "source": {
                                      "type": "string",
                                      "enum": [
                                        "owner_decision",
                                        "competition_override"
                                      ]
                                    }
                                  }
                                },
                                {
                                  "type": "object",
                                  "required": [
                                    "state",
                                    "reason"
                                  ],
                                  "properties": {
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "disabled"
                                      ]
                                    },
                                    "reason": {
                                      "type": "string",
                                      "enum": [
                                        "owner_input_required",
                                        "not_applicable",
                                        "amendment_policy_not_configured"
                                      ]
                                    }
                                  }
                                }
                              ]
                            },
                            "review_official_dossier": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "required": [
                                    "state",
                                    "source"
                                  ],
                                  "properties": {
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "enabled"
                                      ]
                                    },
                                    "source": {
                                      "type": "string",
                                      "enum": [
                                        "owner_decision",
                                        "competition_override"
                                      ]
                                    }
                                  }
                                },
                                {
                                  "type": "object",
                                  "required": [
                                    "state",
                                    "reason"
                                  ],
                                  "properties": {
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "disabled"
                                      ]
                                    },
                                    "reason": {
                                      "type": "string",
                                      "enum": [
                                        "owner_input_required",
                                        "not_applicable",
                                        "amendment_policy_not_configured"
                                      ]
                                    }
                                  }
                                }
                              ]
                            },
                            "sign_report": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "required": [
                                    "state",
                                    "source"
                                  ],
                                  "properties": {
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "enabled"
                                      ]
                                    },
                                    "source": {
                                      "type": "string",
                                      "enum": [
                                        "owner_decision",
                                        "competition_override"
                                      ]
                                    }
                                  }
                                },
                                {
                                  "type": "object",
                                  "required": [
                                    "state",
                                    "reason"
                                  ],
                                  "properties": {
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "disabled"
                                      ]
                                    },
                                    "reason": {
                                      "type": "string",
                                      "enum": [
                                        "owner_input_required",
                                        "not_applicable",
                                        "amendment_policy_not_configured"
                                      ]
                                    }
                                  }
                                }
                              ]
                            },
                            "amend_accepted_event": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "required": [
                                    "state",
                                    "source"
                                  ],
                                  "properties": {
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "enabled"
                                      ]
                                    },
                                    "source": {
                                      "type": "string",
                                      "enum": [
                                        "owner_decision",
                                        "competition_override"
                                      ]
                                    }
                                  }
                                },
                                {
                                  "type": "object",
                                  "required": [
                                    "state",
                                    "reason"
                                  ],
                                  "properties": {
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "disabled"
                                      ]
                                    },
                                    "reason": {
                                      "type": "string",
                                      "enum": [
                                        "owner_input_required",
                                        "not_applicable",
                                        "amendment_policy_not_configured"
                                      ]
                                    }
                                  }
                                }
                              ]
                            }
                          }
                        },
                        "evaluator": {
                          "type": "object",
                          "required": [
                            "read_workflow_config",
                            "record_pre_match_check",
                            "record_live_event",
                            "review_official_dossier",
                            "sign_report"
                          ],
                          "properties": {
                            "read_workflow_config": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "required": [
                                    "state",
                                    "source"
                                  ],
                                  "properties": {
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "enabled"
                                      ]
                                    },
                                    "source": {
                                      "type": "string",
                                      "enum": [
                                        "owner_decision",
                                        "competition_override"
                                      ]
                                    }
                                  }
                                },
                                {
                                  "type": "object",
                                  "required": [
                                    "state",
                                    "reason"
                                  ],
                                  "properties": {
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "disabled"
                                      ]
                                    },
                                    "reason": {
                                      "type": "string",
                                      "enum": [
                                        "owner_input_required",
                                        "not_applicable",
                                        "amendment_policy_not_configured"
                                      ]
                                    }
                                  }
                                }
                              ]
                            },
                            "record_pre_match_check": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "required": [
                                    "state",
                                    "source"
                                  ],
                                  "properties": {
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "enabled"
                                      ]
                                    },
                                    "source": {
                                      "type": "string",
                                      "enum": [
                                        "owner_decision",
                                        "competition_override"
                                      ]
                                    }
                                  }
                                },
                                {
                                  "type": "object",
                                  "required": [
                                    "state",
                                    "reason"
                                  ],
                                  "properties": {
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "disabled"
                                      ]
                                    },
                                    "reason": {
                                      "type": "string",
                                      "enum": [
                                        "owner_input_required",
                                        "not_applicable",
                                        "amendment_policy_not_configured"
                                      ]
                                    }
                                  }
                                }
                              ]
                            },
                            "record_live_event": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "required": [
                                    "state",
                                    "source"
                                  ],
                                  "properties": {
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "enabled"
                                      ]
                                    },
                                    "source": {
                                      "type": "string",
                                      "enum": [
                                        "owner_decision",
                                        "competition_override"
                                      ]
                                    }
                                  }
                                },
                                {
                                  "type": "object",
                                  "required": [
                                    "state",
                                    "reason"
                                  ],
                                  "properties": {
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "disabled"
                                      ]
                                    },
                                    "reason": {
                                      "type": "string",
                                      "enum": [
                                        "owner_input_required",
                                        "not_applicable",
                                        "amendment_policy_not_configured"
                                      ]
                                    }
                                  }
                                }
                              ]
                            },
                            "review_official_dossier": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "required": [
                                    "state",
                                    "source"
                                  ],
                                  "properties": {
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "enabled"
                                      ]
                                    },
                                    "source": {
                                      "type": "string",
                                      "enum": [
                                        "owner_decision",
                                        "competition_override"
                                      ]
                                    }
                                  }
                                },
                                {
                                  "type": "object",
                                  "required": [
                                    "state",
                                    "reason"
                                  ],
                                  "properties": {
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "disabled"
                                      ]
                                    },
                                    "reason": {
                                      "type": "string",
                                      "enum": [
                                        "owner_input_required",
                                        "not_applicable",
                                        "amendment_policy_not_configured"
                                      ]
                                    }
                                  }
                                }
                              ]
                            },
                            "sign_report": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "required": [
                                    "state",
                                    "source"
                                  ],
                                  "properties": {
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "enabled"
                                      ]
                                    },
                                    "source": {
                                      "type": "string",
                                      "enum": [
                                        "owner_decision",
                                        "competition_override"
                                      ]
                                    }
                                  }
                                },
                                {
                                  "type": "object",
                                  "required": [
                                    "state",
                                    "reason"
                                  ],
                                  "properties": {
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "disabled"
                                      ]
                                    },
                                    "reason": {
                                      "type": "string",
                                      "enum": [
                                        "owner_input_required",
                                        "not_applicable",
                                        "amendment_policy_not_configured"
                                      ]
                                    }
                                  }
                                }
                              ]
                            },
                            "amend_accepted_event": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "required": [
                                    "state",
                                    "source"
                                  ],
                                  "properties": {
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "enabled"
                                      ]
                                    },
                                    "source": {
                                      "type": "string",
                                      "enum": [
                                        "owner_decision",
                                        "competition_override"
                                      ]
                                    }
                                  }
                                },
                                {
                                  "type": "object",
                                  "required": [
                                    "state",
                                    "reason"
                                  ],
                                  "properties": {
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "disabled"
                                      ]
                                    },
                                    "reason": {
                                      "type": "string",
                                      "enum": [
                                        "owner_input_required",
                                        "not_applicable",
                                        "amendment_policy_not_configured"
                                      ]
                                    }
                                  }
                                }
                              ]
                            }
                          }
                        },
                        "media_operator": {
                          "type": "object",
                          "required": [
                            "read_workflow_config",
                            "record_pre_match_check",
                            "record_live_event",
                            "review_official_dossier",
                            "sign_report"
                          ],
                          "properties": {
                            "read_workflow_config": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "required": [
                                    "state",
                                    "source"
                                  ],
                                  "properties": {
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "enabled"
                                      ]
                                    },
                                    "source": {
                                      "type": "string",
                                      "enum": [
                                        "owner_decision",
                                        "competition_override"
                                      ]
                                    }
                                  }
                                },
                                {
                                  "type": "object",
                                  "required": [
                                    "state",
                                    "reason"
                                  ],
                                  "properties": {
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "disabled"
                                      ]
                                    },
                                    "reason": {
                                      "type": "string",
                                      "enum": [
                                        "owner_input_required",
                                        "not_applicable",
                                        "amendment_policy_not_configured"
                                      ]
                                    }
                                  }
                                }
                              ]
                            },
                            "record_pre_match_check": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "required": [
                                    "state",
                                    "source"
                                  ],
                                  "properties": {
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "enabled"
                                      ]
                                    },
                                    "source": {
                                      "type": "string",
                                      "enum": [
                                        "owner_decision",
                                        "competition_override"
                                      ]
                                    }
                                  }
                                },
                                {
                                  "type": "object",
                                  "required": [
                                    "state",
                                    "reason"
                                  ],
                                  "properties": {
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "disabled"
                                      ]
                                    },
                                    "reason": {
                                      "type": "string",
                                      "enum": [
                                        "owner_input_required",
                                        "not_applicable",
                                        "amendment_policy_not_configured"
                                      ]
                                    }
                                  }
                                }
                              ]
                            },
                            "record_live_event": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "required": [
                                    "state",
                                    "source"
                                  ],
                                  "properties": {
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "enabled"
                                      ]
                                    },
                                    "source": {
                                      "type": "string",
                                      "enum": [
                                        "owner_decision",
                                        "competition_override"
                                      ]
                                    }
                                  }
                                },
                                {
                                  "type": "object",
                                  "required": [
                                    "state",
                                    "reason"
                                  ],
                                  "properties": {
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "disabled"
                                      ]
                                    },
                                    "reason": {
                                      "type": "string",
                                      "enum": [
                                        "owner_input_required",
                                        "not_applicable",
                                        "amendment_policy_not_configured"
                                      ]
                                    }
                                  }
                                }
                              ]
                            },
                            "review_official_dossier": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "required": [
                                    "state",
                                    "source"
                                  ],
                                  "properties": {
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "enabled"
                                      ]
                                    },
                                    "source": {
                                      "type": "string",
                                      "enum": [
                                        "owner_decision",
                                        "competition_override"
                                      ]
                                    }
                                  }
                                },
                                {
                                  "type": "object",
                                  "required": [
                                    "state",
                                    "reason"
                                  ],
                                  "properties": {
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "disabled"
                                      ]
                                    },
                                    "reason": {
                                      "type": "string",
                                      "enum": [
                                        "owner_input_required",
                                        "not_applicable",
                                        "amendment_policy_not_configured"
                                      ]
                                    }
                                  }
                                }
                              ]
                            },
                            "sign_report": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "required": [
                                    "state",
                                    "source"
                                  ],
                                  "properties": {
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "enabled"
                                      ]
                                    },
                                    "source": {
                                      "type": "string",
                                      "enum": [
                                        "owner_decision",
                                        "competition_override"
                                      ]
                                    }
                                  }
                                },
                                {
                                  "type": "object",
                                  "required": [
                                    "state",
                                    "reason"
                                  ],
                                  "properties": {
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "disabled"
                                      ]
                                    },
                                    "reason": {
                                      "type": "string",
                                      "enum": [
                                        "owner_input_required",
                                        "not_applicable",
                                        "amendment_policy_not_configured"
                                      ]
                                    }
                                  }
                                }
                              ]
                            },
                            "amend_accepted_event": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "required": [
                                    "state",
                                    "source"
                                  ],
                                  "properties": {
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "enabled"
                                      ]
                                    },
                                    "source": {
                                      "type": "string",
                                      "enum": [
                                        "owner_decision",
                                        "competition_override"
                                      ]
                                    }
                                  }
                                },
                                {
                                  "type": "object",
                                  "required": [
                                    "state",
                                    "reason"
                                  ],
                                  "properties": {
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "disabled"
                                      ]
                                    },
                                    "reason": {
                                      "type": "string",
                                      "enum": [
                                        "owner_input_required",
                                        "not_applicable",
                                        "amendment_policy_not_configured"
                                      ]
                                    }
                                  }
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/matches/{matchId}/official-designations/v2": {
      "post": {
        "summary": "Assign an official with a payload-bound idempotency receipt",
        "tags": [
          "admin",
          "matches",
          "official-workflow"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "user_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "role": {
                    "type": "string",
                    "enum": [
                      "referee",
                      "assistant_referee",
                      "scorer",
                      "evaluator",
                      "media_operator"
                    ]
                  },
                  "acceptance_deadline_at": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "date-time"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "idempotency_key": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 200
                  }
                },
                "required": [
                  "user_id",
                  "role",
                  "idempotency_key"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Designation and idempotency receipt",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "assignment",
                    "receipt"
                  ],
                  "properties": {
                    "assignment": {
                      "$ref": "#/components/schemas/AdminMatchAssignmentRow"
                    },
                    "receipt": {
                      "type": "object",
                      "required": [
                        "id",
                        "operation",
                        "match_id",
                        "assignment_id",
                        "result_assignment_id",
                        "idempotency_key",
                        "payload_hash",
                        "created_at"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "operation": {
                          "type": "string",
                          "enum": [
                            "assign",
                            "replace",
                            "no_show"
                          ]
                        },
                        "match_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "assignment_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "result_assignment_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "idempotency_key": {
                          "type": "string"
                        },
                        "payload_hash": {
                          "type": "string",
                          "minLength": 64,
                          "maxLength": 64
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "sensitive_mutation",
        "x-audit-required": true,
        "x-privacy-classification": "pii",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/official-designations/v2/{assignmentId}/replacements": {
      "post": {
        "summary": "Replace an official through the canonical assignment lifecycle",
        "tags": [
          "admin",
          "matches",
          "official-workflow"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "assignmentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "user_id",
                  "reason",
                  "idempotency_key"
                ],
                "properties": {
                  "user_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 500
                  },
                  "idempotency_key": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 200
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Replacement and idempotency receipt",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "assignment",
                    "receipt"
                  ],
                  "properties": {
                    "assignment": {
                      "$ref": "#/components/schemas/AdminMatchAssignmentRow"
                    },
                    "receipt": {
                      "type": "object",
                      "required": [
                        "id",
                        "operation",
                        "match_id",
                        "assignment_id",
                        "result_assignment_id",
                        "idempotency_key",
                        "payload_hash",
                        "created_at"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "operation": {
                          "type": "string",
                          "enum": [
                            "assign",
                            "replace",
                            "no_show"
                          ]
                        },
                        "match_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "assignment_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "result_assignment_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "idempotency_key": {
                          "type": "string"
                        },
                        "payload_hash": {
                          "type": "string",
                          "minLength": 64,
                          "maxLength": 64
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "sensitive_mutation",
        "x-audit-required": true,
        "x-privacy-classification": "pii",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/official-designations/v2/{assignmentId}/no-show": {
      "post": {
        "summary": "Mark a confirmed official no-show and withdraw match authority",
        "tags": [
          "admin",
          "matches",
          "official-workflow"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "assignmentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "reason",
                  "idempotency_key"
                ],
                "properties": {
                  "reason": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 500
                  },
                  "idempotency_key": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 200
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "No-show assignment and idempotency receipt",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "assignment",
                    "receipt"
                  ],
                  "properties": {
                    "assignment": {
                      "$ref": "#/components/schemas/AdminMatchAssignmentRow"
                    },
                    "receipt": {
                      "type": "object",
                      "required": [
                        "id",
                        "operation",
                        "match_id",
                        "assignment_id",
                        "result_assignment_id",
                        "idempotency_key",
                        "payload_hash",
                        "created_at"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "operation": {
                          "type": "string",
                          "enum": [
                            "assign",
                            "replace",
                            "no_show"
                          ]
                        },
                        "match_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "assignment_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "result_assignment_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "idempotency_key": {
                          "type": "string"
                        },
                        "payload_hash": {
                          "type": "string",
                          "minLength": 64,
                          "maxLength": 64
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "sensitive_mutation",
        "x-audit-required": true,
        "x-privacy-classification": "pii",
        "x-admin-cockpit-required": true
      }
    },
    "/matches/{matchId}/report-versions/v2/{versionId}/signature-challenges": {
      "post": {
        "summary": "Issue a one-time Ed25519 challenge bound to the W2 report attestation",
        "tags": [
          "matches",
          "reports",
          "official-workflow"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "versionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "signature_algorithm",
                  "client_public_key_spki_base64",
                  "idempotency_key"
                ],
                "properties": {
                  "signature_algorithm": {
                    "type": "string",
                    "enum": [
                      "ed25519"
                    ]
                  },
                  "client_public_key_spki_base64": {
                    "type": "string",
                    "minLength": 40,
                    "maxLength": 1024
                  },
                  "idempotency_key": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 200
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Signature challenge",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "sensitive_mutation",
        "x-audit-required": true,
        "x-privacy-classification": "sensitive_pii"
      }
    },
    "/matches/{matchId}/report-versions/v2/{versionId}/amendments": {
      "post": {
        "summary": "Append a referee-scoped amendment under an explicit competition policy revision",
        "tags": [
          "matches",
          "reports",
          "official-workflow"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "versionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "base_report_version_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "base_manifest_hash": {
                    "type": "string",
                    "pattern": "^[0-9a-f]{64}$"
                  },
                  "operations": {
                    "type": "array",
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "op": {
                              "type": "string",
                              "enum": [
                                "add"
                              ]
                            },
                            "event_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "event": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "tenant_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "match_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "sequence": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "goal",
                                    "own_goal",
                                    "assist",
                                    "yellow_card",
                                    "red_card",
                                    "second_yellow",
                                    "substitution_in",
                                    "substitution_out",
                                    "penalty_scored",
                                    "penalty_missed",
                                    "penalty_saved",
                                    "goal_conceded",
                                    "period_start",
                                    "period_end",
                                    "match_start",
                                    "match_end",
                                    "injury_pause",
                                    "note"
                                  ]
                                },
                                "occurred_at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "minute": {
                                  "oneOf": [
                                    {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 120
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "side": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "enum": [
                                        "home",
                                        "away"
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "primary_player_id": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "secondary_player_id": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "note": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "maxLength": 280
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "author_user_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "idempotency_key": {
                                  "type": "string",
                                  "minLength": 8
                                },
                                "created_at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "updated_at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "created_by": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "updated_by": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "id",
                                "tenant_id",
                                "match_id",
                                "sequence",
                                "type",
                                "occurred_at",
                                "minute",
                                "side",
                                "primary_player_id",
                                "secondary_player_id",
                                "note",
                                "author_user_id",
                                "idempotency_key",
                                "created_at",
                                "updated_at",
                                "created_by",
                                "updated_by"
                              ]
                            },
                            "reason": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 1000
                            }
                          },
                          "required": [
                            "op",
                            "event_id",
                            "event",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "op": {
                              "type": "string",
                              "enum": [
                                "replace"
                              ]
                            },
                            "target_event_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "replacement_event_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "event": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "tenant_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "match_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "sequence": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "goal",
                                    "own_goal",
                                    "assist",
                                    "yellow_card",
                                    "red_card",
                                    "second_yellow",
                                    "substitution_in",
                                    "substitution_out",
                                    "penalty_scored",
                                    "penalty_missed",
                                    "penalty_saved",
                                    "goal_conceded",
                                    "period_start",
                                    "period_end",
                                    "match_start",
                                    "match_end",
                                    "injury_pause",
                                    "note"
                                  ]
                                },
                                "occurred_at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "minute": {
                                  "oneOf": [
                                    {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 120
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "side": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "enum": [
                                        "home",
                                        "away"
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "primary_player_id": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "secondary_player_id": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "note": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "maxLength": 280
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "author_user_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "idempotency_key": {
                                  "type": "string",
                                  "minLength": 8
                                },
                                "created_at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "updated_at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "created_by": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "updated_by": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "id",
                                "tenant_id",
                                "match_id",
                                "sequence",
                                "type",
                                "occurred_at",
                                "minute",
                                "side",
                                "primary_player_id",
                                "secondary_player_id",
                                "note",
                                "author_user_id",
                                "idempotency_key",
                                "created_at",
                                "updated_at",
                                "created_by",
                                "updated_by"
                              ]
                            },
                            "reason": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 1000
                            }
                          },
                          "required": [
                            "op",
                            "target_event_id",
                            "replacement_event_id",
                            "event",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "op": {
                              "type": "string",
                              "enum": [
                                "void"
                              ]
                            },
                            "target_event_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "reason": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 1000
                            }
                          },
                          "required": [
                            "op",
                            "target_event_id",
                            "reason"
                          ]
                        }
                      ]
                    },
                    "minItems": 1
                  },
                  "is_sub_iudice": {
                    "type": "boolean"
                  },
                  "idempotency_key": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 200
                  },
                  "score_home": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "score_away": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "ended_after": {
                    "type": "string",
                    "enum": [
                      "regulation",
                      "extra_time",
                      "penalties"
                    ]
                  },
                  "penalty_shootout": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "home": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "away": {
                            "type": "integer",
                            "minimum": 0
                          }
                        },
                        "required": [
                          "home",
                          "away"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "result_origin": {
                    "type": "string",
                    "enum": [
                      "played",
                      "forfeit"
                    ]
                  },
                  "forfeit_trigger": {
                    "oneOf": [
                      {
                        "type": "string",
                        "enum": [
                          "no_show",
                          "ineligible_player",
                          "roster_below_minimum",
                          "late_result_confirmation_both_secretariats"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "lineup_snapshot_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "minItems": 2
                  },
                  "attachment_hashes": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "pattern": "^[0-9a-f]{64}$"
                    }
                  },
                  "ruleset_revision_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "ruleset_content_hash": {
                    "type": "string",
                    "pattern": "^[0-9a-f]{64}$"
                  },
                  "source_event_sequence": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "sub_iudice_case": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "opened_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "reason": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 1000
                          },
                          "proceeding_id": {
                            "type": "string",
                            "format": "uuid"
                          }
                        },
                        "required": [
                          "opened_at",
                          "reason",
                          "proceeding_id"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "notes": {
                    "oneOf": [
                      {
                        "type": "string",
                        "maxLength": 4000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "base_report_version_id",
                  "base_manifest_hash",
                  "operations",
                  "is_sub_iudice",
                  "idempotency_key",
                  "score_home",
                  "score_away",
                  "source_event_sequence",
                  "sub_iudice_case",
                  "notes"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Amended report and projection revision",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "report",
                    "amendment_set",
                    "new_events",
                    "projection_revision"
                  ],
                  "properties": {
                    "report": {
                      "$ref": "#/components/schemas/ReportVersionV2"
                    },
                    "amendment_set": {
                      "$ref": "#/components/schemas/ReportAmendmentSet"
                    },
                    "new_events": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/MatchEvent"
                      }
                    },
                    "projection_revision": {
                      "$ref": "#/components/schemas/ProjectionRevision"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Caller is not the confirmed assigned referee and signer of the base report",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Policy, base identity, window or idempotency conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/matches/{matchId}/report-versions/v2/{versionId}/signature-challenges/{challengeId}/verify": {
      "post": {
        "summary": "Verify the client signature, store the sidecar attestation and submit through W2",
        "tags": [
          "matches",
          "reports",
          "official-workflow"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "versionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "challengeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "payload_hash",
                  "client_signature_base64",
                  "idempotency_key"
                ],
                "properties": {
                  "payload_hash": {
                    "type": "string",
                    "minLength": 64,
                    "maxLength": 64
                  },
                  "client_signature_base64": {
                    "type": "string",
                    "minLength": 40,
                    "maxLength": 1024
                  },
                  "idempotency_key": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 200
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Verified attestation and submitted W2 report",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "attestation",
                    "report"
                  ],
                  "properties": {
                    "attestation": {
                      "type": "object"
                    },
                    "report": {
                      "$ref": "#/components/schemas/ReportVersionV2"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "sensitive_mutation",
        "x-audit-required": true,
        "x-privacy-classification": "sensitive_pii"
      }
    },
    "/matches/{matchId}/report-versions/v2/{versionId}/dossier": {
      "get": {
        "summary": "Read one assigned-official dossier and verifiable signature receipt",
        "tags": [
          "matches",
          "reports",
          "official-workflow"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "versionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Official dossier",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "match_id",
                    "report_version_id",
                    "version",
                    "lifecycle_state",
                    "content",
                    "attestation",
                    "state",
                    "review_checks",
                    "projection_impacts",
                    "timeline"
                  ],
                  "properties": {
                    "match_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "report_version_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "version": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "lifecycle_state": {
                      "type": "string",
                      "enum": [
                        "draft",
                        "submitted",
                        "approved",
                        "homologated"
                      ]
                    },
                    "content": {
                      "type": "object"
                    },
                    "attestation": {
                      "type": "object"
                    },
                    "state": {
                      "type": "object"
                    },
                    "review_checks": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "projection_impacts": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "timeline": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": false,
        "x-privacy-classification": "sensitive_pii"
      }
    },
    "/admin/matches/{matchId}/official-dossier": {
      "get": {
        "summary": "Read the complete versioned official dossier history for the console",
        "tags": [
          "admin",
          "matches",
          "reports",
          "official-workflow"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Official dossier history",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "match_id",
                          "report_version_id",
                          "version",
                          "lifecycle_state",
                          "content",
                          "attestation",
                          "state",
                          "review_checks",
                          "projection_impacts",
                          "timeline"
                        ],
                        "properties": {
                          "match_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "report_version_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 1
                          },
                          "lifecycle_state": {
                            "type": "string",
                            "enum": [
                              "draft",
                              "submitted",
                              "approved",
                              "homologated"
                            ]
                          },
                          "content": {
                            "type": "object"
                          },
                          "attestation": {
                            "type": "object"
                          },
                          "state": {
                            "type": "object"
                          },
                          "review_checks": {
                            "type": "array",
                            "items": {
                              "type": "object"
                            }
                          },
                          "projection_impacts": {
                            "type": "array",
                            "items": {
                              "type": "object"
                            }
                          },
                          "timeline": {
                            "type": "array",
                            "items": {
                              "type": "object"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "sensitive_pii",
        "x-admin-cockpit-required": true
      }
    },
    "/admin/report-submissions/{submissionId}/migrate-v2": {
      "post": {
        "summary": "Atomically import a linked legacy report into V2, homologate it and close the queue",
        "tags": [
          "admin",
          "reports"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "submissionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "idempotency_key": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 200
                  },
                  "ended_after": {
                    "type": "string",
                    "enum": [
                      "regulation",
                      "extra_time",
                      "penalties"
                    ]
                  },
                  "penalty_shootout": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "home": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "away": {
                            "type": "integer",
                            "minimum": 0
                          }
                        },
                        "required": [
                          "home",
                          "away"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "result_origin": {
                    "type": "string",
                    "enum": [
                      "played",
                      "forfeit"
                    ]
                  },
                  "forfeit_trigger": {
                    "oneOf": [
                      {
                        "type": "string",
                        "enum": [
                          "no_show",
                          "ineligible_player",
                          "roster_below_minimum",
                          "late_result_confirmation_both_secretariats"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "lineup_snapshot_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "minItems": 2
                  },
                  "attachment_hashes": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "pattern": "^[0-9a-f]{64}$"
                    }
                  },
                  "ruleset_revision_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "ruleset_content_hash": {
                    "type": "string",
                    "pattern": "^[0-9a-f]{64}$"
                  },
                  "is_sub_iudice": {
                    "type": "boolean",
                    "default": false
                  },
                  "sub_iudice_case": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "opened_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "reason": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 1000
                          },
                          "proceeding_id": {
                            "type": "string",
                            "format": "uuid"
                          }
                        },
                        "required": [
                          "opened_at",
                          "reason",
                          "proceeding_id"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "notes": {
                    "oneOf": [
                      {
                        "type": "string",
                        "maxLength": 4000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "idempotency_key",
                  "ended_after",
                  "penalty_shootout",
                  "result_origin",
                  "forfeit_trigger",
                  "lineup_snapshot_ids",
                  "attachment_hashes",
                  "ruleset_revision_id",
                  "ruleset_content_hash",
                  "notes"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Accepted legacy-to-V2 migration",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "sensitive_mutation",
        "x-audit-required": true,
        "x-privacy-classification": "sensitive_pii",
        "x-admin-cockpit-required": true
      }
    },
    "/me/player-claims/capabilities": {
      "get": {
        "summary": "Read authoritative adult/minor and evidence capabilities before starting a claim",
        "tags": [
          "players",
          "privacy"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Player claim capabilities",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/me/team-area/communications/{communicationId}": {
      "get": {
        "summary": "Read communication detail and persist the recipient read receipt",
        "tags": [
          "team-area"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "communicationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Communication with audience and receipt",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/imports/dry-run": {
      "post": {
        "summary": "Validate an import and persist its dry-run dossier",
        "tags": [
          "admin",
          "imports"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "teams",
                      "players",
                      "rosters",
                      "fields",
                      "fixtures",
                      "assignments",
                      "rounds",
                      "results"
                    ]
                  },
                  "rows": {
                    "type": "array",
                    "items": {},
                    "minItems": 1,
                    "maxItems": 200
                  },
                  "idempotency_key": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 200
                  }
                },
                "required": [
                  "kind",
                  "rows",
                  "idempotency_key"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Import dry-run dossier",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_bound",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "sensitive_mutation",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/imports/{importId}": {
      "get": {
        "summary": "Read one import dossier and its row outcomes",
        "tags": [
          "admin",
          "imports"
        ],
        "parameters": [
          {
            "name": "importId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Import dossier",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_bound",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/imports/{importId}/commit": {
      "post": {
        "summary": "commit an import dossier",
        "tags": [
          "admin",
          "imports"
        ],
        "parameters": [
          {
            "name": "importId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Updated import dossier",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_bound",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "sensitive_mutation",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/imports/{importId}/retry-failed": {
      "post": {
        "summary": "retry-failed an import dossier",
        "tags": [
          "admin",
          "imports"
        ],
        "parameters": [
          {
            "name": "importId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Updated import dossier",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_bound",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "sensitive_mutation",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/imports/{importId}/rollback": {
      "post": {
        "summary": "rollback an import dossier",
        "tags": [
          "admin",
          "imports"
        ],
        "parameters": [
          {
            "name": "importId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Updated import dossier",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_bound",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "sensitive_mutation",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/tournaments/{tournamentId}/governance/preview": {
      "post": {
        "summary": "Preview tournament governance diff and consequences",
        "tags": [
          "admin",
          "tournaments"
        ],
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Governance preview",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_bound",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "sensitive_mutation",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/tournaments/{tournamentId}/governance/{operationId}/commit": {
      "post": {
        "summary": "Commit a tournament governance preview with CAS",
        "tags": [
          "admin",
          "tournaments"
        ],
        "parameters": [
          {
            "name": "tournamentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "operationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Governance receipt",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_bound",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "sensitive_mutation",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/seasons/{seasonId}/rollover/preview": {
      "post": {
        "summary": "Preview season rollover and carry-over consequences",
        "tags": [
          "admin",
          "seasons"
        ],
        "parameters": [
          {
            "name": "seasonId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "expected_etag": {
                    "type": "string",
                    "minLength": 1
                  },
                  "idempotency_key": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 200
                  },
                  "next_season": {
                    "type": "object",
                    "properties": {
                      "slug": {
                        "type": "string",
                        "minLength": 2,
                        "maxLength": 64,
                        "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
                      },
                      "label": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 200
                      },
                      "starts_on": {
                        "type": "string",
                        "format": "date"
                      },
                      "ends_on": {
                        "type": "string",
                        "format": "date"
                      },
                      "roster_registration_deadline_at": {
                        "oneOf": [
                          {
                            "type": "string",
                            "format": "date-time"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "transfer_window_opens_at": {
                        "oneOf": [
                          {
                            "type": "string",
                            "format": "date-time"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "transfer_window_closes_at": {
                        "oneOf": [
                          {
                            "type": "string",
                            "format": "date-time"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "slug",
                      "label",
                      "starts_on",
                      "ends_on"
                    ]
                  },
                  "carry_over": {
                    "type": "object",
                    "properties": {
                      "teams": {
                        "type": "boolean"
                      },
                      "rosters": {
                        "type": "boolean"
                      },
                      "tournaments": {
                        "type": "boolean"
                      },
                      "rules": {
                        "type": "boolean"
                      },
                      "discipline": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "teams",
                      "rosters",
                      "tournaments",
                      "rules",
                      "discipline"
                    ]
                  }
                },
                "required": [
                  "expected_etag",
                  "idempotency_key",
                  "next_season",
                  "carry_over"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Season rollover preview",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_bound",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "sensitive_mutation",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/seasons/{seasonId}/rollover/{operationId}/commit": {
      "post": {
        "summary": "Commit a season rollover preview with CAS",
        "tags": [
          "admin",
          "seasons"
        ],
        "parameters": [
          {
            "name": "seasonId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "operationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Season rollover receipt",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_bound",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "sensitive_mutation",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/governance-operations/{operationId}": {
      "get": {
        "summary": "Read a governance preview or committed receipt",
        "tags": [
          "admin",
          "tournaments",
          "seasons"
        ],
        "parameters": [
          {
            "name": "operationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Governance operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_bound",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/sport-checkin/matches/{matchId}": {
      "get": {
        "summary": "Read the official sporting presence and eligibility dossier",
        "tags": [
          "admin",
          "sport-checkin"
        ],
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sport check-in dossier",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_bound",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/sport-checkin/matches/{matchId}/participants": {
      "put": {
        "summary": "Record a revision-guarded sporting presence decision",
        "tags": [
          "admin",
          "sport-checkin"
        ],
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "subject_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "player",
                      "official"
                    ]
                  },
                  "presence": {
                    "type": "string",
                    "enum": [
                      "present",
                      "absent"
                    ]
                  },
                  "identity_verified": {
                    "type": "boolean"
                  },
                  "document_verified": {
                    "type": "boolean"
                  },
                  "note": {
                    "oneOf": [
                      {
                        "type": "string",
                        "maxLength": 500
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "expected_revision": {
                    "type": "integer",
                    "exclusiveMinimum": 0
                  }
                },
                "required": [
                  "subject_id",
                  "kind",
                  "presence",
                  "identity_verified",
                  "document_verified",
                  "note",
                  "expected_revision"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated sport check-in dossier",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_bound",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "sensitive_mutation",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/sport-checkin/matches/{matchId}/finalize": {
      "post": {
        "summary": "Finalize the sporting check-in and issue its receipt",
        "tags": [
          "admin",
          "sport-checkin"
        ],
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "expected_revision": {
                    "type": "integer",
                    "exclusiveMinimum": 0
                  },
                  "idempotency_key": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 200
                  }
                },
                "required": [
                  "expected_revision",
                  "idempotency_key"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Final sport check-in receipt",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_bound",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "sensitive_mutation",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/queue-views": {
      "get": {
        "summary": "List operator-owned saved queue views",
        "tags": [
          "admin",
          "queues"
        ],
        "responses": {
          "200": {
            "description": "Saved queue views",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_bound",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal",
        "parameters": [
          {
            "name": "queue",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "approval",
                "reports",
                "ratings",
                "corrections",
                "assignments",
                "certifications",
                "discipline"
              ]
            }
          }
        ]
      },
      "post": {
        "summary": "Save or update an operator-owned queue view",
        "tags": [
          "admin",
          "queues"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "queue": {
                    "type": "string",
                    "enum": [
                      "approval",
                      "reports",
                      "ratings",
                      "corrections",
                      "assignments",
                      "certifications",
                      "discipline"
                    ]
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "filters": {
                    "type": "object",
                    "properties": {
                      "status": {
                        "oneOf": [
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 80
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "search": {
                        "oneOf": [
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 120
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "sla": {
                        "type": "string",
                        "enum": [
                          "all",
                          "due",
                          "breached"
                        ]
                      }
                    },
                    "required": [
                      "status",
                      "search",
                      "sla"
                    ]
                  },
                  "sort": {
                    "type": "string",
                    "enum": [
                      "oldest",
                      "newest",
                      "sla"
                    ]
                  },
                  "page_size": {
                    "type": "integer",
                    "minimum": 10,
                    "maximum": 100
                  }
                },
                "required": [
                  "queue",
                  "name",
                  "filters",
                  "sort",
                  "page_size"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Saved queue view",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_bound",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "sensitive_mutation",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/queue-views/{viewId}": {
      "delete": {
        "summary": "Delete an operator-owned queue view",
        "tags": [
          "admin",
          "queues"
        ],
        "parameters": [
          {
            "name": "viewId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_bound",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "sensitive_mutation",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/queues/bulk-return": {
      "post": {
        "summary": "Bulk return report or rating queue items with a reconciliable receipt",
        "tags": [
          "admin",
          "queues"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "queue": {
                    "type": "string",
                    "enum": [
                      "reports",
                      "ratings"
                    ]
                  },
                  "item_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "minItems": 1,
                    "maxItems": 100
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  },
                  "idempotency_key": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 200
                  }
                },
                "required": [
                  "queue",
                  "item_ids",
                  "reason",
                  "idempotency_key"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Bulk operation receipt",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "207": {
            "description": "Partially applied bulk receipt",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_bound",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "sensitive_mutation",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/certifications/readiness": {
      "get": {
        "summary": "Read entitlement-aligned certification and signer readiness",
        "tags": [
          "admin",
          "certifications"
        ],
        "responses": {
          "200": {
            "description": "Certification readiness",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_bound",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/me/team-area/corrections": {
      "get": {
        "summary": "Read team corrections under explicit team, tournament and season scope",
        "tags": [
          "team-area"
        ],
        "responses": {
          "200": {
            "description": "Scoped team corrections",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": false,
        "x-privacy-classification": "sensitive_pii",
        "parameters": [
          {
            "name": "team_id",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "name": "tournament_id",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "name": "season_id",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ]
      }
    },
    "/me/team-area/corrections/eligible-matches": {
      "get": {
        "summary": "Read the team's recent homologated matches with correction eligibility and the OG-18 window",
        "tags": [
          "team-area"
        ],
        "responses": {
          "200": {
            "description": "Correction-eligible matches",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_bound",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": false,
        "x-privacy-classification": "sensitive_pii",
        "parameters": [
          {
            "name": "team_id",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "name": "tournament_id",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ]
      }
    },
    "/admin/propagation/receipts/{receiptId}": {
      "get": {
        "summary": "Read a durable web/mobile cache propagation receipt",
        "tags": [
          "admin",
          "publishing"
        ],
        "parameters": [
          {
            "name": "receiptId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Propagation receipt",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_bound",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/tenants/switch": {
      "post": {
        "summary": "Issue a signed, expiring and attributable tenant switch",
        "tags": [
          "admin",
          "tenancy"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "target_tenant_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 500
                  }
                },
                "required": [
                  "target_tenant_id",
                  "reason"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Tenant switch bearer and receipt",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_bound",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "sensitive_mutation",
        "x-audit-required": true,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/feed/candidates": {
      "get": {
        "summary": "List authoritative feed generation candidates",
        "tags": [
          "admin",
          "feed"
        ],
        "responses": {
          "200": {
            "description": "Feed candidate projection",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_bound",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/white-label/atomic/reconcile": {
      "post": {
        "summary": "Diff a preserved local white-label draft against the server head",
        "tags": [
          "admin",
          "white-label"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "tenant_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "organization_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "expected_etag": {
                    "oneOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "idempotency_key": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 200
                  },
                  "base": {
                    "type": "object",
                    "properties": {
                      "brand_name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 200
                      },
                      "primary_color": {
                        "type": "string",
                        "pattern": "^#[0-9A-Fa-f]{6}$"
                      },
                      "logo_url": {
                        "type": "string",
                        "format": "uri"
                      },
                      "favicon_url": {
                        "type": "string",
                        "format": "uri"
                      },
                      "custom_domain": {
                        "oneOf": [
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 255
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "legal_footer": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 1000
                      },
                      "home_featured_match_id": {
                        "oneOf": [
                          {
                            "type": "string",
                            "format": "uuid"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "home_live_badge_enabled": {
                        "type": "boolean"
                      },
                      "home_spotlight_mode": {
                        "type": "string",
                        "enum": [
                          "auto",
                          "pinned",
                          "hidden"
                        ]
                      },
                      "home_spotlight_message": {
                        "oneOf": [
                          {
                            "type": "string",
                            "maxLength": 120
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "communication_ack_due_hours": {
                        "oneOf": [
                          {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 720
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "brand_name",
                      "primary_color",
                      "logo_url",
                      "favicon_url",
                      "custom_domain",
                      "legal_footer"
                    ]
                  },
                  "extras": {
                    "type": "object",
                    "properties": {
                      "public_subdomain": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 63
                      },
                      "secondary_color": {
                        "type": "string",
                        "pattern": "^#[0-9A-Fa-f]{6}$"
                      },
                      "active_modules": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "data_visibility": {
                        "type": "string",
                        "enum": [
                          "public",
                          "members_only",
                          "mixed"
                        ]
                      },
                      "default_language": {
                        "type": "string",
                        "minLength": 2,
                        "maxLength": 8
                      },
                      "terms_url": {
                        "oneOf": [
                          {
                            "type": "string",
                            "format": "uri"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "privacy_url": {
                        "oneOf": [
                          {
                            "type": "string",
                            "format": "uri"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "public_subdomain",
                      "secondary_color",
                      "active_modules",
                      "data_visibility",
                      "default_language",
                      "terms_url",
                      "privacy_url"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "tenant_id",
                  "organization_id",
                  "expected_etag",
                  "idempotency_key",
                  "base",
                  "extras"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Field reconciliation dossier",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_bound",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/news/{newsArticleId}/preflight": {
      "post": {
        "summary": "Preview and preflight news publication bindings and channels",
        "tags": [
          "admin",
          "news"
        ],
        "parameters": [
          {
            "name": "newsArticleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "send_notification": {
                    "type": "boolean"
                  },
                  "show_in_feed": {
                    "type": "boolean"
                  },
                  "notification_template_id": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "original_published_on": {
                    "type": "string",
                    "format": "date"
                  },
                  "original_source": {
                    "type": "object",
                    "properties": {
                      "system": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "id": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64
                      },
                      "url": {
                        "type": "string",
                        "format": "uri",
                        "pattern": "^https?:\\/\\/"
                      }
                    },
                    "required": [
                      "system",
                      "id",
                      "url"
                    ]
                  },
                  "original_content": {
                    "type": "object",
                    "properties": {
                      "media_hosting": {
                        "type": "string",
                        "enum": [
                          "external_source"
                        ]
                      },
                      "cover_image": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "url": {
                                "type": "string",
                                "format": "uri",
                                "pattern": "^https?:\\/\\/"
                              },
                              "caption": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 300
                              }
                            },
                            "required": [
                              "url"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "images": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "url": {
                              "type": "string",
                              "format": "uri",
                              "pattern": "^https?:\\/\\/"
                            },
                            "caption": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 300
                            }
                          },
                          "required": [
                            "url"
                          ]
                        },
                        "maxItems": 20
                      },
                      "videos": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "provider": {
                              "type": "string",
                              "enum": [
                                "youtube",
                                "facebook"
                              ]
                            },
                            "url": {
                              "type": "string",
                              "format": "uri",
                              "pattern": "^https?:\\/\\/"
                            },
                            "video_id": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 64,
                              "pattern": "^[A-Za-z0-9_-]+$"
                            },
                            "title": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 200
                            }
                          },
                          "required": [
                            "provider",
                            "url"
                          ]
                        },
                        "maxItems": 20
                      },
                      "links": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "url": {
                              "type": "string",
                              "format": "uri",
                              "pattern": "^https?:\\/\\/"
                            },
                            "label": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 200
                            }
                          },
                          "required": [
                            "url"
                          ]
                        },
                        "maxItems": 100
                      }
                    },
                    "required": [
                      "media_hosting",
                      "cover_image",
                      "images",
                      "videos",
                      "links"
                    ]
                  }
                },
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "News publication preflight",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_bound",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/content-pages/{contentPageId}/preflight": {
      "post": {
        "summary": "Preview and preflight CMS publication",
        "tags": [
          "admin",
          "content"
        ],
        "parameters": [
          {
            "name": "contentPageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "acknowledge_personal_data": {
                    "type": "boolean"
                  }
                },
                "required": [],
                "default": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "CMS publication preflight",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_bound",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/sponsors/placement-registry": {
      "get": {
        "summary": "Read the versioned sponsor placement contract",
        "tags": [
          "admin",
          "sponsors"
        ],
        "responses": {
          "200": {
            "description": "Sponsor placement registry",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_bound",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/admin/sponsors/campaigns/{campaignId}/preflight": {
      "post": {
        "summary": "Preflight sponsor inventory, policy, window and previews",
        "tags": [
          "admin",
          "sponsors"
        ],
        "parameters": [
          {
            "name": "campaignId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sponsor activation preflight",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "tenant_bound",
        "x-admin-cockpit-required": true,
        "x-rate-limit-tier": "admin",
        "x-audit-required": false,
        "x-privacy-classification": "tenant_internal"
      }
    },
    "/public/cities": {
      "get": {
        "summary": "List authoritative public city scopes",
        "tags": [
          "public",
          "cities"
        ],
        "responses": {
          "200": {
            "description": "Public city scope catalog",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "organization_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "city_slug": {
                            "type": "string"
                          },
                          "city_name": {
                            "type": "string"
                          },
                          "city_status": {
                            "type": "string",
                            "enum": [
                              "live",
                              "coming_soon"
                            ]
                          },
                          "canonical_path": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "organization_id",
                          "city_slug",
                          "city_name",
                          "city_status",
                          "canonical_path"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "scope_authority": {
                      "type": "string",
                      "const": "server"
                    }
                  },
                  "required": [
                    "items",
                    "scope_authority"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "items": [
                    {
                      "organization_id": "10000000-0000-4000-8000-000000000001",
                      "city_slug": "milano",
                      "city_name": "Milano",
                      "city_status": "live",
                      "canonical_path": "/cities/milano"
                    }
                  ],
                  "scope_authority": "server"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read:public.teams"
            ]
          }
        ],
        "x-tenant-scope": "public",
        "x-rate-limit-tier": "public_widget",
        "x-audit-required": false,
        "x-privacy-classification": "public"
      }
    },
    "/public/home": {
      "get": {
        "summary": "Read the aggregated SSR home model for one city scope",
        "tags": [
          "public",
          "home"
        ],
        "parameters": [
          {
            "name": "city_slug",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "season_slug",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "match_window",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Scoped home model",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "scope": {
                      "type": "object",
                      "properties": {
                        "organization_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "city_slug": {
                          "type": "string"
                        },
                        "city_name": {
                          "type": "string"
                        },
                        "city_status": {
                          "type": "string",
                          "enum": [
                            "live",
                            "coming_soon"
                          ]
                        }
                      },
                      "required": [
                        "organization_id",
                        "city_slug",
                        "city_name",
                        "city_status"
                      ],
                      "additionalProperties": false
                    },
                    "competitions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "slug": {
                            "type": "string"
                          },
                          "label": {
                            "type": "string"
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "championship",
                              "tournament"
                            ]
                          },
                          "format": {
                            "type": "string",
                            "enum": [
                              "league",
                              "league_with_playoffs",
                              "cup",
                              "group_then_knockout"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "draft",
                              "ready",
                              "scheduled",
                              "in_progress",
                              "completed",
                              "playoffs",
                              "archived",
                              "unpublished"
                            ]
                          },
                          "starts_on": {
                            "type": "string",
                            "format": "date"
                          },
                          "ends_on": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "date"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "scope": {
                            "type": "object",
                            "properties": {
                              "organization_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "city_slug": {
                                "type": "string"
                              },
                              "city_name": {
                                "type": "string"
                              },
                              "city_status": {
                                "type": "string",
                                "enum": [
                                  "live",
                                  "coming_soon"
                                ]
                              }
                            },
                            "required": [
                              "organization_id",
                              "city_slug",
                              "city_name",
                              "city_status"
                            ],
                            "additionalProperties": false
                          },
                          "season": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "slug": {
                                    "type": "string"
                                  },
                                  "label": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "id",
                                  "slug",
                                  "label"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "has_bracket": {
                            "type": "boolean"
                          },
                          "canonical_path": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "slug",
                          "label",
                          "kind",
                          "format",
                          "status",
                          "starts_on",
                          "ends_on",
                          "scope",
                          "season",
                          "has_bracket",
                          "canonical_path"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "teams": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "slug": {
                            "type": "string"
                          },
                          "label": {
                            "type": "string"
                          },
                          "short_name": {
                            "type": "string"
                          },
                          "crest": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "const": "available"
                                  },
                                  "url": {
                                    "type": "string",
                                    "format": "uri"
                                  }
                                },
                                "required": [
                                  "state",
                                  "url"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "const": "unavailable"
                                  },
                                  "reason": {
                                    "type": "string",
                                    "const": "moderated_crest_not_published"
                                  }
                                },
                                "required": [
                                  "state",
                                  "reason"
                                ],
                                "additionalProperties": false
                              }
                            ]
                          },
                          "colors": {
                            "type": "object",
                            "properties": {
                              "primary": {
                                "type": "string"
                              },
                              "secondary": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "primary",
                              "secondary"
                            ],
                            "additionalProperties": false
                          },
                          "logo_url": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uri"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "slug",
                          "label",
                          "short_name",
                          "crest",
                          "colors",
                          "logo_url"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "matches": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "scheduled_at": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "schedule_precision": {
                            "type": "string",
                            "enum": [
                              "exact",
                              "date_only",
                              "unknown"
                            ]
                          },
                          "scheduled_on": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "date"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "state": {
                            "type": "string",
                            "enum": [
                              "scheduled",
                              "live",
                              "ended",
                              "report_draft",
                              "report_submitted",
                              "report_official",
                              "corrected",
                              "cancelled",
                              "postponed"
                            ]
                          },
                          "home_team": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "slug": {
                                "type": "string"
                              },
                              "label": {
                                "type": "string"
                              },
                              "short_name": {
                                "type": "string"
                              },
                              "crest": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "state": {
                                        "type": "string",
                                        "const": "available"
                                      },
                                      "url": {
                                        "type": "string",
                                        "format": "uri"
                                      }
                                    },
                                    "required": [
                                      "state",
                                      "url"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "state": {
                                        "type": "string",
                                        "const": "unavailable"
                                      },
                                      "reason": {
                                        "type": "string",
                                        "const": "moderated_crest_not_published"
                                      }
                                    },
                                    "required": [
                                      "state",
                                      "reason"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "colors": {
                                "type": "object",
                                "properties": {
                                  "primary": {
                                    "type": "string"
                                  },
                                  "secondary": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "primary",
                                  "secondary"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "id",
                              "slug",
                              "label",
                              "short_name",
                              "crest",
                              "colors"
                            ],
                            "additionalProperties": false
                          },
                          "away_team": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "slug": {
                                "type": "string"
                              },
                              "label": {
                                "type": "string"
                              },
                              "short_name": {
                                "type": "string"
                              },
                              "crest": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "state": {
                                        "type": "string",
                                        "const": "available"
                                      },
                                      "url": {
                                        "type": "string",
                                        "format": "uri"
                                      }
                                    },
                                    "required": [
                                      "state",
                                      "url"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "state": {
                                        "type": "string",
                                        "const": "unavailable"
                                      },
                                      "reason": {
                                        "type": "string",
                                        "const": "moderated_crest_not_published"
                                      }
                                    },
                                    "required": [
                                      "state",
                                      "reason"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "colors": {
                                "type": "object",
                                "properties": {
                                  "primary": {
                                    "type": "string"
                                  },
                                  "secondary": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "primary",
                                  "secondary"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "id",
                              "slug",
                              "label",
                              "short_name",
                              "crest",
                              "colors"
                            ],
                            "additionalProperties": false
                          },
                          "score": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "home": {
                                    "type": "number"
                                  },
                                  "away": {
                                    "type": "number"
                                  }
                                },
                                "required": [
                                  "home",
                                  "away"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "live_started_at": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "live_ended_at": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "scope": {
                            "type": "object",
                            "properties": {
                              "organization_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "city_slug": {
                                "type": "string"
                              },
                              "city_name": {
                                "type": "string"
                              },
                              "city_status": {
                                "type": "string",
                                "enum": [
                                  "live",
                                  "coming_soon"
                                ]
                              }
                            },
                            "required": [
                              "organization_id",
                              "city_slug",
                              "city_name",
                              "city_status"
                            ],
                            "additionalProperties": false
                          },
                          "competition": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "slug": {
                                "type": "string"
                              },
                              "label": {
                                "type": "string"
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "championship",
                                  "tournament"
                                ]
                              },
                              "format": {
                                "type": "string",
                                "enum": [
                                  "league",
                                  "league_with_playoffs",
                                  "cup",
                                  "group_then_knockout"
                                ]
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "draft",
                                  "ready",
                                  "scheduled",
                                  "in_progress",
                                  "completed",
                                  "playoffs",
                                  "archived",
                                  "unpublished"
                                ]
                              },
                              "starts_on": {
                                "type": "string",
                                "format": "date"
                              },
                              "ends_on": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "format": "date"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "scope": {
                                "type": "object",
                                "properties": {
                                  "organization_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "city_slug": {
                                    "type": "string"
                                  },
                                  "city_name": {
                                    "type": "string"
                                  },
                                  "city_status": {
                                    "type": "string",
                                    "enum": [
                                      "live",
                                      "coming_soon"
                                    ]
                                  }
                                },
                                "required": [
                                  "organization_id",
                                  "city_slug",
                                  "city_name",
                                  "city_status"
                                ],
                                "additionalProperties": false
                              },
                              "season": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "slug": {
                                        "type": "string"
                                      },
                                      "label": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "slug",
                                      "label"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "has_bracket": {
                                "type": "boolean"
                              },
                              "canonical_path": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "slug",
                              "label",
                              "kind",
                              "format",
                              "status",
                              "starts_on",
                              "ends_on",
                              "scope",
                              "season",
                              "has_bracket",
                              "canonical_path"
                            ],
                            "additionalProperties": false
                          },
                          "round": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "label": {
                                    "type": "string"
                                  },
                                  "order_index": {
                                    "type": "number"
                                  }
                                },
                                "required": [
                                  "id",
                                  "label",
                                  "order_index"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "venue": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "const": "ready"
                                  },
                                  "id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "label": {
                                    "type": "string"
                                  },
                                  "address": {
                                    "oneOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "surface": {
                                    "oneOf": [
                                      {
                                        "type": "string",
                                        "enum": [
                                          "grass",
                                          "synthetic",
                                          "mixed",
                                          "indoor"
                                        ]
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "state",
                                  "id",
                                  "label",
                                  "address",
                                  "surface"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "const": "unavailable"
                                  },
                                  "reason": {
                                    "type": "object",
                                    "properties": {
                                      "code": {
                                        "type": "string"
                                      },
                                      "message": {
                                        "type": "string"
                                      },
                                      "retryable": {
                                        "type": "boolean"
                                      },
                                      "recovery_action": {
                                        "oneOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "code",
                                      "message",
                                      "retryable",
                                      "recovery_action"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "state",
                                  "reason"
                                ],
                                "additionalProperties": false
                              }
                            ]
                          },
                          "structure": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "const": "ready"
                                  },
                                  "phase": {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "id": {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          "label": {
                                            "type": "string"
                                          },
                                          "kind": {
                                            "type": "string",
                                            "enum": [
                                              "group_stage",
                                              "league",
                                              "knockout",
                                              "placement"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "id",
                                          "label",
                                          "kind"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "group": {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "id": {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          "label": {
                                            "type": "string"
                                          },
                                          "order_index": {
                                            "type": "number"
                                          }
                                        },
                                        "required": [
                                          "id",
                                          "label",
                                          "order_index"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "state",
                                  "phase",
                                  "group"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "const": "unavailable"
                                  },
                                  "phase": {
                                    "type": "null"
                                  },
                                  "group": {
                                    "type": "null"
                                  },
                                  "reason": {
                                    "type": "object",
                                    "properties": {
                                      "code": {
                                        "type": "string"
                                      },
                                      "message": {
                                        "type": "string"
                                      },
                                      "retryable": {
                                        "type": "boolean"
                                      },
                                      "recovery_action": {
                                        "oneOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "code",
                                      "message",
                                      "retryable",
                                      "recovery_action"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "state",
                                  "phase",
                                  "group",
                                  "reason"
                                ],
                                "additionalProperties": false
                              }
                            ]
                          },
                          "officiality": {
                            "type": "object",
                            "properties": {
                              "state": {
                                "type": "string",
                                "enum": [
                                  "scheduled",
                                  "live",
                                  "provisional",
                                  "official",
                                  "sub_iudice",
                                  "postponed",
                                  "cancelled"
                                ]
                              },
                              "is_official": {
                                "type": "boolean"
                              },
                              "reason": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "code": {
                                        "type": "string"
                                      },
                                      "message": {
                                        "type": "string"
                                      },
                                      "retryable": {
                                        "type": "boolean"
                                      },
                                      "recovery_action": {
                                        "oneOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "code",
                                      "message",
                                      "retryable",
                                      "recovery_action"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "state",
                              "is_official",
                              "reason"
                            ],
                            "additionalProperties": false
                          },
                          "status_reason": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "code": {
                                    "type": "string"
                                  },
                                  "message": {
                                    "type": "string"
                                  },
                                  "retryable": {
                                    "type": "boolean"
                                  },
                                  "recovery_action": {
                                    "oneOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "code",
                                  "message",
                                  "retryable",
                                  "recovery_action"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "result_origin": {
                            "oneOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "played",
                                  "forfeit"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "forfeit_trigger": {
                            "oneOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "no_show",
                                  "ineligible_player",
                                  "roster_below_minimum",
                                  "late_result_confirmation_both_secretariats"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "lineage": {
                            "type": "object",
                            "properties": {
                              "current_report_version_id": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "current_report_version": {
                                "oneOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "correction_of_report_version_id": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "amendment_set_id": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "is_sub_iudice": {
                                "type": "boolean"
                              },
                              "projection_revision_id": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "current_report_version_id",
                              "current_report_version",
                              "correction_of_report_version_id",
                              "amendment_set_id",
                              "is_sub_iudice",
                              "projection_revision_id"
                            ],
                            "additionalProperties": false
                          },
                          "lineups": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "side": {
                                  "type": "string",
                                  "enum": [
                                    "home",
                                    "away"
                                  ]
                                },
                                "entries": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "player_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "sport_name": {
                                        "type": "string"
                                      },
                                      "slug": {
                                        "type": "string"
                                      },
                                      "shirt_number": {
                                        "type": "number"
                                      },
                                      "role": {
                                        "oneOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "starting": {
                                        "type": "boolean"
                                      },
                                      "captain": {
                                        "type": "boolean"
                                      }
                                    },
                                    "required": [
                                      "player_id",
                                      "sport_name",
                                      "slug",
                                      "shirt_number",
                                      "role",
                                      "starting",
                                      "captain"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "protected_slots": {
                                  "type": "number"
                                }
                              },
                              "required": [
                                "side",
                                "entries",
                                "protected_slots"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "canonical_path": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "scheduled_at",
                          "schedule_precision",
                          "scheduled_on",
                          "state",
                          "home_team",
                          "away_team",
                          "score",
                          "live_started_at",
                          "live_ended_at",
                          "scope",
                          "competition",
                          "round",
                          "venue",
                          "structure",
                          "officiality",
                          "status_reason",
                          "result_origin",
                          "forfeit_trigger",
                          "lineage",
                          "lineups",
                          "canonical_path"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "freshness": {
                      "type": "object",
                      "properties": {
                        "state": {
                          "type": "string",
                          "enum": [
                            "fresh",
                            "no_authoritative_event"
                          ]
                        },
                        "generated_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "latest_authoritative_at": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "date-time"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "invalidation_cursor": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "events": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "source": {
                                "type": "string",
                                "enum": [
                                  "sport_truth",
                                  "publication"
                                ]
                              },
                              "cursor": {
                                "type": "string"
                              },
                              "occurred_at": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "consumers": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              }
                            },
                            "required": [
                              "source",
                              "cursor",
                              "occurred_at",
                              "consumers"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "reason": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string"
                                },
                                "message": {
                                  "type": "string"
                                },
                                "retryable": {
                                  "type": "boolean"
                                },
                                "recovery_action": {
                                  "oneOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "code",
                                "message",
                                "retryable",
                                "recovery_action"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "state",
                        "generated_at",
                        "latest_authoritative_at",
                        "invalidation_cursor",
                        "events",
                        "reason"
                      ],
                      "additionalProperties": false
                    },
                    "season_scope": {
                      "type": "object",
                      "properties": {
                        "requested_slug": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "defaulted",
                            "not_requested",
                            "applied",
                            "unknown"
                          ]
                        },
                        "applied_slug": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "competition_count": {
                          "type": "number"
                        },
                        "reason": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string"
                                },
                                "message": {
                                  "type": "string"
                                },
                                "retryable": {
                                  "type": "boolean"
                                },
                                "recovery_action": {
                                  "oneOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "code",
                                "message",
                                "retryable",
                                "recovery_action"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "requested_slug",
                        "state",
                        "applied_slug",
                        "competition_count",
                        "reason"
                      ],
                      "additionalProperties": false
                    },
                    "seasons": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "slug": {
                            "type": "string"
                          },
                          "label": {
                            "type": "string"
                          },
                          "starts_on": {
                            "type": "string",
                            "format": "date"
                          },
                          "ends_on": {
                            "type": "string",
                            "format": "date"
                          },
                          "competition_count": {
                            "type": "number"
                          },
                          "is_current": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "id",
                          "slug",
                          "label",
                          "starts_on",
                          "ends_on",
                          "competition_count",
                          "is_current"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "match_window": {
                      "type": "object",
                      "properties": {
                        "state": {
                          "type": "string",
                          "const": "window"
                        },
                        "per_side": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "state",
                        "per_side"
                      ],
                      "additionalProperties": false
                    },
                    "state": {
                      "type": "string",
                      "const": "ready"
                    },
                    "spotlight": {
                      "type": "object",
                      "properties": {
                        "mode": {
                          "type": "string",
                          "enum": [
                            "auto",
                            "pinned",
                            "hidden"
                          ]
                        },
                        "message": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "resolved_by": {
                          "type": "string",
                          "enum": [
                            "pinned",
                            "auto_live",
                            "auto_next",
                            "auto_last",
                            "hidden",
                            "no_match"
                          ]
                        },
                        "refresh_hint": {
                          "type": "string",
                          "enum": [
                            "live",
                            "imminent",
                            "idle"
                          ]
                        },
                        "refresh_after_seconds": {
                          "oneOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "server_time": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "pin_out_of_scope": {
                          "type": "boolean"
                        },
                        "pin_reason": {
                          "oneOf": [
                            {
                              "type": "string",
                              "enum": [
                                "out_of_scope",
                                "out_of_season",
                                "cancelled"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "match": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "scheduled_at": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "format": "date-time"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "schedule_precision": {
                                  "type": "string",
                                  "enum": [
                                    "exact",
                                    "date_only",
                                    "unknown"
                                  ]
                                },
                                "scheduled_on": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "format": "date"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "state": {
                                  "type": "string",
                                  "enum": [
                                    "scheduled",
                                    "live",
                                    "ended",
                                    "report_draft",
                                    "report_submitted",
                                    "report_official",
                                    "corrected",
                                    "cancelled",
                                    "postponed"
                                  ]
                                },
                                "home_team": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "slug": {
                                      "type": "string"
                                    },
                                    "label": {
                                      "type": "string"
                                    },
                                    "short_name": {
                                      "type": "string"
                                    },
                                    "crest": {
                                      "oneOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "state": {
                                              "type": "string",
                                              "const": "available"
                                            },
                                            "url": {
                                              "type": "string",
                                              "format": "uri"
                                            }
                                          },
                                          "required": [
                                            "state",
                                            "url"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "state": {
                                              "type": "string",
                                              "const": "unavailable"
                                            },
                                            "reason": {
                                              "type": "string",
                                              "const": "moderated_crest_not_published"
                                            }
                                          },
                                          "required": [
                                            "state",
                                            "reason"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ]
                                    },
                                    "colors": {
                                      "type": "object",
                                      "properties": {
                                        "primary": {
                                          "type": "string"
                                        },
                                        "secondary": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "primary",
                                        "secondary"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "slug",
                                    "label",
                                    "short_name",
                                    "crest",
                                    "colors"
                                  ],
                                  "additionalProperties": false
                                },
                                "away_team": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "slug": {
                                      "type": "string"
                                    },
                                    "label": {
                                      "type": "string"
                                    },
                                    "short_name": {
                                      "type": "string"
                                    },
                                    "crest": {
                                      "oneOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "state": {
                                              "type": "string",
                                              "const": "available"
                                            },
                                            "url": {
                                              "type": "string",
                                              "format": "uri"
                                            }
                                          },
                                          "required": [
                                            "state",
                                            "url"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "state": {
                                              "type": "string",
                                              "const": "unavailable"
                                            },
                                            "reason": {
                                              "type": "string",
                                              "const": "moderated_crest_not_published"
                                            }
                                          },
                                          "required": [
                                            "state",
                                            "reason"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ]
                                    },
                                    "colors": {
                                      "type": "object",
                                      "properties": {
                                        "primary": {
                                          "type": "string"
                                        },
                                        "secondary": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "primary",
                                        "secondary"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "slug",
                                    "label",
                                    "short_name",
                                    "crest",
                                    "colors"
                                  ],
                                  "additionalProperties": false
                                },
                                "score": {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "home": {
                                          "type": "number"
                                        },
                                        "away": {
                                          "type": "number"
                                        }
                                      },
                                      "required": [
                                        "home",
                                        "away"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "live_started_at": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "format": "date-time"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "live_ended_at": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "format": "date-time"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "scope": {
                                  "type": "object",
                                  "properties": {
                                    "organization_id": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "city_slug": {
                                      "type": "string"
                                    },
                                    "city_name": {
                                      "type": "string"
                                    },
                                    "city_status": {
                                      "type": "string",
                                      "enum": [
                                        "live",
                                        "coming_soon"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "organization_id",
                                    "city_slug",
                                    "city_name",
                                    "city_status"
                                  ],
                                  "additionalProperties": false
                                },
                                "competition": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "slug": {
                                      "type": "string"
                                    },
                                    "label": {
                                      "type": "string"
                                    },
                                    "kind": {
                                      "type": "string",
                                      "enum": [
                                        "championship",
                                        "tournament"
                                      ]
                                    },
                                    "format": {
                                      "type": "string",
                                      "enum": [
                                        "league",
                                        "league_with_playoffs",
                                        "cup",
                                        "group_then_knockout"
                                      ]
                                    },
                                    "status": {
                                      "type": "string",
                                      "enum": [
                                        "draft",
                                        "ready",
                                        "scheduled",
                                        "in_progress",
                                        "completed",
                                        "playoffs",
                                        "archived",
                                        "unpublished"
                                      ]
                                    },
                                    "starts_on": {
                                      "type": "string",
                                      "format": "date"
                                    },
                                    "ends_on": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "format": "date"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "scope": {
                                      "type": "object",
                                      "properties": {
                                        "organization_id": {
                                          "type": "string",
                                          "format": "uuid"
                                        },
                                        "city_slug": {
                                          "type": "string"
                                        },
                                        "city_name": {
                                          "type": "string"
                                        },
                                        "city_status": {
                                          "type": "string",
                                          "enum": [
                                            "live",
                                            "coming_soon"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "organization_id",
                                        "city_slug",
                                        "city_name",
                                        "city_status"
                                      ],
                                      "additionalProperties": false
                                    },
                                    "season": {
                                      "oneOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "type": "string",
                                              "format": "uuid"
                                            },
                                            "slug": {
                                              "type": "string"
                                            },
                                            "label": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "id",
                                            "slug",
                                            "label"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "has_bracket": {
                                      "type": "boolean"
                                    },
                                    "canonical_path": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "slug",
                                    "label",
                                    "kind",
                                    "format",
                                    "status",
                                    "starts_on",
                                    "ends_on",
                                    "scope",
                                    "season",
                                    "has_bracket",
                                    "canonical_path"
                                  ],
                                  "additionalProperties": false
                                },
                                "round": {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string",
                                          "format": "uuid"
                                        },
                                        "label": {
                                          "type": "string"
                                        },
                                        "order_index": {
                                          "type": "number"
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "label",
                                        "order_index"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "venue": {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "state": {
                                          "type": "string",
                                          "const": "ready"
                                        },
                                        "id": {
                                          "type": "string",
                                          "format": "uuid"
                                        },
                                        "label": {
                                          "type": "string"
                                        },
                                        "address": {
                                          "oneOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "surface": {
                                          "oneOf": [
                                            {
                                              "type": "string",
                                              "enum": [
                                                "grass",
                                                "synthetic",
                                                "mixed",
                                                "indoor"
                                              ]
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      },
                                      "required": [
                                        "state",
                                        "id",
                                        "label",
                                        "address",
                                        "surface"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "state": {
                                          "type": "string",
                                          "const": "unavailable"
                                        },
                                        "reason": {
                                          "type": "object",
                                          "properties": {
                                            "code": {
                                              "type": "string"
                                            },
                                            "message": {
                                              "type": "string"
                                            },
                                            "retryable": {
                                              "type": "boolean"
                                            },
                                            "recovery_action": {
                                              "oneOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "code",
                                            "message",
                                            "retryable",
                                            "recovery_action"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "state",
                                        "reason"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                },
                                "structure": {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "state": {
                                          "type": "string",
                                          "const": "ready"
                                        },
                                        "phase": {
                                          "oneOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "id": {
                                                  "type": "string",
                                                  "format": "uuid"
                                                },
                                                "label": {
                                                  "type": "string"
                                                },
                                                "kind": {
                                                  "type": "string",
                                                  "enum": [
                                                    "group_stage",
                                                    "league",
                                                    "knockout",
                                                    "placement"
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "id",
                                                "label",
                                                "kind"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "group": {
                                          "oneOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "id": {
                                                  "type": "string",
                                                  "format": "uuid"
                                                },
                                                "label": {
                                                  "type": "string"
                                                },
                                                "order_index": {
                                                  "type": "number"
                                                }
                                              },
                                              "required": [
                                                "id",
                                                "label",
                                                "order_index"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      },
                                      "required": [
                                        "state",
                                        "phase",
                                        "group"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "state": {
                                          "type": "string",
                                          "const": "unavailable"
                                        },
                                        "phase": {
                                          "type": "null"
                                        },
                                        "group": {
                                          "type": "null"
                                        },
                                        "reason": {
                                          "type": "object",
                                          "properties": {
                                            "code": {
                                              "type": "string"
                                            },
                                            "message": {
                                              "type": "string"
                                            },
                                            "retryable": {
                                              "type": "boolean"
                                            },
                                            "recovery_action": {
                                              "oneOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "code",
                                            "message",
                                            "retryable",
                                            "recovery_action"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "state",
                                        "phase",
                                        "group",
                                        "reason"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                },
                                "officiality": {
                                  "type": "object",
                                  "properties": {
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "scheduled",
                                        "live",
                                        "provisional",
                                        "official",
                                        "sub_iudice",
                                        "postponed",
                                        "cancelled"
                                      ]
                                    },
                                    "is_official": {
                                      "type": "boolean"
                                    },
                                    "reason": {
                                      "oneOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "code": {
                                              "type": "string"
                                            },
                                            "message": {
                                              "type": "string"
                                            },
                                            "retryable": {
                                              "type": "boolean"
                                            },
                                            "recovery_action": {
                                              "oneOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "code",
                                            "message",
                                            "retryable",
                                            "recovery_action"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "state",
                                    "is_official",
                                    "reason"
                                  ],
                                  "additionalProperties": false
                                },
                                "status_reason": {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "code": {
                                          "type": "string"
                                        },
                                        "message": {
                                          "type": "string"
                                        },
                                        "retryable": {
                                          "type": "boolean"
                                        },
                                        "recovery_action": {
                                          "oneOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      },
                                      "required": [
                                        "code",
                                        "message",
                                        "retryable",
                                        "recovery_action"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "result_origin": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "enum": [
                                        "played",
                                        "forfeit"
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "forfeit_trigger": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "enum": [
                                        "no_show",
                                        "ineligible_player",
                                        "roster_below_minimum",
                                        "late_result_confirmation_both_secretariats"
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "lineage": {
                                  "type": "object",
                                  "properties": {
                                    "current_report_version_id": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "format": "uuid"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "current_report_version": {
                                      "oneOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "correction_of_report_version_id": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "format": "uuid"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "amendment_set_id": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "format": "uuid"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "is_sub_iudice": {
                                      "type": "boolean"
                                    },
                                    "projection_revision_id": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "format": "uuid"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "current_report_version_id",
                                    "current_report_version",
                                    "correction_of_report_version_id",
                                    "amendment_set_id",
                                    "is_sub_iudice",
                                    "projection_revision_id"
                                  ],
                                  "additionalProperties": false
                                },
                                "lineups": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "side": {
                                        "type": "string",
                                        "enum": [
                                          "home",
                                          "away"
                                        ]
                                      },
                                      "entries": {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "player_id": {
                                              "type": "string",
                                              "format": "uuid"
                                            },
                                            "sport_name": {
                                              "type": "string"
                                            },
                                            "slug": {
                                              "type": "string"
                                            },
                                            "shirt_number": {
                                              "type": "number"
                                            },
                                            "role": {
                                              "oneOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "starting": {
                                              "type": "boolean"
                                            },
                                            "captain": {
                                              "type": "boolean"
                                            }
                                          },
                                          "required": [
                                            "player_id",
                                            "sport_name",
                                            "slug",
                                            "shirt_number",
                                            "role",
                                            "starting",
                                            "captain"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "protected_slots": {
                                        "type": "number"
                                      }
                                    },
                                    "required": [
                                      "side",
                                      "entries",
                                      "protected_slots"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "canonical_path": {
                                  "type": "string"
                                },
                                "periods_completed": {
                                  "type": "number"
                                },
                                "last_event": {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "kind": {
                                          "type": "string"
                                        },
                                        "minute": {
                                          "oneOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "team_side": {
                                          "oneOf": [
                                            {
                                              "type": "string",
                                              "enum": [
                                                "home",
                                                "away"
                                              ]
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "label": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "kind",
                                        "minute",
                                        "team_side",
                                        "label"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "id",
                                "scheduled_at",
                                "schedule_precision",
                                "scheduled_on",
                                "state",
                                "home_team",
                                "away_team",
                                "score",
                                "live_started_at",
                                "live_ended_at",
                                "scope",
                                "competition",
                                "round",
                                "venue",
                                "structure",
                                "officiality",
                                "status_reason",
                                "result_origin",
                                "forfeit_trigger",
                                "lineage",
                                "lineups",
                                "canonical_path",
                                "periods_completed",
                                "last_event"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "mode",
                        "message",
                        "resolved_by",
                        "refresh_hint",
                        "refresh_after_seconds",
                        "server_time",
                        "pin_out_of_scope",
                        "pin_reason",
                        "match"
                      ],
                      "additionalProperties": false
                    },
                    "editorial_scope": {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "tenant_global"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "kind",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "scope",
                    "competitions",
                    "teams",
                    "matches",
                    "freshness",
                    "season_scope",
                    "seasons",
                    "match_window",
                    "state",
                    "spotlight",
                    "editorial_scope"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable city scope",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "state": {
                      "type": "string",
                      "const": "unavailable"
                    },
                    "scope": {
                      "type": "object",
                      "properties": {
                        "organization_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "city_slug": {
                          "type": "string"
                        },
                        "city_name": {
                          "type": "string"
                        },
                        "city_status": {
                          "type": "string",
                          "enum": [
                            "live",
                            "coming_soon"
                          ]
                        }
                      },
                      "required": [
                        "organization_id",
                        "city_slug",
                        "city_name",
                        "city_status"
                      ],
                      "additionalProperties": false
                    },
                    "reason": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "retryable": {
                          "type": "boolean"
                        },
                        "recovery_action": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "retryable",
                        "recovery_action"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "state",
                    "scope",
                    "reason"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read:public.matches"
            ]
          }
        ],
        "x-tenant-scope": "public",
        "x-rate-limit-tier": "public_widget",
        "x-audit-required": false,
        "x-privacy-classification": "public"
      }
    },
    "/public/competitions": {
      "get": {
        "summary": "List canonical championships and tournaments for one city",
        "tags": [
          "public",
          "competitions"
        ],
        "parameters": [
          {
            "name": "city_slug",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Scoped competition catalog",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "scope": {
                      "type": "object",
                      "properties": {
                        "organization_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "city_slug": {
                          "type": "string"
                        },
                        "city_name": {
                          "type": "string"
                        },
                        "city_status": {
                          "type": "string",
                          "enum": [
                            "live",
                            "coming_soon"
                          ]
                        }
                      },
                      "required": [
                        "organization_id",
                        "city_slug",
                        "city_name",
                        "city_status"
                      ],
                      "additionalProperties": false
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "slug": {
                            "type": "string"
                          },
                          "label": {
                            "type": "string"
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "championship",
                              "tournament"
                            ]
                          },
                          "format": {
                            "type": "string",
                            "enum": [
                              "league",
                              "league_with_playoffs",
                              "cup",
                              "group_then_knockout"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "draft",
                              "ready",
                              "scheduled",
                              "in_progress",
                              "completed",
                              "playoffs",
                              "archived",
                              "unpublished"
                            ]
                          },
                          "starts_on": {
                            "type": "string",
                            "format": "date"
                          },
                          "ends_on": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "date"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "scope": {
                            "type": "object",
                            "properties": {
                              "organization_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "city_slug": {
                                "type": "string"
                              },
                              "city_name": {
                                "type": "string"
                              },
                              "city_status": {
                                "type": "string",
                                "enum": [
                                  "live",
                                  "coming_soon"
                                ]
                              }
                            },
                            "required": [
                              "organization_id",
                              "city_slug",
                              "city_name",
                              "city_status"
                            ],
                            "additionalProperties": false
                          },
                          "season": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "slug": {
                                    "type": "string"
                                  },
                                  "label": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "id",
                                  "slug",
                                  "label"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "has_bracket": {
                            "type": "boolean"
                          },
                          "canonical_path": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "slug",
                          "label",
                          "kind",
                          "format",
                          "status",
                          "starts_on",
                          "ends_on",
                          "scope",
                          "season",
                          "has_bracket",
                          "canonical_path"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "scope",
                    "items"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Unavailable city scope",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "state": {
                      "type": "string",
                      "const": "unavailable"
                    },
                    "scope": {
                      "type": "object",
                      "properties": {
                        "organization_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "city_slug": {
                          "type": "string"
                        },
                        "city_name": {
                          "type": "string"
                        },
                        "city_status": {
                          "type": "string",
                          "enum": [
                            "live",
                            "coming_soon"
                          ]
                        }
                      },
                      "required": [
                        "organization_id",
                        "city_slug",
                        "city_name",
                        "city_status"
                      ],
                      "additionalProperties": false
                    },
                    "reason": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "retryable": {
                          "type": "boolean"
                        },
                        "recovery_action": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "retryable",
                        "recovery_action"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "state",
                    "scope",
                    "reason"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read:public.matches"
            ]
          }
        ],
        "x-tenant-scope": "public",
        "x-rate-limit-tier": "public_widget",
        "x-audit-required": false,
        "x-privacy-classification": "public"
      }
    },
    "/public/read-model/matches": {
      "get": {
        "summary": "List complete public match read-models with a stable cursor",
        "tags": [
          "public",
          "matches"
        ],
        "parameters": [
          {
            "name": "city_slug",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "team_match_view",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "competition_slug",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "season_slug",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "officiality",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "round_label",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Public match page",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "scope": {
                      "type": "object",
                      "properties": {
                        "organization_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "city_slug": {
                          "type": "string"
                        },
                        "city_name": {
                          "type": "string"
                        },
                        "city_status": {
                          "type": "string",
                          "enum": [
                            "live",
                            "coming_soon"
                          ]
                        }
                      },
                      "required": [
                        "organization_id",
                        "city_slug",
                        "city_name",
                        "city_status"
                      ],
                      "additionalProperties": false
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "scheduled_at": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "schedule_precision": {
                            "type": "string",
                            "enum": [
                              "exact",
                              "date_only",
                              "unknown"
                            ]
                          },
                          "scheduled_on": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "date"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "state": {
                            "type": "string",
                            "enum": [
                              "scheduled",
                              "live",
                              "ended",
                              "report_draft",
                              "report_submitted",
                              "report_official",
                              "corrected",
                              "cancelled",
                              "postponed"
                            ]
                          },
                          "home_team": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "slug": {
                                "type": "string"
                              },
                              "label": {
                                "type": "string"
                              },
                              "short_name": {
                                "type": "string"
                              },
                              "crest": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "state": {
                                        "type": "string",
                                        "const": "available"
                                      },
                                      "url": {
                                        "type": "string",
                                        "format": "uri"
                                      }
                                    },
                                    "required": [
                                      "state",
                                      "url"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "state": {
                                        "type": "string",
                                        "const": "unavailable"
                                      },
                                      "reason": {
                                        "type": "string",
                                        "const": "moderated_crest_not_published"
                                      }
                                    },
                                    "required": [
                                      "state",
                                      "reason"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "colors": {
                                "type": "object",
                                "properties": {
                                  "primary": {
                                    "type": "string"
                                  },
                                  "secondary": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "primary",
                                  "secondary"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "id",
                              "slug",
                              "label",
                              "short_name",
                              "crest",
                              "colors"
                            ],
                            "additionalProperties": false
                          },
                          "away_team": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "slug": {
                                "type": "string"
                              },
                              "label": {
                                "type": "string"
                              },
                              "short_name": {
                                "type": "string"
                              },
                              "crest": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "state": {
                                        "type": "string",
                                        "const": "available"
                                      },
                                      "url": {
                                        "type": "string",
                                        "format": "uri"
                                      }
                                    },
                                    "required": [
                                      "state",
                                      "url"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "state": {
                                        "type": "string",
                                        "const": "unavailable"
                                      },
                                      "reason": {
                                        "type": "string",
                                        "const": "moderated_crest_not_published"
                                      }
                                    },
                                    "required": [
                                      "state",
                                      "reason"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "colors": {
                                "type": "object",
                                "properties": {
                                  "primary": {
                                    "type": "string"
                                  },
                                  "secondary": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "primary",
                                  "secondary"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "id",
                              "slug",
                              "label",
                              "short_name",
                              "crest",
                              "colors"
                            ],
                            "additionalProperties": false
                          },
                          "score": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "home": {
                                    "type": "number"
                                  },
                                  "away": {
                                    "type": "number"
                                  }
                                },
                                "required": [
                                  "home",
                                  "away"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "live_started_at": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "live_ended_at": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "scope": {
                            "type": "object",
                            "properties": {
                              "organization_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "city_slug": {
                                "type": "string"
                              },
                              "city_name": {
                                "type": "string"
                              },
                              "city_status": {
                                "type": "string",
                                "enum": [
                                  "live",
                                  "coming_soon"
                                ]
                              }
                            },
                            "required": [
                              "organization_id",
                              "city_slug",
                              "city_name",
                              "city_status"
                            ],
                            "additionalProperties": false
                          },
                          "competition": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "slug": {
                                "type": "string"
                              },
                              "label": {
                                "type": "string"
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "championship",
                                  "tournament"
                                ]
                              },
                              "format": {
                                "type": "string",
                                "enum": [
                                  "league",
                                  "league_with_playoffs",
                                  "cup",
                                  "group_then_knockout"
                                ]
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "draft",
                                  "ready",
                                  "scheduled",
                                  "in_progress",
                                  "completed",
                                  "playoffs",
                                  "archived",
                                  "unpublished"
                                ]
                              },
                              "starts_on": {
                                "type": "string",
                                "format": "date"
                              },
                              "ends_on": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "format": "date"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "scope": {
                                "type": "object",
                                "properties": {
                                  "organization_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "city_slug": {
                                    "type": "string"
                                  },
                                  "city_name": {
                                    "type": "string"
                                  },
                                  "city_status": {
                                    "type": "string",
                                    "enum": [
                                      "live",
                                      "coming_soon"
                                    ]
                                  }
                                },
                                "required": [
                                  "organization_id",
                                  "city_slug",
                                  "city_name",
                                  "city_status"
                                ],
                                "additionalProperties": false
                              },
                              "season": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "slug": {
                                        "type": "string"
                                      },
                                      "label": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "slug",
                                      "label"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "has_bracket": {
                                "type": "boolean"
                              },
                              "canonical_path": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "slug",
                              "label",
                              "kind",
                              "format",
                              "status",
                              "starts_on",
                              "ends_on",
                              "scope",
                              "season",
                              "has_bracket",
                              "canonical_path"
                            ],
                            "additionalProperties": false
                          },
                          "round": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "label": {
                                    "type": "string"
                                  },
                                  "order_index": {
                                    "type": "number"
                                  }
                                },
                                "required": [
                                  "id",
                                  "label",
                                  "order_index"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "venue": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "const": "ready"
                                  },
                                  "id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "label": {
                                    "type": "string"
                                  },
                                  "address": {
                                    "oneOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "surface": {
                                    "oneOf": [
                                      {
                                        "type": "string",
                                        "enum": [
                                          "grass",
                                          "synthetic",
                                          "mixed",
                                          "indoor"
                                        ]
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "state",
                                  "id",
                                  "label",
                                  "address",
                                  "surface"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "const": "unavailable"
                                  },
                                  "reason": {
                                    "type": "object",
                                    "properties": {
                                      "code": {
                                        "type": "string"
                                      },
                                      "message": {
                                        "type": "string"
                                      },
                                      "retryable": {
                                        "type": "boolean"
                                      },
                                      "recovery_action": {
                                        "oneOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "code",
                                      "message",
                                      "retryable",
                                      "recovery_action"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "state",
                                  "reason"
                                ],
                                "additionalProperties": false
                              }
                            ]
                          },
                          "structure": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "const": "ready"
                                  },
                                  "phase": {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "id": {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          "label": {
                                            "type": "string"
                                          },
                                          "kind": {
                                            "type": "string",
                                            "enum": [
                                              "group_stage",
                                              "league",
                                              "knockout",
                                              "placement"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "id",
                                          "label",
                                          "kind"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "group": {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "id": {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          "label": {
                                            "type": "string"
                                          },
                                          "order_index": {
                                            "type": "number"
                                          }
                                        },
                                        "required": [
                                          "id",
                                          "label",
                                          "order_index"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "state",
                                  "phase",
                                  "group"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "const": "unavailable"
                                  },
                                  "phase": {
                                    "type": "null"
                                  },
                                  "group": {
                                    "type": "null"
                                  },
                                  "reason": {
                                    "type": "object",
                                    "properties": {
                                      "code": {
                                        "type": "string"
                                      },
                                      "message": {
                                        "type": "string"
                                      },
                                      "retryable": {
                                        "type": "boolean"
                                      },
                                      "recovery_action": {
                                        "oneOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "code",
                                      "message",
                                      "retryable",
                                      "recovery_action"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "state",
                                  "phase",
                                  "group",
                                  "reason"
                                ],
                                "additionalProperties": false
                              }
                            ]
                          },
                          "officiality": {
                            "type": "object",
                            "properties": {
                              "state": {
                                "type": "string",
                                "enum": [
                                  "scheduled",
                                  "live",
                                  "provisional",
                                  "official",
                                  "sub_iudice",
                                  "postponed",
                                  "cancelled"
                                ]
                              },
                              "is_official": {
                                "type": "boolean"
                              },
                              "reason": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "code": {
                                        "type": "string"
                                      },
                                      "message": {
                                        "type": "string"
                                      },
                                      "retryable": {
                                        "type": "boolean"
                                      },
                                      "recovery_action": {
                                        "oneOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "code",
                                      "message",
                                      "retryable",
                                      "recovery_action"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "state",
                              "is_official",
                              "reason"
                            ],
                            "additionalProperties": false
                          },
                          "status_reason": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "code": {
                                    "type": "string"
                                  },
                                  "message": {
                                    "type": "string"
                                  },
                                  "retryable": {
                                    "type": "boolean"
                                  },
                                  "recovery_action": {
                                    "oneOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "code",
                                  "message",
                                  "retryable",
                                  "recovery_action"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "result_origin": {
                            "oneOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "played",
                                  "forfeit"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "forfeit_trigger": {
                            "oneOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "no_show",
                                  "ineligible_player",
                                  "roster_below_minimum",
                                  "late_result_confirmation_both_secretariats"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "lineage": {
                            "type": "object",
                            "properties": {
                              "current_report_version_id": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "current_report_version": {
                                "oneOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "correction_of_report_version_id": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "amendment_set_id": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "is_sub_iudice": {
                                "type": "boolean"
                              },
                              "projection_revision_id": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "current_report_version_id",
                              "current_report_version",
                              "correction_of_report_version_id",
                              "amendment_set_id",
                              "is_sub_iudice",
                              "projection_revision_id"
                            ],
                            "additionalProperties": false
                          },
                          "lineups": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "side": {
                                  "type": "string",
                                  "enum": [
                                    "home",
                                    "away"
                                  ]
                                },
                                "entries": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "player_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "sport_name": {
                                        "type": "string"
                                      },
                                      "slug": {
                                        "type": "string"
                                      },
                                      "shirt_number": {
                                        "type": "number"
                                      },
                                      "role": {
                                        "oneOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "starting": {
                                        "type": "boolean"
                                      },
                                      "captain": {
                                        "type": "boolean"
                                      }
                                    },
                                    "required": [
                                      "player_id",
                                      "sport_name",
                                      "slug",
                                      "shirt_number",
                                      "role",
                                      "starting",
                                      "captain"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "protected_slots": {
                                  "type": "number"
                                }
                              },
                              "required": [
                                "side",
                                "entries",
                                "protected_slots"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "canonical_path": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "scheduled_at",
                          "schedule_precision",
                          "scheduled_on",
                          "state",
                          "home_team",
                          "away_team",
                          "score",
                          "live_started_at",
                          "live_ended_at",
                          "scope",
                          "competition",
                          "round",
                          "venue",
                          "structure",
                          "officiality",
                          "status_reason",
                          "result_origin",
                          "forfeit_trigger",
                          "lineage",
                          "lineups",
                          "canonical_path"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "next_cursor": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "scope",
                    "items",
                    "next_cursor"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Unavailable city scope",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "state": {
                      "type": "string",
                      "const": "unavailable"
                    },
                    "scope": {
                      "type": "object",
                      "properties": {
                        "organization_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "city_slug": {
                          "type": "string"
                        },
                        "city_name": {
                          "type": "string"
                        },
                        "city_status": {
                          "type": "string",
                          "enum": [
                            "live",
                            "coming_soon"
                          ]
                        }
                      },
                      "required": [
                        "organization_id",
                        "city_slug",
                        "city_name",
                        "city_status"
                      ],
                      "additionalProperties": false
                    },
                    "reason": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "retryable": {
                          "type": "boolean"
                        },
                        "recovery_action": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "retryable",
                        "recovery_action"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "state",
                    "scope",
                    "reason"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read:public.matches"
            ]
          }
        ],
        "x-tenant-scope": "public",
        "x-rate-limit-tier": "public_widget",
        "x-audit-required": false,
        "x-privacy-classification": "public"
      }
    },
    "/public/read-model/matches/{matchId}": {
      "get": {
        "summary": "Read one authoritative public match model",
        "tags": [
          "public",
          "matches"
        ],
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Public match read-model",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "scheduled_at": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "schedule_precision": {
                      "type": "string",
                      "enum": [
                        "exact",
                        "date_only",
                        "unknown"
                      ]
                    },
                    "scheduled_on": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "date"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "state": {
                      "type": "string",
                      "enum": [
                        "scheduled",
                        "live",
                        "ended",
                        "report_draft",
                        "report_submitted",
                        "report_official",
                        "corrected",
                        "cancelled",
                        "postponed"
                      ]
                    },
                    "home_team": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "slug": {
                          "type": "string"
                        },
                        "label": {
                          "type": "string"
                        },
                        "short_name": {
                          "type": "string"
                        },
                        "crest": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "state": {
                                  "type": "string",
                                  "const": "available"
                                },
                                "url": {
                                  "type": "string",
                                  "format": "uri"
                                }
                              },
                              "required": [
                                "state",
                                "url"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "state": {
                                  "type": "string",
                                  "const": "unavailable"
                                },
                                "reason": {
                                  "type": "string",
                                  "const": "moderated_crest_not_published"
                                }
                              },
                              "required": [
                                "state",
                                "reason"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        "colors": {
                          "type": "object",
                          "properties": {
                            "primary": {
                              "type": "string"
                            },
                            "secondary": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "primary",
                            "secondary"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "id",
                        "slug",
                        "label",
                        "short_name",
                        "crest",
                        "colors"
                      ],
                      "additionalProperties": false
                    },
                    "away_team": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "slug": {
                          "type": "string"
                        },
                        "label": {
                          "type": "string"
                        },
                        "short_name": {
                          "type": "string"
                        },
                        "crest": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "state": {
                                  "type": "string",
                                  "const": "available"
                                },
                                "url": {
                                  "type": "string",
                                  "format": "uri"
                                }
                              },
                              "required": [
                                "state",
                                "url"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "state": {
                                  "type": "string",
                                  "const": "unavailable"
                                },
                                "reason": {
                                  "type": "string",
                                  "const": "moderated_crest_not_published"
                                }
                              },
                              "required": [
                                "state",
                                "reason"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        "colors": {
                          "type": "object",
                          "properties": {
                            "primary": {
                              "type": "string"
                            },
                            "secondary": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "primary",
                            "secondary"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "id",
                        "slug",
                        "label",
                        "short_name",
                        "crest",
                        "colors"
                      ],
                      "additionalProperties": false
                    },
                    "score": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "home": {
                              "type": "number"
                            },
                            "away": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "home",
                            "away"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "live_started_at": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "live_ended_at": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "scope": {
                      "type": "object",
                      "properties": {
                        "organization_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "city_slug": {
                          "type": "string"
                        },
                        "city_name": {
                          "type": "string"
                        },
                        "city_status": {
                          "type": "string",
                          "enum": [
                            "live",
                            "coming_soon"
                          ]
                        }
                      },
                      "required": [
                        "organization_id",
                        "city_slug",
                        "city_name",
                        "city_status"
                      ],
                      "additionalProperties": false
                    },
                    "competition": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "slug": {
                          "type": "string"
                        },
                        "label": {
                          "type": "string"
                        },
                        "kind": {
                          "type": "string",
                          "enum": [
                            "championship",
                            "tournament"
                          ]
                        },
                        "format": {
                          "type": "string",
                          "enum": [
                            "league",
                            "league_with_playoffs",
                            "cup",
                            "group_then_knockout"
                          ]
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "draft",
                            "ready",
                            "scheduled",
                            "in_progress",
                            "completed",
                            "playoffs",
                            "archived",
                            "unpublished"
                          ]
                        },
                        "starts_on": {
                          "type": "string",
                          "format": "date"
                        },
                        "ends_on": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "date"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "scope": {
                          "type": "object",
                          "properties": {
                            "organization_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "city_slug": {
                              "type": "string"
                            },
                            "city_name": {
                              "type": "string"
                            },
                            "city_status": {
                              "type": "string",
                              "enum": [
                                "live",
                                "coming_soon"
                              ]
                            }
                          },
                          "required": [
                            "organization_id",
                            "city_slug",
                            "city_name",
                            "city_status"
                          ],
                          "additionalProperties": false
                        },
                        "season": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "slug": {
                                  "type": "string"
                                },
                                "label": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "id",
                                "slug",
                                "label"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "has_bracket": {
                          "type": "boolean"
                        },
                        "canonical_path": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "slug",
                        "label",
                        "kind",
                        "format",
                        "status",
                        "starts_on",
                        "ends_on",
                        "scope",
                        "season",
                        "has_bracket",
                        "canonical_path"
                      ],
                      "additionalProperties": false
                    },
                    "round": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "label": {
                              "type": "string"
                            },
                            "order_index": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "id",
                            "label",
                            "order_index"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "venue": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "state": {
                              "type": "string",
                              "const": "ready"
                            },
                            "id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "label": {
                              "type": "string"
                            },
                            "address": {
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "surface": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "enum": [
                                    "grass",
                                    "synthetic",
                                    "mixed",
                                    "indoor"
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "state",
                            "id",
                            "label",
                            "address",
                            "surface"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "state": {
                              "type": "string",
                              "const": "unavailable"
                            },
                            "reason": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string"
                                },
                                "message": {
                                  "type": "string"
                                },
                                "retryable": {
                                  "type": "boolean"
                                },
                                "recovery_action": {
                                  "oneOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "code",
                                "message",
                                "retryable",
                                "recovery_action"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "state",
                            "reason"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    "structure": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "state": {
                              "type": "string",
                              "const": "ready"
                            },
                            "phase": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "label": {
                                      "type": "string"
                                    },
                                    "kind": {
                                      "type": "string",
                                      "enum": [
                                        "group_stage",
                                        "league",
                                        "knockout",
                                        "placement"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "label",
                                    "kind"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "group": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "label": {
                                      "type": "string"
                                    },
                                    "order_index": {
                                      "type": "number"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "label",
                                    "order_index"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "state",
                            "phase",
                            "group"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "state": {
                              "type": "string",
                              "const": "unavailable"
                            },
                            "phase": {
                              "type": "null"
                            },
                            "group": {
                              "type": "null"
                            },
                            "reason": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string"
                                },
                                "message": {
                                  "type": "string"
                                },
                                "retryable": {
                                  "type": "boolean"
                                },
                                "recovery_action": {
                                  "oneOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "code",
                                "message",
                                "retryable",
                                "recovery_action"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "state",
                            "phase",
                            "group",
                            "reason"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    "officiality": {
                      "type": "object",
                      "properties": {
                        "state": {
                          "type": "string",
                          "enum": [
                            "scheduled",
                            "live",
                            "provisional",
                            "official",
                            "sub_iudice",
                            "postponed",
                            "cancelled"
                          ]
                        },
                        "is_official": {
                          "type": "boolean"
                        },
                        "reason": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string"
                                },
                                "message": {
                                  "type": "string"
                                },
                                "retryable": {
                                  "type": "boolean"
                                },
                                "recovery_action": {
                                  "oneOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "code",
                                "message",
                                "retryable",
                                "recovery_action"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "state",
                        "is_official",
                        "reason"
                      ],
                      "additionalProperties": false
                    },
                    "status_reason": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string"
                            },
                            "retryable": {
                              "type": "boolean"
                            },
                            "recovery_action": {
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message",
                            "retryable",
                            "recovery_action"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "result_origin": {
                      "oneOf": [
                        {
                          "type": "string",
                          "enum": [
                            "played",
                            "forfeit"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "forfeit_trigger": {
                      "oneOf": [
                        {
                          "type": "string",
                          "enum": [
                            "no_show",
                            "ineligible_player",
                            "roster_below_minimum",
                            "late_result_confirmation_both_secretariats"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "lineage": {
                      "type": "object",
                      "properties": {
                        "current_report_version_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "current_report_version": {
                          "oneOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "correction_of_report_version_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "amendment_set_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "is_sub_iudice": {
                          "type": "boolean"
                        },
                        "projection_revision_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "current_report_version_id",
                        "current_report_version",
                        "correction_of_report_version_id",
                        "amendment_set_id",
                        "is_sub_iudice",
                        "projection_revision_id"
                      ],
                      "additionalProperties": false
                    },
                    "lineups": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "side": {
                            "type": "string",
                            "enum": [
                              "home",
                              "away"
                            ]
                          },
                          "entries": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "player_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "sport_name": {
                                  "type": "string"
                                },
                                "slug": {
                                  "type": "string"
                                },
                                "shirt_number": {
                                  "type": "number"
                                },
                                "role": {
                                  "oneOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "starting": {
                                  "type": "boolean"
                                },
                                "captain": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "player_id",
                                "sport_name",
                                "slug",
                                "shirt_number",
                                "role",
                                "starting",
                                "captain"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "protected_slots": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "side",
                          "entries",
                          "protected_slots"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "canonical_path": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "scheduled_at",
                    "schedule_precision",
                    "scheduled_on",
                    "state",
                    "home_team",
                    "away_team",
                    "score",
                    "live_started_at",
                    "live_ended_at",
                    "scope",
                    "competition",
                    "round",
                    "venue",
                    "structure",
                    "officiality",
                    "status_reason",
                    "result_origin",
                    "forfeit_trigger",
                    "lineage",
                    "lineups",
                    "canonical_path"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read:public.matches"
            ]
          }
        ],
        "x-tenant-scope": "public",
        "x-rate-limit-tier": "public_widget",
        "x-audit-required": false,
        "x-privacy-classification": "public"
      }
    },
    "/public/read-model/teams/{teamId}": {
      "get": {
        "summary": "Read the complete team page aggregate without guessing its competition",
        "tags": [
          "public",
          "teams"
        ],
        "parameters": [
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "competition_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "media_cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "media_limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Public team page aggregate",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "team": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "slug": {
                          "type": "string"
                        },
                        "label": {
                          "type": "string"
                        },
                        "short_name": {
                          "type": "string"
                        },
                        "crest": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "state": {
                                  "type": "string",
                                  "const": "available"
                                },
                                "url": {
                                  "type": "string",
                                  "format": "uri"
                                }
                              },
                              "required": [
                                "state",
                                "url"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "state": {
                                  "type": "string",
                                  "const": "unavailable"
                                },
                                "reason": {
                                  "type": "string",
                                  "const": "moderated_crest_not_published"
                                }
                              },
                              "required": [
                                "state",
                                "reason"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        "colors": {
                          "type": "object",
                          "properties": {
                            "primary": {
                              "type": "string"
                            },
                            "secondary": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "primary",
                            "secondary"
                          ],
                          "additionalProperties": false
                        },
                        "logo_url": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uri"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "slug",
                        "label",
                        "short_name",
                        "crest",
                        "colors",
                        "logo_url"
                      ],
                      "additionalProperties": false
                    },
                    "scope": {
                      "type": "object",
                      "properties": {
                        "organization_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "city_slug": {
                          "type": "string"
                        },
                        "city_name": {
                          "type": "string"
                        },
                        "city_status": {
                          "type": "string",
                          "enum": [
                            "live",
                            "coming_soon"
                          ]
                        }
                      },
                      "required": [
                        "organization_id",
                        "city_slug",
                        "city_name",
                        "city_status"
                      ],
                      "additionalProperties": false
                    },
                    "memberships": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "competition": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "slug": {
                                "type": "string"
                              },
                              "label": {
                                "type": "string"
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "championship",
                                  "tournament"
                                ]
                              },
                              "format": {
                                "type": "string",
                                "enum": [
                                  "league",
                                  "league_with_playoffs",
                                  "cup",
                                  "group_then_knockout"
                                ]
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "draft",
                                  "ready",
                                  "scheduled",
                                  "in_progress",
                                  "completed",
                                  "playoffs",
                                  "archived",
                                  "unpublished"
                                ]
                              },
                              "starts_on": {
                                "type": "string",
                                "format": "date"
                              },
                              "ends_on": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "format": "date"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "scope": {
                                "type": "object",
                                "properties": {
                                  "organization_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "city_slug": {
                                    "type": "string"
                                  },
                                  "city_name": {
                                    "type": "string"
                                  },
                                  "city_status": {
                                    "type": "string",
                                    "enum": [
                                      "live",
                                      "coming_soon"
                                    ]
                                  }
                                },
                                "required": [
                                  "organization_id",
                                  "city_slug",
                                  "city_name",
                                  "city_status"
                                ],
                                "additionalProperties": false
                              },
                              "season": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "slug": {
                                        "type": "string"
                                      },
                                      "label": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "slug",
                                      "label"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "has_bracket": {
                                "type": "boolean"
                              },
                              "canonical_path": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "slug",
                              "label",
                              "kind",
                              "format",
                              "status",
                              "starts_on",
                              "ends_on",
                              "scope",
                              "season",
                              "has_bracket",
                              "canonical_path"
                            ],
                            "additionalProperties": false
                          },
                          "seed": {
                            "oneOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "standing": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "tournament_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "group_id": {
                                    "oneOf": [
                                      {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "phase_id": {
                                    "oneOf": [
                                      {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "scope": {
                                    "type": "string",
                                    "enum": [
                                      "competition",
                                      "group"
                                    ]
                                  },
                                  "team_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "played": {
                                    "type": "number"
                                  },
                                  "won": {
                                    "type": "number"
                                  },
                                  "drawn": {
                                    "type": "number"
                                  },
                                  "lost": {
                                    "type": "number"
                                  },
                                  "goals_for": {
                                    "type": "number"
                                  },
                                  "goals_against": {
                                    "type": "number"
                                  },
                                  "goal_difference": {
                                    "type": "number"
                                  },
                                  "points": {
                                    "type": "number"
                                  },
                                  "points_on_field": {
                                    "type": "number"
                                  },
                                  "position": {
                                    "type": "number"
                                  },
                                  "ranking_status": {
                                    "type": "string",
                                    "const": "pending_resolution"
                                  },
                                  "form": {
                                    "type": "array",
                                    "items": {
                                      "type": "string",
                                      "enum": [
                                        "W",
                                        "D",
                                        "L"
                                      ]
                                    }
                                  },
                                  "points_adjustment": {
                                    "type": "number"
                                  },
                                  "projection_revision_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "ruleset_revision_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "zone": {
                                    "type": "string",
                                    "enum": [
                                      "promotion",
                                      "playoff",
                                      "relegation"
                                    ]
                                  },
                                  "zone_label": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "tournament_id",
                                  "group_id",
                                  "team_id",
                                  "played",
                                  "won",
                                  "drawn",
                                  "lost",
                                  "goals_for",
                                  "goals_against",
                                  "goal_difference",
                                  "points",
                                  "position",
                                  "form"
                                ],
                                "additionalProperties": true
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "competition",
                          "seed",
                          "standing"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "selected_competition_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "selection_reason": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string"
                            },
                            "retryable": {
                              "type": "boolean"
                            },
                            "recovery_action": {
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message",
                            "retryable",
                            "recovery_action"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "roster": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "state": {
                              "type": "string",
                              "const": "ready"
                            },
                            "season_id": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "members": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "player_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "slug": {
                                    "type": "string"
                                  },
                                  "sport_name": {
                                    "type": "string"
                                  },
                                  "role": {
                                    "type": "string",
                                    "enum": [
                                      "GK",
                                      "DEF",
                                      "MID",
                                      "FWD"
                                    ]
                                  },
                                  "shirt_number": {
                                    "type": "number"
                                  },
                                  "photo_url": {
                                    "oneOf": [
                                      {
                                        "type": "string",
                                        "format": "uri"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "avatar_head_id": {
                                    "oneOf": [
                                      {
                                        "type": "string",
                                        "enum": [
                                          "head-01",
                                          "head-02",
                                          "head-03",
                                          "head-04",
                                          "head-05",
                                          "head-06",
                                          "head-07",
                                          "head-08",
                                          "head-09",
                                          "head-10",
                                          "head-11",
                                          "head-12",
                                          "head-13",
                                          "head-14",
                                          "head-15",
                                          "head-16",
                                          "head-17",
                                          "head-18",
                                          "head-19",
                                          "head-20",
                                          "head-21",
                                          "head-22",
                                          "head-23",
                                          "head-24",
                                          "head-25",
                                          "head-26",
                                          "head-27",
                                          "head-28",
                                          "head-29",
                                          "head-30",
                                          "head-31",
                                          "head-32",
                                          "head-33",
                                          "head-34",
                                          "head-35",
                                          "head-36",
                                          "head-37",
                                          "head-38",
                                          "head-39",
                                          "head-40",
                                          "head-41",
                                          "head-42",
                                          "head-43",
                                          "head-44",
                                          "head-45",
                                          "head-46",
                                          "head-47",
                                          "head-48",
                                          "head-49",
                                          "head-50",
                                          "head-51",
                                          "head-52",
                                          "head-53",
                                          "head-54",
                                          "head-55",
                                          "head-56",
                                          "head-57",
                                          "head-58",
                                          "head-59",
                                          "head-60",
                                          "head-61",
                                          "head-62",
                                          "head-63",
                                          "head-64",
                                          "head-65",
                                          "head-66",
                                          "head-67",
                                          "head-68",
                                          "head-69",
                                          "head-70",
                                          "head-71",
                                          "head-72",
                                          "head-73",
                                          "head-74",
                                          "head-75",
                                          "head-76",
                                          "head-77",
                                          "head-78",
                                          "head-79",
                                          "head-80",
                                          "head-81",
                                          "head-82",
                                          "head-83",
                                          "head-84",
                                          "head-85",
                                          "head-86",
                                          "head-87",
                                          "head-88",
                                          "head-89",
                                          "head-90",
                                          "head-91",
                                          "head-92",
                                          "head-93",
                                          "head-94",
                                          "head-95",
                                          "head-96",
                                          "head-97",
                                          "head-98",
                                          "head-99",
                                          "head-100",
                                          "head-101",
                                          "head-102",
                                          "head-103",
                                          "head-104",
                                          "head-105",
                                          "head-106",
                                          "head-107",
                                          "head-108",
                                          "head-109",
                                          "head-110",
                                          "head-111",
                                          "head-112",
                                          "head-113",
                                          "head-114",
                                          "head-115",
                                          "head-116",
                                          "head-117",
                                          "head-118",
                                          "head-119",
                                          "head-120",
                                          "head-121",
                                          "head-122",
                                          "head-123",
                                          "head-124",
                                          "head-125",
                                          "head-126",
                                          "head-127",
                                          "head-128",
                                          "head-129",
                                          "head-130",
                                          "head-131",
                                          "head-132",
                                          "head-133",
                                          "head-134",
                                          "head-135",
                                          "head-136",
                                          "head-137",
                                          "head-138",
                                          "head-139",
                                          "head-140",
                                          "head-141",
                                          "head-142",
                                          "head-143",
                                          "head-144",
                                          "head-145",
                                          "head-146",
                                          "head-147",
                                          "head-148",
                                          "head-149",
                                          "head-150",
                                          "head-151",
                                          "head-152",
                                          "head-153",
                                          "head-154",
                                          "head-155",
                                          "head-156",
                                          "head-157",
                                          "head-158",
                                          "head-159",
                                          "head-160",
                                          "head-161",
                                          "head-162",
                                          "head-163",
                                          "head-164",
                                          "head-165",
                                          "head-166",
                                          "head-167",
                                          "head-168",
                                          "head-169",
                                          "head-170",
                                          "head-171",
                                          "head-172",
                                          "head-173",
                                          "head-174",
                                          "head-175",
                                          "head-176",
                                          "head-177",
                                          "head-178",
                                          "head-179",
                                          "head-180",
                                          "head-181",
                                          "head-182",
                                          "head-183"
                                        ]
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "canonical_path": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "player_id",
                                  "slug",
                                  "sport_name",
                                  "role",
                                  "shirt_number",
                                  "photo_url",
                                  "avatar_head_id",
                                  "canonical_path"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "withheld_for_protection": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "state",
                            "season_id",
                            "members",
                            "withheld_for_protection"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "state": {
                              "type": "string",
                              "const": "unavailable"
                            },
                            "season_id": {
                              "type": "null"
                            },
                            "members": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "player_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "slug": {
                                    "type": "string"
                                  },
                                  "sport_name": {
                                    "type": "string"
                                  },
                                  "role": {
                                    "type": "string",
                                    "enum": [
                                      "GK",
                                      "DEF",
                                      "MID",
                                      "FWD"
                                    ]
                                  },
                                  "shirt_number": {
                                    "type": "number"
                                  },
                                  "photo_url": {
                                    "oneOf": [
                                      {
                                        "type": "string",
                                        "format": "uri"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "avatar_head_id": {
                                    "oneOf": [
                                      {
                                        "type": "string",
                                        "enum": [
                                          "head-01",
                                          "head-02",
                                          "head-03",
                                          "head-04",
                                          "head-05",
                                          "head-06",
                                          "head-07",
                                          "head-08",
                                          "head-09",
                                          "head-10",
                                          "head-11",
                                          "head-12",
                                          "head-13",
                                          "head-14",
                                          "head-15",
                                          "head-16",
                                          "head-17",
                                          "head-18",
                                          "head-19",
                                          "head-20",
                                          "head-21",
                                          "head-22",
                                          "head-23",
                                          "head-24",
                                          "head-25",
                                          "head-26",
                                          "head-27",
                                          "head-28",
                                          "head-29",
                                          "head-30",
                                          "head-31",
                                          "head-32",
                                          "head-33",
                                          "head-34",
                                          "head-35",
                                          "head-36",
                                          "head-37",
                                          "head-38",
                                          "head-39",
                                          "head-40",
                                          "head-41",
                                          "head-42",
                                          "head-43",
                                          "head-44",
                                          "head-45",
                                          "head-46",
                                          "head-47",
                                          "head-48",
                                          "head-49",
                                          "head-50",
                                          "head-51",
                                          "head-52",
                                          "head-53",
                                          "head-54",
                                          "head-55",
                                          "head-56",
                                          "head-57",
                                          "head-58",
                                          "head-59",
                                          "head-60",
                                          "head-61",
                                          "head-62",
                                          "head-63",
                                          "head-64",
                                          "head-65",
                                          "head-66",
                                          "head-67",
                                          "head-68",
                                          "head-69",
                                          "head-70",
                                          "head-71",
                                          "head-72",
                                          "head-73",
                                          "head-74",
                                          "head-75",
                                          "head-76",
                                          "head-77",
                                          "head-78",
                                          "head-79",
                                          "head-80",
                                          "head-81",
                                          "head-82",
                                          "head-83",
                                          "head-84",
                                          "head-85",
                                          "head-86",
                                          "head-87",
                                          "head-88",
                                          "head-89",
                                          "head-90",
                                          "head-91",
                                          "head-92",
                                          "head-93",
                                          "head-94",
                                          "head-95",
                                          "head-96",
                                          "head-97",
                                          "head-98",
                                          "head-99",
                                          "head-100",
                                          "head-101",
                                          "head-102",
                                          "head-103",
                                          "head-104",
                                          "head-105",
                                          "head-106",
                                          "head-107",
                                          "head-108",
                                          "head-109",
                                          "head-110",
                                          "head-111",
                                          "head-112",
                                          "head-113",
                                          "head-114",
                                          "head-115",
                                          "head-116",
                                          "head-117",
                                          "head-118",
                                          "head-119",
                                          "head-120",
                                          "head-121",
                                          "head-122",
                                          "head-123",
                                          "head-124",
                                          "head-125",
                                          "head-126",
                                          "head-127",
                                          "head-128",
                                          "head-129",
                                          "head-130",
                                          "head-131",
                                          "head-132",
                                          "head-133",
                                          "head-134",
                                          "head-135",
                                          "head-136",
                                          "head-137",
                                          "head-138",
                                          "head-139",
                                          "head-140",
                                          "head-141",
                                          "head-142",
                                          "head-143",
                                          "head-144",
                                          "head-145",
                                          "head-146",
                                          "head-147",
                                          "head-148",
                                          "head-149",
                                          "head-150",
                                          "head-151",
                                          "head-152",
                                          "head-153",
                                          "head-154",
                                          "head-155",
                                          "head-156",
                                          "head-157",
                                          "head-158",
                                          "head-159",
                                          "head-160",
                                          "head-161",
                                          "head-162",
                                          "head-163",
                                          "head-164",
                                          "head-165",
                                          "head-166",
                                          "head-167",
                                          "head-168",
                                          "head-169",
                                          "head-170",
                                          "head-171",
                                          "head-172",
                                          "head-173",
                                          "head-174",
                                          "head-175",
                                          "head-176",
                                          "head-177",
                                          "head-178",
                                          "head-179",
                                          "head-180",
                                          "head-181",
                                          "head-182",
                                          "head-183"
                                        ]
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "canonical_path": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "player_id",
                                  "slug",
                                  "sport_name",
                                  "role",
                                  "shirt_number",
                                  "photo_url",
                                  "avatar_head_id",
                                  "canonical_path"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "withheld_for_protection": {
                              "type": "number"
                            },
                            "reason": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string"
                                },
                                "message": {
                                  "type": "string"
                                },
                                "retryable": {
                                  "type": "boolean"
                                },
                                "recovery_action": {
                                  "oneOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "code",
                                "message",
                                "retryable",
                                "recovery_action"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "state",
                            "season_id",
                            "members",
                            "withheld_for_protection",
                            "reason"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    "standings": {
                      "type": "object",
                      "properties": {
                        "competition_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "tournament_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "group_id": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "phase_id": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "scope": {
                                "type": "string",
                                "enum": [
                                  "competition",
                                  "group"
                                ]
                              },
                              "team_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "played": {
                                "type": "number"
                              },
                              "won": {
                                "type": "number"
                              },
                              "drawn": {
                                "type": "number"
                              },
                              "lost": {
                                "type": "number"
                              },
                              "goals_for": {
                                "type": "number"
                              },
                              "goals_against": {
                                "type": "number"
                              },
                              "goal_difference": {
                                "type": "number"
                              },
                              "points": {
                                "type": "number"
                              },
                              "points_on_field": {
                                "type": "number"
                              },
                              "position": {
                                "type": "number"
                              },
                              "ranking_status": {
                                "type": "string",
                                "const": "pending_resolution"
                              },
                              "form": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "W",
                                    "D",
                                    "L"
                                  ]
                                }
                              },
                              "points_adjustment": {
                                "type": "number"
                              },
                              "projection_revision_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "ruleset_revision_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "zone": {
                                "type": "string",
                                "enum": [
                                  "promotion",
                                  "playoff",
                                  "relegation"
                                ]
                              },
                              "zone_label": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "tournament_id",
                              "group_id",
                              "team_id",
                              "played",
                              "won",
                              "drawn",
                              "lost",
                              "goals_for",
                              "goals_against",
                              "goal_difference",
                              "points",
                              "position",
                              "form"
                            ],
                            "additionalProperties": true
                          }
                        },
                        "reason": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string"
                                },
                                "message": {
                                  "type": "string"
                                },
                                "retryable": {
                                  "type": "boolean"
                                },
                                "recovery_action": {
                                  "oneOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "code",
                                "message",
                                "retryable",
                                "recovery_action"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "competition_id",
                        "items",
                        "reason"
                      ],
                      "additionalProperties": false
                    },
                    "upcoming_matches": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "scheduled_at": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "schedule_precision": {
                            "type": "string",
                            "enum": [
                              "exact",
                              "date_only",
                              "unknown"
                            ]
                          },
                          "scheduled_on": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "date"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "state": {
                            "type": "string",
                            "enum": [
                              "scheduled",
                              "live",
                              "ended",
                              "report_draft",
                              "report_submitted",
                              "report_official",
                              "corrected",
                              "cancelled",
                              "postponed"
                            ]
                          },
                          "home_team": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "slug": {
                                "type": "string"
                              },
                              "label": {
                                "type": "string"
                              },
                              "short_name": {
                                "type": "string"
                              },
                              "crest": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "state": {
                                        "type": "string",
                                        "const": "available"
                                      },
                                      "url": {
                                        "type": "string",
                                        "format": "uri"
                                      }
                                    },
                                    "required": [
                                      "state",
                                      "url"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "state": {
                                        "type": "string",
                                        "const": "unavailable"
                                      },
                                      "reason": {
                                        "type": "string",
                                        "const": "moderated_crest_not_published"
                                      }
                                    },
                                    "required": [
                                      "state",
                                      "reason"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "colors": {
                                "type": "object",
                                "properties": {
                                  "primary": {
                                    "type": "string"
                                  },
                                  "secondary": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "primary",
                                  "secondary"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "id",
                              "slug",
                              "label",
                              "short_name",
                              "crest",
                              "colors"
                            ],
                            "additionalProperties": false
                          },
                          "away_team": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "slug": {
                                "type": "string"
                              },
                              "label": {
                                "type": "string"
                              },
                              "short_name": {
                                "type": "string"
                              },
                              "crest": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "state": {
                                        "type": "string",
                                        "const": "available"
                                      },
                                      "url": {
                                        "type": "string",
                                        "format": "uri"
                                      }
                                    },
                                    "required": [
                                      "state",
                                      "url"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "state": {
                                        "type": "string",
                                        "const": "unavailable"
                                      },
                                      "reason": {
                                        "type": "string",
                                        "const": "moderated_crest_not_published"
                                      }
                                    },
                                    "required": [
                                      "state",
                                      "reason"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "colors": {
                                "type": "object",
                                "properties": {
                                  "primary": {
                                    "type": "string"
                                  },
                                  "secondary": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "primary",
                                  "secondary"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "id",
                              "slug",
                              "label",
                              "short_name",
                              "crest",
                              "colors"
                            ],
                            "additionalProperties": false
                          },
                          "score": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "home": {
                                    "type": "number"
                                  },
                                  "away": {
                                    "type": "number"
                                  }
                                },
                                "required": [
                                  "home",
                                  "away"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "live_started_at": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "live_ended_at": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "scope": {
                            "type": "object",
                            "properties": {
                              "organization_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "city_slug": {
                                "type": "string"
                              },
                              "city_name": {
                                "type": "string"
                              },
                              "city_status": {
                                "type": "string",
                                "enum": [
                                  "live",
                                  "coming_soon"
                                ]
                              }
                            },
                            "required": [
                              "organization_id",
                              "city_slug",
                              "city_name",
                              "city_status"
                            ],
                            "additionalProperties": false
                          },
                          "competition": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "slug": {
                                "type": "string"
                              },
                              "label": {
                                "type": "string"
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "championship",
                                  "tournament"
                                ]
                              },
                              "format": {
                                "type": "string",
                                "enum": [
                                  "league",
                                  "league_with_playoffs",
                                  "cup",
                                  "group_then_knockout"
                                ]
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "draft",
                                  "ready",
                                  "scheduled",
                                  "in_progress",
                                  "completed",
                                  "playoffs",
                                  "archived",
                                  "unpublished"
                                ]
                              },
                              "starts_on": {
                                "type": "string",
                                "format": "date"
                              },
                              "ends_on": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "format": "date"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "scope": {
                                "type": "object",
                                "properties": {
                                  "organization_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "city_slug": {
                                    "type": "string"
                                  },
                                  "city_name": {
                                    "type": "string"
                                  },
                                  "city_status": {
                                    "type": "string",
                                    "enum": [
                                      "live",
                                      "coming_soon"
                                    ]
                                  }
                                },
                                "required": [
                                  "organization_id",
                                  "city_slug",
                                  "city_name",
                                  "city_status"
                                ],
                                "additionalProperties": false
                              },
                              "season": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "slug": {
                                        "type": "string"
                                      },
                                      "label": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "slug",
                                      "label"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "has_bracket": {
                                "type": "boolean"
                              },
                              "canonical_path": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "slug",
                              "label",
                              "kind",
                              "format",
                              "status",
                              "starts_on",
                              "ends_on",
                              "scope",
                              "season",
                              "has_bracket",
                              "canonical_path"
                            ],
                            "additionalProperties": false
                          },
                          "round": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "label": {
                                    "type": "string"
                                  },
                                  "order_index": {
                                    "type": "number"
                                  }
                                },
                                "required": [
                                  "id",
                                  "label",
                                  "order_index"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "venue": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "const": "ready"
                                  },
                                  "id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "label": {
                                    "type": "string"
                                  },
                                  "address": {
                                    "oneOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "surface": {
                                    "oneOf": [
                                      {
                                        "type": "string",
                                        "enum": [
                                          "grass",
                                          "synthetic",
                                          "mixed",
                                          "indoor"
                                        ]
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "state",
                                  "id",
                                  "label",
                                  "address",
                                  "surface"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "const": "unavailable"
                                  },
                                  "reason": {
                                    "type": "object",
                                    "properties": {
                                      "code": {
                                        "type": "string"
                                      },
                                      "message": {
                                        "type": "string"
                                      },
                                      "retryable": {
                                        "type": "boolean"
                                      },
                                      "recovery_action": {
                                        "oneOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "code",
                                      "message",
                                      "retryable",
                                      "recovery_action"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "state",
                                  "reason"
                                ],
                                "additionalProperties": false
                              }
                            ]
                          },
                          "structure": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "const": "ready"
                                  },
                                  "phase": {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "id": {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          "label": {
                                            "type": "string"
                                          },
                                          "kind": {
                                            "type": "string",
                                            "enum": [
                                              "group_stage",
                                              "league",
                                              "knockout",
                                              "placement"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "id",
                                          "label",
                                          "kind"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "group": {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "id": {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          "label": {
                                            "type": "string"
                                          },
                                          "order_index": {
                                            "type": "number"
                                          }
                                        },
                                        "required": [
                                          "id",
                                          "label",
                                          "order_index"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "state",
                                  "phase",
                                  "group"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "const": "unavailable"
                                  },
                                  "phase": {
                                    "type": "null"
                                  },
                                  "group": {
                                    "type": "null"
                                  },
                                  "reason": {
                                    "type": "object",
                                    "properties": {
                                      "code": {
                                        "type": "string"
                                      },
                                      "message": {
                                        "type": "string"
                                      },
                                      "retryable": {
                                        "type": "boolean"
                                      },
                                      "recovery_action": {
                                        "oneOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "code",
                                      "message",
                                      "retryable",
                                      "recovery_action"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "state",
                                  "phase",
                                  "group",
                                  "reason"
                                ],
                                "additionalProperties": false
                              }
                            ]
                          },
                          "officiality": {
                            "type": "object",
                            "properties": {
                              "state": {
                                "type": "string",
                                "enum": [
                                  "scheduled",
                                  "live",
                                  "provisional",
                                  "official",
                                  "sub_iudice",
                                  "postponed",
                                  "cancelled"
                                ]
                              },
                              "is_official": {
                                "type": "boolean"
                              },
                              "reason": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "code": {
                                        "type": "string"
                                      },
                                      "message": {
                                        "type": "string"
                                      },
                                      "retryable": {
                                        "type": "boolean"
                                      },
                                      "recovery_action": {
                                        "oneOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "code",
                                      "message",
                                      "retryable",
                                      "recovery_action"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "state",
                              "is_official",
                              "reason"
                            ],
                            "additionalProperties": false
                          },
                          "status_reason": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "code": {
                                    "type": "string"
                                  },
                                  "message": {
                                    "type": "string"
                                  },
                                  "retryable": {
                                    "type": "boolean"
                                  },
                                  "recovery_action": {
                                    "oneOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "code",
                                  "message",
                                  "retryable",
                                  "recovery_action"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "result_origin": {
                            "oneOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "played",
                                  "forfeit"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "forfeit_trigger": {
                            "oneOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "no_show",
                                  "ineligible_player",
                                  "roster_below_minimum",
                                  "late_result_confirmation_both_secretariats"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "lineage": {
                            "type": "object",
                            "properties": {
                              "current_report_version_id": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "current_report_version": {
                                "oneOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "correction_of_report_version_id": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "amendment_set_id": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "is_sub_iudice": {
                                "type": "boolean"
                              },
                              "projection_revision_id": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "current_report_version_id",
                              "current_report_version",
                              "correction_of_report_version_id",
                              "amendment_set_id",
                              "is_sub_iudice",
                              "projection_revision_id"
                            ],
                            "additionalProperties": false
                          },
                          "lineups": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "side": {
                                  "type": "string",
                                  "enum": [
                                    "home",
                                    "away"
                                  ]
                                },
                                "entries": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "player_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "sport_name": {
                                        "type": "string"
                                      },
                                      "slug": {
                                        "type": "string"
                                      },
                                      "shirt_number": {
                                        "type": "number"
                                      },
                                      "role": {
                                        "oneOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "starting": {
                                        "type": "boolean"
                                      },
                                      "captain": {
                                        "type": "boolean"
                                      }
                                    },
                                    "required": [
                                      "player_id",
                                      "sport_name",
                                      "slug",
                                      "shirt_number",
                                      "role",
                                      "starting",
                                      "captain"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "protected_slots": {
                                  "type": "number"
                                }
                              },
                              "required": [
                                "side",
                                "entries",
                                "protected_slots"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "canonical_path": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "scheduled_at",
                          "schedule_precision",
                          "scheduled_on",
                          "state",
                          "home_team",
                          "away_team",
                          "score",
                          "live_started_at",
                          "live_ended_at",
                          "scope",
                          "competition",
                          "round",
                          "venue",
                          "structure",
                          "officiality",
                          "status_reason",
                          "result_origin",
                          "forfeit_trigger",
                          "lineage",
                          "lineups",
                          "canonical_path"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "recent_matches": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "scheduled_at": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "schedule_precision": {
                            "type": "string",
                            "enum": [
                              "exact",
                              "date_only",
                              "unknown"
                            ]
                          },
                          "scheduled_on": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "date"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "state": {
                            "type": "string",
                            "enum": [
                              "scheduled",
                              "live",
                              "ended",
                              "report_draft",
                              "report_submitted",
                              "report_official",
                              "corrected",
                              "cancelled",
                              "postponed"
                            ]
                          },
                          "home_team": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "slug": {
                                "type": "string"
                              },
                              "label": {
                                "type": "string"
                              },
                              "short_name": {
                                "type": "string"
                              },
                              "crest": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "state": {
                                        "type": "string",
                                        "const": "available"
                                      },
                                      "url": {
                                        "type": "string",
                                        "format": "uri"
                                      }
                                    },
                                    "required": [
                                      "state",
                                      "url"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "state": {
                                        "type": "string",
                                        "const": "unavailable"
                                      },
                                      "reason": {
                                        "type": "string",
                                        "const": "moderated_crest_not_published"
                                      }
                                    },
                                    "required": [
                                      "state",
                                      "reason"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "colors": {
                                "type": "object",
                                "properties": {
                                  "primary": {
                                    "type": "string"
                                  },
                                  "secondary": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "primary",
                                  "secondary"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "id",
                              "slug",
                              "label",
                              "short_name",
                              "crest",
                              "colors"
                            ],
                            "additionalProperties": false
                          },
                          "away_team": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "slug": {
                                "type": "string"
                              },
                              "label": {
                                "type": "string"
                              },
                              "short_name": {
                                "type": "string"
                              },
                              "crest": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "state": {
                                        "type": "string",
                                        "const": "available"
                                      },
                                      "url": {
                                        "type": "string",
                                        "format": "uri"
                                      }
                                    },
                                    "required": [
                                      "state",
                                      "url"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "state": {
                                        "type": "string",
                                        "const": "unavailable"
                                      },
                                      "reason": {
                                        "type": "string",
                                        "const": "moderated_crest_not_published"
                                      }
                                    },
                                    "required": [
                                      "state",
                                      "reason"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "colors": {
                                "type": "object",
                                "properties": {
                                  "primary": {
                                    "type": "string"
                                  },
                                  "secondary": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "primary",
                                  "secondary"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "id",
                              "slug",
                              "label",
                              "short_name",
                              "crest",
                              "colors"
                            ],
                            "additionalProperties": false
                          },
                          "score": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "home": {
                                    "type": "number"
                                  },
                                  "away": {
                                    "type": "number"
                                  }
                                },
                                "required": [
                                  "home",
                                  "away"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "live_started_at": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "live_ended_at": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "scope": {
                            "type": "object",
                            "properties": {
                              "organization_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "city_slug": {
                                "type": "string"
                              },
                              "city_name": {
                                "type": "string"
                              },
                              "city_status": {
                                "type": "string",
                                "enum": [
                                  "live",
                                  "coming_soon"
                                ]
                              }
                            },
                            "required": [
                              "organization_id",
                              "city_slug",
                              "city_name",
                              "city_status"
                            ],
                            "additionalProperties": false
                          },
                          "competition": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "slug": {
                                "type": "string"
                              },
                              "label": {
                                "type": "string"
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "championship",
                                  "tournament"
                                ]
                              },
                              "format": {
                                "type": "string",
                                "enum": [
                                  "league",
                                  "league_with_playoffs",
                                  "cup",
                                  "group_then_knockout"
                                ]
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "draft",
                                  "ready",
                                  "scheduled",
                                  "in_progress",
                                  "completed",
                                  "playoffs",
                                  "archived",
                                  "unpublished"
                                ]
                              },
                              "starts_on": {
                                "type": "string",
                                "format": "date"
                              },
                              "ends_on": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "format": "date"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "scope": {
                                "type": "object",
                                "properties": {
                                  "organization_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "city_slug": {
                                    "type": "string"
                                  },
                                  "city_name": {
                                    "type": "string"
                                  },
                                  "city_status": {
                                    "type": "string",
                                    "enum": [
                                      "live",
                                      "coming_soon"
                                    ]
                                  }
                                },
                                "required": [
                                  "organization_id",
                                  "city_slug",
                                  "city_name",
                                  "city_status"
                                ],
                                "additionalProperties": false
                              },
                              "season": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "slug": {
                                        "type": "string"
                                      },
                                      "label": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "slug",
                                      "label"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "has_bracket": {
                                "type": "boolean"
                              },
                              "canonical_path": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "slug",
                              "label",
                              "kind",
                              "format",
                              "status",
                              "starts_on",
                              "ends_on",
                              "scope",
                              "season",
                              "has_bracket",
                              "canonical_path"
                            ],
                            "additionalProperties": false
                          },
                          "round": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "label": {
                                    "type": "string"
                                  },
                                  "order_index": {
                                    "type": "number"
                                  }
                                },
                                "required": [
                                  "id",
                                  "label",
                                  "order_index"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "venue": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "const": "ready"
                                  },
                                  "id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "label": {
                                    "type": "string"
                                  },
                                  "address": {
                                    "oneOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "surface": {
                                    "oneOf": [
                                      {
                                        "type": "string",
                                        "enum": [
                                          "grass",
                                          "synthetic",
                                          "mixed",
                                          "indoor"
                                        ]
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "state",
                                  "id",
                                  "label",
                                  "address",
                                  "surface"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "const": "unavailable"
                                  },
                                  "reason": {
                                    "type": "object",
                                    "properties": {
                                      "code": {
                                        "type": "string"
                                      },
                                      "message": {
                                        "type": "string"
                                      },
                                      "retryable": {
                                        "type": "boolean"
                                      },
                                      "recovery_action": {
                                        "oneOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "code",
                                      "message",
                                      "retryable",
                                      "recovery_action"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "state",
                                  "reason"
                                ],
                                "additionalProperties": false
                              }
                            ]
                          },
                          "structure": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "const": "ready"
                                  },
                                  "phase": {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "id": {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          "label": {
                                            "type": "string"
                                          },
                                          "kind": {
                                            "type": "string",
                                            "enum": [
                                              "group_stage",
                                              "league",
                                              "knockout",
                                              "placement"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "id",
                                          "label",
                                          "kind"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "group": {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "id": {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          "label": {
                                            "type": "string"
                                          },
                                          "order_index": {
                                            "type": "number"
                                          }
                                        },
                                        "required": [
                                          "id",
                                          "label",
                                          "order_index"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "state",
                                  "phase",
                                  "group"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "const": "unavailable"
                                  },
                                  "phase": {
                                    "type": "null"
                                  },
                                  "group": {
                                    "type": "null"
                                  },
                                  "reason": {
                                    "type": "object",
                                    "properties": {
                                      "code": {
                                        "type": "string"
                                      },
                                      "message": {
                                        "type": "string"
                                      },
                                      "retryable": {
                                        "type": "boolean"
                                      },
                                      "recovery_action": {
                                        "oneOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "code",
                                      "message",
                                      "retryable",
                                      "recovery_action"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "state",
                                  "phase",
                                  "group",
                                  "reason"
                                ],
                                "additionalProperties": false
                              }
                            ]
                          },
                          "officiality": {
                            "type": "object",
                            "properties": {
                              "state": {
                                "type": "string",
                                "enum": [
                                  "scheduled",
                                  "live",
                                  "provisional",
                                  "official",
                                  "sub_iudice",
                                  "postponed",
                                  "cancelled"
                                ]
                              },
                              "is_official": {
                                "type": "boolean"
                              },
                              "reason": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "code": {
                                        "type": "string"
                                      },
                                      "message": {
                                        "type": "string"
                                      },
                                      "retryable": {
                                        "type": "boolean"
                                      },
                                      "recovery_action": {
                                        "oneOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "code",
                                      "message",
                                      "retryable",
                                      "recovery_action"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "state",
                              "is_official",
                              "reason"
                            ],
                            "additionalProperties": false
                          },
                          "status_reason": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "code": {
                                    "type": "string"
                                  },
                                  "message": {
                                    "type": "string"
                                  },
                                  "retryable": {
                                    "type": "boolean"
                                  },
                                  "recovery_action": {
                                    "oneOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "code",
                                  "message",
                                  "retryable",
                                  "recovery_action"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "result_origin": {
                            "oneOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "played",
                                  "forfeit"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "forfeit_trigger": {
                            "oneOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "no_show",
                                  "ineligible_player",
                                  "roster_below_minimum",
                                  "late_result_confirmation_both_secretariats"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "lineage": {
                            "type": "object",
                            "properties": {
                              "current_report_version_id": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "current_report_version": {
                                "oneOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "correction_of_report_version_id": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "amendment_set_id": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "is_sub_iudice": {
                                "type": "boolean"
                              },
                              "projection_revision_id": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "current_report_version_id",
                              "current_report_version",
                              "correction_of_report_version_id",
                              "amendment_set_id",
                              "is_sub_iudice",
                              "projection_revision_id"
                            ],
                            "additionalProperties": false
                          },
                          "lineups": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "side": {
                                  "type": "string",
                                  "enum": [
                                    "home",
                                    "away"
                                  ]
                                },
                                "entries": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "player_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "sport_name": {
                                        "type": "string"
                                      },
                                      "slug": {
                                        "type": "string"
                                      },
                                      "shirt_number": {
                                        "type": "number"
                                      },
                                      "role": {
                                        "oneOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "starting": {
                                        "type": "boolean"
                                      },
                                      "captain": {
                                        "type": "boolean"
                                      }
                                    },
                                    "required": [
                                      "player_id",
                                      "sport_name",
                                      "slug",
                                      "shirt_number",
                                      "role",
                                      "starting",
                                      "captain"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "protected_slots": {
                                  "type": "number"
                                }
                              },
                              "required": [
                                "side",
                                "entries",
                                "protected_slots"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "canonical_path": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "scheduled_at",
                          "schedule_precision",
                          "scheduled_on",
                          "state",
                          "home_team",
                          "away_team",
                          "score",
                          "live_started_at",
                          "live_ended_at",
                          "scope",
                          "competition",
                          "round",
                          "venue",
                          "structure",
                          "officiality",
                          "status_reason",
                          "result_origin",
                          "forfeit_trigger",
                          "lineage",
                          "lineups",
                          "canonical_path"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "canonical_path": {
                      "type": "string"
                    },
                    "media": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "image",
                                  "video",
                                  "document"
                                ]
                              },
                              "thumbnail_url": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "format": "uri"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "og_image_url": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "format": "uri"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "title": {
                                "type": "string"
                              },
                              "caption": {
                                "oneOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "captured_at": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "published_at": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "subjects": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "kind": {
                                      "type": "string",
                                      "enum": [
                                        "team",
                                        "match",
                                        "player"
                                      ]
                                    },
                                    "subject_id": {
                                      "type": "string"
                                    },
                                    "slug": {
                                      "oneOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "display_name": {
                                      "oneOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "kind",
                                    "subject_id",
                                    "slug",
                                    "display_name"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "content_kind": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "enum": [
                                      "image",
                                      "video",
                                      "document"
                                    ]
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "asset_url": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "format": "uri"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "renderer": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "state": {
                                        "type": "string",
                                        "const": "ready"
                                      },
                                      "kind": {
                                        "type": "string",
                                        "const": "image"
                                      },
                                      "image_url": {
                                        "type": "string",
                                        "format": "uri"
                                      },
                                      "alt": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "state",
                                      "kind",
                                      "image_url",
                                      "alt"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "state": {
                                        "type": "string",
                                        "const": "ready"
                                      },
                                      "kind": {
                                        "type": "string",
                                        "const": "video"
                                      },
                                      "playback_url": {
                                        "type": "string",
                                        "format": "uri"
                                      },
                                      "poster_url": {
                                        "oneOf": [
                                          {
                                            "type": "string",
                                            "format": "uri"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "state",
                                      "kind",
                                      "playback_url",
                                      "poster_url"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "state": {
                                        "type": "string",
                                        "const": "ready"
                                      },
                                      "kind": {
                                        "type": "string",
                                        "const": "document"
                                      },
                                      "download_url": {
                                        "type": "string",
                                        "format": "uri"
                                      }
                                    },
                                    "required": [
                                      "state",
                                      "kind",
                                      "download_url"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "state": {
                                        "type": "string",
                                        "const": "unavailable"
                                      },
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "video",
                                          "document"
                                        ]
                                      },
                                      "poster_url": {
                                        "oneOf": [
                                          {
                                            "type": "string",
                                            "format": "uri"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "reason": {
                                        "type": "object",
                                        "properties": {
                                          "code": {
                                            "type": "string"
                                          },
                                          "message": {
                                            "type": "string"
                                          },
                                          "retryable": {
                                            "type": "boolean"
                                          },
                                          "recovery_action": {
                                            "oneOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "code",
                                          "message",
                                          "retryable",
                                          "recovery_action"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "state",
                                      "kind",
                                      "poster_url",
                                      "reason"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              }
                            },
                            "required": [
                              "id",
                              "kind",
                              "thumbnail_url",
                              "og_image_url",
                              "title",
                              "caption",
                              "captured_at",
                              "published_at",
                              "subjects",
                              "content_kind",
                              "asset_url",
                              "renderer"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "next_cursor": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "items",
                        "next_cursor"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "team",
                    "scope",
                    "memberships",
                    "selected_competition_id",
                    "selection_reason",
                    "roster",
                    "standings",
                    "upcoming_matches",
                    "recent_matches",
                    "canonical_path",
                    "media"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read:public.teams"
            ]
          }
        ],
        "x-tenant-scope": "public",
        "x-rate-limit-tier": "public_widget",
        "x-audit-required": false,
        "x-privacy-classification": "public"
      }
    },
    "/public/read-model/competitions/{slug}": {
      "get": {
        "summary": "Read one competition detail: calendar, standings, structure and bracket",
        "tags": [
          "public",
          "competitions"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "city_slug",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Public competition detail",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "scope": {
                      "type": "object",
                      "properties": {
                        "organization_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "city_slug": {
                          "type": "string"
                        },
                        "city_name": {
                          "type": "string"
                        },
                        "city_status": {
                          "type": "string",
                          "enum": [
                            "live",
                            "coming_soon"
                          ]
                        }
                      },
                      "required": [
                        "organization_id",
                        "city_slug",
                        "city_name",
                        "city_status"
                      ],
                      "additionalProperties": false
                    },
                    "competition": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "slug": {
                          "type": "string"
                        },
                        "label": {
                          "type": "string"
                        },
                        "kind": {
                          "type": "string",
                          "enum": [
                            "championship",
                            "tournament"
                          ]
                        },
                        "format": {
                          "type": "string",
                          "enum": [
                            "league",
                            "league_with_playoffs",
                            "cup",
                            "group_then_knockout"
                          ]
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "draft",
                            "ready",
                            "scheduled",
                            "in_progress",
                            "completed",
                            "playoffs",
                            "archived",
                            "unpublished"
                          ]
                        },
                        "starts_on": {
                          "type": "string",
                          "format": "date"
                        },
                        "ends_on": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "date"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "scope": {
                          "type": "object",
                          "properties": {
                            "organization_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "city_slug": {
                              "type": "string"
                            },
                            "city_name": {
                              "type": "string"
                            },
                            "city_status": {
                              "type": "string",
                              "enum": [
                                "live",
                                "coming_soon"
                              ]
                            }
                          },
                          "required": [
                            "organization_id",
                            "city_slug",
                            "city_name",
                            "city_status"
                          ],
                          "additionalProperties": false
                        },
                        "season": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "slug": {
                                  "type": "string"
                                },
                                "label": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "id",
                                "slug",
                                "label"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "has_bracket": {
                          "type": "boolean"
                        },
                        "canonical_path": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "slug",
                        "label",
                        "kind",
                        "format",
                        "status",
                        "starts_on",
                        "ends_on",
                        "scope",
                        "season",
                        "has_bracket",
                        "canonical_path"
                      ],
                      "additionalProperties": false
                    },
                    "teams": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "slug": {
                            "type": "string"
                          },
                          "label": {
                            "type": "string"
                          },
                          "short_name": {
                            "type": "string"
                          },
                          "crest": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "const": "available"
                                  },
                                  "url": {
                                    "type": "string",
                                    "format": "uri"
                                  }
                                },
                                "required": [
                                  "state",
                                  "url"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "const": "unavailable"
                                  },
                                  "reason": {
                                    "type": "string",
                                    "const": "moderated_crest_not_published"
                                  }
                                },
                                "required": [
                                  "state",
                                  "reason"
                                ],
                                "additionalProperties": false
                              }
                            ]
                          },
                          "colors": {
                            "type": "object",
                            "properties": {
                              "primary": {
                                "type": "string"
                              },
                              "secondary": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "primary",
                              "secondary"
                            ],
                            "additionalProperties": false
                          },
                          "logo_url": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uri"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "slug",
                          "label",
                          "short_name",
                          "crest",
                          "colors",
                          "logo_url"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "calendar": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "round": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "label": {
                                    "type": "string"
                                  },
                                  "order_index": {
                                    "type": "number"
                                  }
                                },
                                "required": [
                                  "id",
                                  "label",
                                  "order_index"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "matches": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "scheduled_at": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "format": "date-time"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "schedule_precision": {
                                  "type": "string",
                                  "enum": [
                                    "exact",
                                    "date_only",
                                    "unknown"
                                  ]
                                },
                                "scheduled_on": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "format": "date"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "state": {
                                  "type": "string",
                                  "enum": [
                                    "scheduled",
                                    "live",
                                    "ended",
                                    "report_draft",
                                    "report_submitted",
                                    "report_official",
                                    "corrected",
                                    "cancelled",
                                    "postponed"
                                  ]
                                },
                                "home_team": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "slug": {
                                      "type": "string"
                                    },
                                    "label": {
                                      "type": "string"
                                    },
                                    "short_name": {
                                      "type": "string"
                                    },
                                    "crest": {
                                      "oneOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "state": {
                                              "type": "string",
                                              "const": "available"
                                            },
                                            "url": {
                                              "type": "string",
                                              "format": "uri"
                                            }
                                          },
                                          "required": [
                                            "state",
                                            "url"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "state": {
                                              "type": "string",
                                              "const": "unavailable"
                                            },
                                            "reason": {
                                              "type": "string",
                                              "const": "moderated_crest_not_published"
                                            }
                                          },
                                          "required": [
                                            "state",
                                            "reason"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ]
                                    },
                                    "colors": {
                                      "type": "object",
                                      "properties": {
                                        "primary": {
                                          "type": "string"
                                        },
                                        "secondary": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "primary",
                                        "secondary"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "slug",
                                    "label",
                                    "short_name",
                                    "crest",
                                    "colors"
                                  ],
                                  "additionalProperties": false
                                },
                                "away_team": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "slug": {
                                      "type": "string"
                                    },
                                    "label": {
                                      "type": "string"
                                    },
                                    "short_name": {
                                      "type": "string"
                                    },
                                    "crest": {
                                      "oneOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "state": {
                                              "type": "string",
                                              "const": "available"
                                            },
                                            "url": {
                                              "type": "string",
                                              "format": "uri"
                                            }
                                          },
                                          "required": [
                                            "state",
                                            "url"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "state": {
                                              "type": "string",
                                              "const": "unavailable"
                                            },
                                            "reason": {
                                              "type": "string",
                                              "const": "moderated_crest_not_published"
                                            }
                                          },
                                          "required": [
                                            "state",
                                            "reason"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ]
                                    },
                                    "colors": {
                                      "type": "object",
                                      "properties": {
                                        "primary": {
                                          "type": "string"
                                        },
                                        "secondary": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "primary",
                                        "secondary"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "slug",
                                    "label",
                                    "short_name",
                                    "crest",
                                    "colors"
                                  ],
                                  "additionalProperties": false
                                },
                                "score": {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "home": {
                                          "type": "number"
                                        },
                                        "away": {
                                          "type": "number"
                                        }
                                      },
                                      "required": [
                                        "home",
                                        "away"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "live_started_at": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "format": "date-time"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "live_ended_at": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "format": "date-time"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "scope": {
                                  "type": "object",
                                  "properties": {
                                    "organization_id": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "city_slug": {
                                      "type": "string"
                                    },
                                    "city_name": {
                                      "type": "string"
                                    },
                                    "city_status": {
                                      "type": "string",
                                      "enum": [
                                        "live",
                                        "coming_soon"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "organization_id",
                                    "city_slug",
                                    "city_name",
                                    "city_status"
                                  ],
                                  "additionalProperties": false
                                },
                                "competition": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "slug": {
                                      "type": "string"
                                    },
                                    "label": {
                                      "type": "string"
                                    },
                                    "kind": {
                                      "type": "string",
                                      "enum": [
                                        "championship",
                                        "tournament"
                                      ]
                                    },
                                    "format": {
                                      "type": "string",
                                      "enum": [
                                        "league",
                                        "league_with_playoffs",
                                        "cup",
                                        "group_then_knockout"
                                      ]
                                    },
                                    "status": {
                                      "type": "string",
                                      "enum": [
                                        "draft",
                                        "ready",
                                        "scheduled",
                                        "in_progress",
                                        "completed",
                                        "playoffs",
                                        "archived",
                                        "unpublished"
                                      ]
                                    },
                                    "starts_on": {
                                      "type": "string",
                                      "format": "date"
                                    },
                                    "ends_on": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "format": "date"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "scope": {
                                      "type": "object",
                                      "properties": {
                                        "organization_id": {
                                          "type": "string",
                                          "format": "uuid"
                                        },
                                        "city_slug": {
                                          "type": "string"
                                        },
                                        "city_name": {
                                          "type": "string"
                                        },
                                        "city_status": {
                                          "type": "string",
                                          "enum": [
                                            "live",
                                            "coming_soon"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "organization_id",
                                        "city_slug",
                                        "city_name",
                                        "city_status"
                                      ],
                                      "additionalProperties": false
                                    },
                                    "season": {
                                      "oneOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "type": "string",
                                              "format": "uuid"
                                            },
                                            "slug": {
                                              "type": "string"
                                            },
                                            "label": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "id",
                                            "slug",
                                            "label"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "has_bracket": {
                                      "type": "boolean"
                                    },
                                    "canonical_path": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "slug",
                                    "label",
                                    "kind",
                                    "format",
                                    "status",
                                    "starts_on",
                                    "ends_on",
                                    "scope",
                                    "season",
                                    "has_bracket",
                                    "canonical_path"
                                  ],
                                  "additionalProperties": false
                                },
                                "round": {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string",
                                          "format": "uuid"
                                        },
                                        "label": {
                                          "type": "string"
                                        },
                                        "order_index": {
                                          "type": "number"
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "label",
                                        "order_index"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "venue": {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "state": {
                                          "type": "string",
                                          "const": "ready"
                                        },
                                        "id": {
                                          "type": "string",
                                          "format": "uuid"
                                        },
                                        "label": {
                                          "type": "string"
                                        },
                                        "address": {
                                          "oneOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "surface": {
                                          "oneOf": [
                                            {
                                              "type": "string",
                                              "enum": [
                                                "grass",
                                                "synthetic",
                                                "mixed",
                                                "indoor"
                                              ]
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      },
                                      "required": [
                                        "state",
                                        "id",
                                        "label",
                                        "address",
                                        "surface"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "state": {
                                          "type": "string",
                                          "const": "unavailable"
                                        },
                                        "reason": {
                                          "type": "object",
                                          "properties": {
                                            "code": {
                                              "type": "string"
                                            },
                                            "message": {
                                              "type": "string"
                                            },
                                            "retryable": {
                                              "type": "boolean"
                                            },
                                            "recovery_action": {
                                              "oneOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "code",
                                            "message",
                                            "retryable",
                                            "recovery_action"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "state",
                                        "reason"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                },
                                "structure": {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "state": {
                                          "type": "string",
                                          "const": "ready"
                                        },
                                        "phase": {
                                          "oneOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "id": {
                                                  "type": "string",
                                                  "format": "uuid"
                                                },
                                                "label": {
                                                  "type": "string"
                                                },
                                                "kind": {
                                                  "type": "string",
                                                  "enum": [
                                                    "group_stage",
                                                    "league",
                                                    "knockout",
                                                    "placement"
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "id",
                                                "label",
                                                "kind"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "group": {
                                          "oneOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "id": {
                                                  "type": "string",
                                                  "format": "uuid"
                                                },
                                                "label": {
                                                  "type": "string"
                                                },
                                                "order_index": {
                                                  "type": "number"
                                                }
                                              },
                                              "required": [
                                                "id",
                                                "label",
                                                "order_index"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      },
                                      "required": [
                                        "state",
                                        "phase",
                                        "group"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "state": {
                                          "type": "string",
                                          "const": "unavailable"
                                        },
                                        "phase": {
                                          "type": "null"
                                        },
                                        "group": {
                                          "type": "null"
                                        },
                                        "reason": {
                                          "type": "object",
                                          "properties": {
                                            "code": {
                                              "type": "string"
                                            },
                                            "message": {
                                              "type": "string"
                                            },
                                            "retryable": {
                                              "type": "boolean"
                                            },
                                            "recovery_action": {
                                              "oneOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "code",
                                            "message",
                                            "retryable",
                                            "recovery_action"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "state",
                                        "phase",
                                        "group",
                                        "reason"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                },
                                "officiality": {
                                  "type": "object",
                                  "properties": {
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "scheduled",
                                        "live",
                                        "provisional",
                                        "official",
                                        "sub_iudice",
                                        "postponed",
                                        "cancelled"
                                      ]
                                    },
                                    "is_official": {
                                      "type": "boolean"
                                    },
                                    "reason": {
                                      "oneOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "code": {
                                              "type": "string"
                                            },
                                            "message": {
                                              "type": "string"
                                            },
                                            "retryable": {
                                              "type": "boolean"
                                            },
                                            "recovery_action": {
                                              "oneOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "code",
                                            "message",
                                            "retryable",
                                            "recovery_action"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "state",
                                    "is_official",
                                    "reason"
                                  ],
                                  "additionalProperties": false
                                },
                                "status_reason": {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "code": {
                                          "type": "string"
                                        },
                                        "message": {
                                          "type": "string"
                                        },
                                        "retryable": {
                                          "type": "boolean"
                                        },
                                        "recovery_action": {
                                          "oneOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      },
                                      "required": [
                                        "code",
                                        "message",
                                        "retryable",
                                        "recovery_action"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "result_origin": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "enum": [
                                        "played",
                                        "forfeit"
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "forfeit_trigger": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "enum": [
                                        "no_show",
                                        "ineligible_player",
                                        "roster_below_minimum",
                                        "late_result_confirmation_both_secretariats"
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "lineage": {
                                  "type": "object",
                                  "properties": {
                                    "current_report_version_id": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "format": "uuid"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "current_report_version": {
                                      "oneOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "correction_of_report_version_id": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "format": "uuid"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "amendment_set_id": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "format": "uuid"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "is_sub_iudice": {
                                      "type": "boolean"
                                    },
                                    "projection_revision_id": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "format": "uuid"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "current_report_version_id",
                                    "current_report_version",
                                    "correction_of_report_version_id",
                                    "amendment_set_id",
                                    "is_sub_iudice",
                                    "projection_revision_id"
                                  ],
                                  "additionalProperties": false
                                },
                                "lineups": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "side": {
                                        "type": "string",
                                        "enum": [
                                          "home",
                                          "away"
                                        ]
                                      },
                                      "entries": {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "player_id": {
                                              "type": "string",
                                              "format": "uuid"
                                            },
                                            "sport_name": {
                                              "type": "string"
                                            },
                                            "slug": {
                                              "type": "string"
                                            },
                                            "shirt_number": {
                                              "type": "number"
                                            },
                                            "role": {
                                              "oneOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "starting": {
                                              "type": "boolean"
                                            },
                                            "captain": {
                                              "type": "boolean"
                                            }
                                          },
                                          "required": [
                                            "player_id",
                                            "sport_name",
                                            "slug",
                                            "shirt_number",
                                            "role",
                                            "starting",
                                            "captain"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "protected_slots": {
                                        "type": "number"
                                      }
                                    },
                                    "required": [
                                      "side",
                                      "entries",
                                      "protected_slots"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "canonical_path": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "id",
                                "scheduled_at",
                                "schedule_precision",
                                "scheduled_on",
                                "state",
                                "home_team",
                                "away_team",
                                "score",
                                "live_started_at",
                                "live_ended_at",
                                "scope",
                                "competition",
                                "round",
                                "venue",
                                "structure",
                                "officiality",
                                "status_reason",
                                "result_origin",
                                "forfeit_trigger",
                                "lineage",
                                "lineups",
                                "canonical_path"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "required": [
                          "round",
                          "matches"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "standings": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "tournament_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "group_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "phase_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "scope": {
                            "type": "string",
                            "enum": [
                              "competition",
                              "group"
                            ]
                          },
                          "team_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "played": {
                            "type": "number"
                          },
                          "won": {
                            "type": "number"
                          },
                          "drawn": {
                            "type": "number"
                          },
                          "lost": {
                            "type": "number"
                          },
                          "goals_for": {
                            "type": "number"
                          },
                          "goals_against": {
                            "type": "number"
                          },
                          "goal_difference": {
                            "type": "number"
                          },
                          "points": {
                            "type": "number"
                          },
                          "points_on_field": {
                            "type": "number"
                          },
                          "position": {
                            "type": "number"
                          },
                          "ranking_status": {
                            "type": "string",
                            "const": "pending_resolution"
                          },
                          "form": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "W",
                                "D",
                                "L"
                              ]
                            }
                          },
                          "points_adjustment": {
                            "type": "number"
                          },
                          "projection_revision_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "ruleset_revision_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "zone": {
                            "type": "string",
                            "enum": [
                              "promotion",
                              "playoff",
                              "relegation"
                            ]
                          },
                          "zone_label": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "tournament_id",
                          "group_id",
                          "team_id",
                          "played",
                          "won",
                          "drawn",
                          "lost",
                          "goals_for",
                          "goals_against",
                          "goal_difference",
                          "points",
                          "position",
                          "form"
                        ],
                        "additionalProperties": true
                      }
                    },
                    "structure": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "state": {
                              "type": "string",
                              "const": "ready"
                            },
                            "phases": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "label": {
                                    "type": "string"
                                  },
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "group_stage",
                                      "league",
                                      "knockout",
                                      "placement"
                                    ]
                                  },
                                  "order_index": {
                                    "type": "number"
                                  },
                                  "groups": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string",
                                          "format": "uuid"
                                        },
                                        "label": {
                                          "type": "string"
                                        },
                                        "order_index": {
                                          "type": "number"
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "label",
                                        "order_index"
                                      ],
                                      "additionalProperties": false
                                    }
                                  }
                                },
                                "required": [
                                  "id",
                                  "label",
                                  "kind",
                                  "order_index",
                                  "groups"
                                ],
                                "additionalProperties": false
                              }
                            }
                          },
                          "required": [
                            "state",
                            "phases"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "state": {
                              "type": "string",
                              "const": "unavailable"
                            },
                            "phases": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "label": {
                                    "type": "string"
                                  },
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "group_stage",
                                      "league",
                                      "knockout",
                                      "placement"
                                    ]
                                  },
                                  "order_index": {
                                    "type": "number"
                                  },
                                  "groups": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string",
                                          "format": "uuid"
                                        },
                                        "label": {
                                          "type": "string"
                                        },
                                        "order_index": {
                                          "type": "number"
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "label",
                                        "order_index"
                                      ],
                                      "additionalProperties": false
                                    }
                                  }
                                },
                                "required": [
                                  "id",
                                  "label",
                                  "kind",
                                  "order_index",
                                  "groups"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "reason": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string"
                                },
                                "message": {
                                  "type": "string"
                                },
                                "retryable": {
                                  "type": "boolean"
                                },
                                "recovery_action": {
                                  "oneOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "code",
                                "message",
                                "retryable",
                                "recovery_action"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "state",
                            "phases",
                            "reason"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    "bracket": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "state": {
                              "type": "string",
                              "const": "ready"
                            },
                            "tournament_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "bracket_revision_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "projection_revision_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "rounds": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "label": {
                                    "type": "string"
                                  },
                                  "order_index": {
                                    "type": "number"
                                  },
                                  "config": {
                                    "type": "object",
                                    "properties": {
                                      "legs": {
                                        "oneOf": [
                                          {
                                            "type": "number",
                                            "const": 1
                                          },
                                          {
                                            "type": "number",
                                            "const": 2
                                          }
                                        ]
                                      },
                                      "away_goals_rule": {
                                        "type": "boolean"
                                      },
                                      "extra_time": {
                                        "type": "boolean"
                                      },
                                      "penalties": {
                                        "type": "boolean"
                                      }
                                    },
                                    "required": [
                                      "legs",
                                      "extra_time",
                                      "penalties"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "ties": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string",
                                          "format": "uuid"
                                        },
                                        "order_index": {
                                          "type": "number"
                                        },
                                        "home_slot": {
                                          "oneOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "kind": {
                                                  "type": "string",
                                                  "const": "team"
                                                },
                                                "team_id": {
                                                  "type": "string",
                                                  "format": "uuid"
                                                }
                                              },
                                              "required": [
                                                "kind",
                                                "team_id"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "kind": {
                                                  "type": "string",
                                                  "const": "winner_of_tie"
                                                },
                                                "tie_id": {
                                                  "type": "string",
                                                  "format": "uuid"
                                                }
                                              },
                                              "required": [
                                                "kind",
                                                "tie_id"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "kind": {
                                                  "type": "string",
                                                  "const": "bye"
                                                }
                                              },
                                              "required": [
                                                "kind"
                                              ],
                                              "additionalProperties": false
                                            }
                                          ]
                                        },
                                        "away_slot": {
                                          "oneOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "kind": {
                                                  "type": "string",
                                                  "const": "team"
                                                },
                                                "team_id": {
                                                  "type": "string",
                                                  "format": "uuid"
                                                }
                                              },
                                              "required": [
                                                "kind",
                                                "team_id"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "kind": {
                                                  "type": "string",
                                                  "const": "winner_of_tie"
                                                },
                                                "tie_id": {
                                                  "type": "string",
                                                  "format": "uuid"
                                                }
                                              },
                                              "required": [
                                                "kind",
                                                "tie_id"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "kind": {
                                                  "type": "string",
                                                  "const": "bye"
                                                }
                                              },
                                              "required": [
                                                "kind"
                                              ],
                                              "additionalProperties": false
                                            }
                                          ]
                                        },
                                        "bye": {
                                          "type": "boolean"
                                        },
                                        "match_ids": {
                                          "type": "array",
                                          "items": {
                                            "type": "string",
                                            "format": "uuid"
                                          }
                                        },
                                        "winner_team_id": {
                                          "oneOf": [
                                            {
                                              "type": "string",
                                              "format": "uuid"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "projection_revision_id": {
                                          "type": "string",
                                          "format": "uuid"
                                        },
                                        "bracket_revision_id": {
                                          "type": "string",
                                          "format": "uuid"
                                        },
                                        "aggregate_score_home": {
                                          "oneOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "aggregate_score_away": {
                                          "oneOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "extra_time_score_home": {
                                          "oneOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "extra_time_score_away": {
                                          "oneOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "penalty_shootout_home": {
                                          "oneOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "penalty_shootout_away": {
                                          "oneOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "advancement_reason": {
                                          "oneOf": [
                                            {
                                              "type": "string",
                                              "enum": [
                                                "aggregate",
                                                "extra_time",
                                                "penalties",
                                                "bye",
                                                "committee_decision"
                                              ]
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "order_index",
                                        "home_slot",
                                        "away_slot",
                                        "bye",
                                        "match_ids",
                                        "winner_team_id"
                                      ],
                                      "additionalProperties": false
                                    }
                                  }
                                },
                                "required": [
                                  "id",
                                  "label",
                                  "order_index",
                                  "config",
                                  "ties"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "shootout_display": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "enum": [
                                    "dcr",
                                    "rig"
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "state",
                            "tournament_id",
                            "rounds"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "state": {
                              "type": "string",
                              "enum": [
                                "not_applicable",
                                "unavailable"
                              ]
                            },
                            "reason": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string"
                                },
                                "message": {
                                  "type": "string"
                                },
                                "retryable": {
                                  "type": "boolean"
                                },
                                "recovery_action": {
                                  "oneOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "code",
                                "message",
                                "retryable",
                                "recovery_action"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "state",
                            "reason"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    "scheduled_placeholders": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "round": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "label": {
                                    "type": "string"
                                  },
                                  "order_index": {
                                    "type": "number"
                                  }
                                },
                                "required": [
                                  "id",
                                  "label",
                                  "order_index"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "group_label": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "scheduled_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "field_label": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "home_label": {
                            "type": "string"
                          },
                          "away_label": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "round",
                          "group_label",
                          "scheduled_at",
                          "field_label",
                          "home_label",
                          "away_label"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "freshness": {
                      "type": "object",
                      "properties": {
                        "state": {
                          "type": "string",
                          "enum": [
                            "fresh",
                            "no_authoritative_event"
                          ]
                        },
                        "generated_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "latest_authoritative_at": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "date-time"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "invalidation_cursor": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "events": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "source": {
                                "type": "string",
                                "enum": [
                                  "sport_truth",
                                  "publication"
                                ]
                              },
                              "cursor": {
                                "type": "string"
                              },
                              "occurred_at": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "consumers": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              }
                            },
                            "required": [
                              "source",
                              "cursor",
                              "occurred_at",
                              "consumers"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "reason": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string"
                                },
                                "message": {
                                  "type": "string"
                                },
                                "retryable": {
                                  "type": "boolean"
                                },
                                "recovery_action": {
                                  "oneOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "code",
                                "message",
                                "retryable",
                                "recovery_action"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "state",
                        "generated_at",
                        "latest_authoritative_at",
                        "invalidation_cursor",
                        "events",
                        "reason"
                      ],
                      "additionalProperties": false
                    },
                    "canonical_path": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "scope",
                    "competition",
                    "teams",
                    "calendar",
                    "standings",
                    "structure",
                    "bracket",
                    "freshness",
                    "canonical_path"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable city scope",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "state": {
                      "type": "string",
                      "const": "unavailable"
                    },
                    "scope": {
                      "type": "object",
                      "properties": {
                        "organization_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "city_slug": {
                          "type": "string"
                        },
                        "city_name": {
                          "type": "string"
                        },
                        "city_status": {
                          "type": "string",
                          "enum": [
                            "live",
                            "coming_soon"
                          ]
                        }
                      },
                      "required": [
                        "organization_id",
                        "city_slug",
                        "city_name",
                        "city_status"
                      ],
                      "additionalProperties": false
                    },
                    "reason": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "retryable": {
                          "type": "boolean"
                        },
                        "recovery_action": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "retryable",
                        "recovery_action"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "state",
                    "scope",
                    "reason"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read:public.matches"
            ]
          }
        ],
        "x-tenant-scope": "public",
        "x-rate-limit-tier": "public_widget",
        "x-audit-required": false,
        "x-privacy-classification": "public"
      }
    },
    "/public/read-model/players": {
      "get": {
        "summary": "List the scoped public player catalog with minors withheld by default",
        "tags": [
          "public",
          "players"
        ],
        "parameters": [
          {
            "name": "city_slug",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Public player catalog page",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "scope": {
                      "type": "object",
                      "properties": {
                        "organization_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "city_slug": {
                          "type": "string"
                        },
                        "city_name": {
                          "type": "string"
                        },
                        "city_status": {
                          "type": "string",
                          "enum": [
                            "live",
                            "coming_soon"
                          ]
                        }
                      },
                      "required": [
                        "organization_id",
                        "city_slug",
                        "city_name",
                        "city_status"
                      ],
                      "additionalProperties": false
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "slug": {
                            "type": "string"
                          },
                          "sport_name": {
                            "type": "string"
                          },
                          "role": {
                            "type": "string",
                            "enum": [
                              "GK",
                              "DEF",
                              "MID",
                              "FWD"
                            ]
                          },
                          "shirt_number": {
                            "oneOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "photo_url": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uri"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "avatar_head_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "head-01",
                                  "head-02",
                                  "head-03",
                                  "head-04",
                                  "head-05",
                                  "head-06",
                                  "head-07",
                                  "head-08",
                                  "head-09",
                                  "head-10",
                                  "head-11",
                                  "head-12",
                                  "head-13",
                                  "head-14",
                                  "head-15",
                                  "head-16",
                                  "head-17",
                                  "head-18",
                                  "head-19",
                                  "head-20",
                                  "head-21",
                                  "head-22",
                                  "head-23",
                                  "head-24",
                                  "head-25",
                                  "head-26",
                                  "head-27",
                                  "head-28",
                                  "head-29",
                                  "head-30",
                                  "head-31",
                                  "head-32",
                                  "head-33",
                                  "head-34",
                                  "head-35",
                                  "head-36",
                                  "head-37",
                                  "head-38",
                                  "head-39",
                                  "head-40",
                                  "head-41",
                                  "head-42",
                                  "head-43",
                                  "head-44",
                                  "head-45",
                                  "head-46",
                                  "head-47",
                                  "head-48",
                                  "head-49",
                                  "head-50",
                                  "head-51",
                                  "head-52",
                                  "head-53",
                                  "head-54",
                                  "head-55",
                                  "head-56",
                                  "head-57",
                                  "head-58",
                                  "head-59",
                                  "head-60",
                                  "head-61",
                                  "head-62",
                                  "head-63",
                                  "head-64",
                                  "head-65",
                                  "head-66",
                                  "head-67",
                                  "head-68",
                                  "head-69",
                                  "head-70",
                                  "head-71",
                                  "head-72",
                                  "head-73",
                                  "head-74",
                                  "head-75",
                                  "head-76",
                                  "head-77",
                                  "head-78",
                                  "head-79",
                                  "head-80",
                                  "head-81",
                                  "head-82",
                                  "head-83",
                                  "head-84",
                                  "head-85",
                                  "head-86",
                                  "head-87",
                                  "head-88",
                                  "head-89",
                                  "head-90",
                                  "head-91",
                                  "head-92",
                                  "head-93",
                                  "head-94",
                                  "head-95",
                                  "head-96",
                                  "head-97",
                                  "head-98",
                                  "head-99",
                                  "head-100",
                                  "head-101",
                                  "head-102",
                                  "head-103",
                                  "head-104",
                                  "head-105",
                                  "head-106",
                                  "head-107",
                                  "head-108",
                                  "head-109",
                                  "head-110",
                                  "head-111",
                                  "head-112",
                                  "head-113",
                                  "head-114",
                                  "head-115",
                                  "head-116",
                                  "head-117",
                                  "head-118",
                                  "head-119",
                                  "head-120",
                                  "head-121",
                                  "head-122",
                                  "head-123",
                                  "head-124",
                                  "head-125",
                                  "head-126",
                                  "head-127",
                                  "head-128",
                                  "head-129",
                                  "head-130",
                                  "head-131",
                                  "head-132",
                                  "head-133",
                                  "head-134",
                                  "head-135",
                                  "head-136",
                                  "head-137",
                                  "head-138",
                                  "head-139",
                                  "head-140",
                                  "head-141",
                                  "head-142",
                                  "head-143",
                                  "head-144",
                                  "head-145",
                                  "head-146",
                                  "head-147",
                                  "head-148",
                                  "head-149",
                                  "head-150",
                                  "head-151",
                                  "head-152",
                                  "head-153",
                                  "head-154",
                                  "head-155",
                                  "head-156",
                                  "head-157",
                                  "head-158",
                                  "head-159",
                                  "head-160",
                                  "head-161",
                                  "head-162",
                                  "head-163",
                                  "head-164",
                                  "head-165",
                                  "head-166",
                                  "head-167",
                                  "head-168",
                                  "head-169",
                                  "head-170",
                                  "head-171",
                                  "head-172",
                                  "head-173",
                                  "head-174",
                                  "head-175",
                                  "head-176",
                                  "head-177",
                                  "head-178",
                                  "head-179",
                                  "head-180",
                                  "head-181",
                                  "head-182",
                                  "head-183"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "team": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "slug": {
                                    "type": "string"
                                  },
                                  "label": {
                                    "type": "string"
                                  },
                                  "short_name": {
                                    "type": "string"
                                  },
                                  "crest": {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "state": {
                                            "type": "string",
                                            "const": "available"
                                          },
                                          "url": {
                                            "type": "string",
                                            "format": "uri"
                                          }
                                        },
                                        "required": [
                                          "state",
                                          "url"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "state": {
                                            "type": "string",
                                            "const": "unavailable"
                                          },
                                          "reason": {
                                            "type": "string",
                                            "const": "moderated_crest_not_published"
                                          }
                                        },
                                        "required": [
                                          "state",
                                          "reason"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ]
                                  },
                                  "colors": {
                                    "type": "object",
                                    "properties": {
                                      "primary": {
                                        "type": "string"
                                      },
                                      "secondary": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "primary",
                                      "secondary"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "id",
                                  "slug",
                                  "label",
                                  "short_name",
                                  "crest",
                                  "colors"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "scope": {
                            "type": "object",
                            "properties": {
                              "organization_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "city_slug": {
                                "type": "string"
                              },
                              "city_name": {
                                "type": "string"
                              },
                              "city_status": {
                                "type": "string",
                                "enum": [
                                  "live",
                                  "coming_soon"
                                ]
                              }
                            },
                            "required": [
                              "organization_id",
                              "city_slug",
                              "city_name",
                              "city_status"
                            ],
                            "additionalProperties": false
                          },
                          "canonical_path": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "slug",
                          "sport_name",
                          "role",
                          "shirt_number",
                          "photo_url",
                          "avatar_head_id",
                          "team",
                          "scope",
                          "canonical_path"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "withheld_for_protection": {
                      "type": "number"
                    },
                    "next_cursor": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "scope",
                    "items",
                    "withheld_for_protection",
                    "next_cursor"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Unavailable city scope",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "state": {
                      "type": "string",
                      "const": "unavailable"
                    },
                    "scope": {
                      "type": "object",
                      "properties": {
                        "organization_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "city_slug": {
                          "type": "string"
                        },
                        "city_name": {
                          "type": "string"
                        },
                        "city_status": {
                          "type": "string",
                          "enum": [
                            "live",
                            "coming_soon"
                          ]
                        }
                      },
                      "required": [
                        "organization_id",
                        "city_slug",
                        "city_name",
                        "city_status"
                      ],
                      "additionalProperties": false
                    },
                    "reason": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "retryable": {
                          "type": "boolean"
                        },
                        "recovery_action": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "retryable",
                        "recovery_action"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "state",
                    "scope",
                    "reason"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read:public.players"
            ]
          }
        ],
        "x-tenant-scope": "public",
        "x-rate-limit-tier": "public_widget",
        "x-audit-required": false,
        "x-privacy-classification": "public"
      }
    },
    "/public/freshness": {
      "get": {
        "summary": "Read authoritative public cache invalidation cursors",
        "tags": [
          "public",
          "freshness"
        ],
        "parameters": [
          {
            "name": "city_slug",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Public freshness state",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "state": {
                      "type": "string",
                      "enum": [
                        "fresh",
                        "no_authoritative_event"
                      ]
                    },
                    "generated_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "latest_authoritative_at": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "invalidation_cursor": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "events": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "source": {
                            "type": "string",
                            "enum": [
                              "sport_truth",
                              "publication"
                            ]
                          },
                          "cursor": {
                            "type": "string"
                          },
                          "occurred_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "consumers": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        },
                        "required": [
                          "source",
                          "cursor",
                          "occurred_at",
                          "consumers"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "reason": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string"
                            },
                            "retryable": {
                              "type": "boolean"
                            },
                            "recovery_action": {
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message",
                            "retryable",
                            "recovery_action"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "state",
                    "generated_at",
                    "latest_authoritative_at",
                    "invalidation_cursor",
                    "events",
                    "reason"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read:public.matches"
            ]
          }
        ],
        "x-tenant-scope": "public",
        "x-rate-limit-tier": "public_widget",
        "x-audit-required": false,
        "x-privacy-classification": "public"
      }
    },
    "/public/sitemap": {
      "get": {
        "summary": "List fail-closed public sitemap entries with a stable cursor",
        "tags": [
          "public",
          "seo"
        ],
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Public sitemap page",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "schema_version": {
                      "type": "number",
                      "const": 1
                    },
                    "generated_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "city",
                              "competition",
                              "team",
                              "match",
                              "player"
                            ]
                          },
                          "entity_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "canonical_path": {
                            "type": "string"
                          },
                          "last_modified": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "indexable": {
                            "type": "boolean",
                            "const": true
                          },
                          "scope": {
                            "type": "object",
                            "properties": {
                              "organization_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "city_slug": {
                                "type": "string"
                              },
                              "city_name": {
                                "type": "string"
                              },
                              "city_status": {
                                "type": "string",
                                "enum": [
                                  "live",
                                  "coming_soon"
                                ]
                              }
                            },
                            "required": [
                              "organization_id",
                              "city_slug",
                              "city_name",
                              "city_status"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "kind",
                          "entity_id",
                          "canonical_path",
                          "last_modified",
                          "indexable",
                          "scope"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "next_cursor": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "schema_version",
                    "generated_at",
                    "items",
                    "next_cursor"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read:public.theme"
            ]
          }
        ],
        "x-tenant-scope": "public",
        "x-rate-limit-tier": "public_widget",
        "x-audit-required": false,
        "x-privacy-classification": "public"
      }
    },
    "/public/seo/resolve": {
      "get": {
        "summary": "Resolve canonical and indexability for one public entity",
        "tags": [
          "public",
          "seo"
        ],
        "parameters": [
          {
            "name": "kind",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "entity_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ready public SEO state",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "state": {
                          "type": "string",
                          "const": "ready"
                        },
                        "status": {
                          "type": "number",
                          "const": 200
                        },
                        "indexable": {
                          "type": "boolean",
                          "const": true
                        },
                        "canonical_path": {
                          "type": "string"
                        },
                        "last_modified": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "state",
                        "status",
                        "indexable",
                        "canonical_path",
                        "last_modified"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "state": {
                          "type": "string",
                          "const": "not_found"
                        },
                        "status": {
                          "type": "number",
                          "const": 404
                        },
                        "indexable": {
                          "type": "boolean",
                          "const": false
                        },
                        "canonical_path": {
                          "type": "null"
                        },
                        "reason": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string"
                            },
                            "retryable": {
                              "type": "boolean"
                            },
                            "recovery_action": {
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message",
                            "retryable",
                            "recovery_action"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "state",
                        "status",
                        "indexable",
                        "canonical_path",
                        "reason"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "state": {
                          "type": "string",
                          "const": "unavailable"
                        },
                        "status": {
                          "type": "number",
                          "const": 503
                        },
                        "indexable": {
                          "type": "boolean",
                          "const": false
                        },
                        "canonical_path": {
                          "type": "null"
                        },
                        "reason": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string"
                            },
                            "retryable": {
                              "type": "boolean"
                            },
                            "recovery_action": {
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message",
                            "retryable",
                            "recovery_action"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "state",
                        "status",
                        "indexable",
                        "canonical_path",
                        "reason"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Fail-closed not-found SEO state",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "state": {
                          "type": "string",
                          "const": "ready"
                        },
                        "status": {
                          "type": "number",
                          "const": 200
                        },
                        "indexable": {
                          "type": "boolean",
                          "const": true
                        },
                        "canonical_path": {
                          "type": "string"
                        },
                        "last_modified": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "state",
                        "status",
                        "indexable",
                        "canonical_path",
                        "last_modified"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "state": {
                          "type": "string",
                          "const": "not_found"
                        },
                        "status": {
                          "type": "number",
                          "const": 404
                        },
                        "indexable": {
                          "type": "boolean",
                          "const": false
                        },
                        "canonical_path": {
                          "type": "null"
                        },
                        "reason": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string"
                            },
                            "retryable": {
                              "type": "boolean"
                            },
                            "recovery_action": {
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message",
                            "retryable",
                            "recovery_action"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "state",
                        "status",
                        "indexable",
                        "canonical_path",
                        "reason"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "state": {
                          "type": "string",
                          "const": "unavailable"
                        },
                        "status": {
                          "type": "number",
                          "const": 503
                        },
                        "indexable": {
                          "type": "boolean",
                          "const": false
                        },
                        "canonical_path": {
                          "type": "null"
                        },
                        "reason": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string"
                            },
                            "retryable": {
                              "type": "boolean"
                            },
                            "recovery_action": {
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message",
                            "retryable",
                            "recovery_action"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "state",
                        "status",
                        "indexable",
                        "canonical_path",
                        "reason"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Fail-closed unavailable SEO state",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "state": {
                          "type": "string",
                          "const": "ready"
                        },
                        "status": {
                          "type": "number",
                          "const": 200
                        },
                        "indexable": {
                          "type": "boolean",
                          "const": true
                        },
                        "canonical_path": {
                          "type": "string"
                        },
                        "last_modified": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "state",
                        "status",
                        "indexable",
                        "canonical_path",
                        "last_modified"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "state": {
                          "type": "string",
                          "const": "not_found"
                        },
                        "status": {
                          "type": "number",
                          "const": 404
                        },
                        "indexable": {
                          "type": "boolean",
                          "const": false
                        },
                        "canonical_path": {
                          "type": "null"
                        },
                        "reason": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string"
                            },
                            "retryable": {
                              "type": "boolean"
                            },
                            "recovery_action": {
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message",
                            "retryable",
                            "recovery_action"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "state",
                        "status",
                        "indexable",
                        "canonical_path",
                        "reason"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "state": {
                          "type": "string",
                          "const": "unavailable"
                        },
                        "status": {
                          "type": "number",
                          "const": 503
                        },
                        "indexable": {
                          "type": "boolean",
                          "const": false
                        },
                        "canonical_path": {
                          "type": "null"
                        },
                        "reason": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string"
                            },
                            "retryable": {
                              "type": "boolean"
                            },
                            "recovery_action": {
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message",
                            "retryable",
                            "recovery_action"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "state",
                        "status",
                        "indexable",
                        "canonical_path",
                        "reason"
                      ],
                      "additionalProperties": false
                    }
                  ]
                },
                "example": {
                  "state": "unavailable",
                  "status": 503,
                  "indexable": false,
                  "canonical_path": null,
                  "reason": {
                    "code": "public_projection_unavailable",
                    "message": "The authoritative public projection is temporarily unavailable.",
                    "retryable": true,
                    "recovery_action": "Retry after the public projection has been rebuilt."
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read:public.theme"
            ]
          }
        ],
        "x-tenant-scope": "public",
        "x-rate-limit-tier": "public_widget",
        "x-audit-required": false,
        "x-privacy-classification": "public"
      }
    },
    "/public/read-model/news": {
      "get": {
        "summary": "List published news with complete cursor and renderer metadata",
        "tags": [
          "public",
          "news"
        ],
        "parameters": [
          {
            "name": "tag",
            "in": "query",
            "required": false,
            "description": "Case-insensitive whole-term filter over public slug, title, body and category fields.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 80
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Public news page",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "slug": {
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          },
                          "body": {
                            "type": "string"
                          },
                          "category": {
                            "type": "string",
                            "enum": [
                              "regolamento",
                              "giudice_sportivo",
                              "generale"
                            ]
                          },
                          "category_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "cover_media_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "is_pinned": {
                            "type": "boolean"
                          },
                          "published_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "original_publication": {
                            "type": "object",
                            "properties": {
                              "published_on": {
                                "type": "string",
                                "format": "date"
                              },
                              "precision": {
                                "type": "string",
                                "const": "day"
                              },
                              "source": {
                                "type": "object",
                                "properties": {
                                  "system": {
                                    "type": "string"
                                  },
                                  "id": {
                                    "type": "string"
                                  },
                                  "url": {
                                    "type": "string",
                                    "format": "uri"
                                  }
                                },
                                "required": [
                                  "system",
                                  "id",
                                  "url"
                                ],
                                "additionalProperties": false
                              },
                              "derived_published_at_rule": {
                                "type": "string",
                                "const": "europe_rome_midday"
                              },
                              "content": {
                                "type": "object",
                                "properties": {
                                  "media_hosting": {
                                    "type": "string",
                                    "const": "external_source"
                                  },
                                  "cover_image": {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "url": {
                                            "type": "string",
                                            "format": "uri"
                                          },
                                          "caption": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "url"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "images": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "url": {
                                          "type": "string",
                                          "format": "uri"
                                        },
                                        "caption": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "url"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "videos": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "provider": {
                                          "type": "string",
                                          "enum": [
                                            "youtube",
                                            "facebook"
                                          ]
                                        },
                                        "url": {
                                          "type": "string",
                                          "format": "uri"
                                        },
                                        "video_id": {
                                          "type": "string"
                                        },
                                        "title": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "provider",
                                        "url"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "links": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "url": {
                                          "type": "string",
                                          "format": "uri"
                                        },
                                        "label": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "url"
                                      ],
                                      "additionalProperties": false
                                    }
                                  }
                                },
                                "required": [
                                  "media_hosting",
                                  "cover_image",
                                  "images",
                                  "videos",
                                  "links"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "published_on",
                              "precision",
                              "source",
                              "derived_published_at_rule"
                            ],
                            "additionalProperties": false
                          },
                          "renderer": {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "const": "article"
                              },
                              "body_format": {
                                "type": "string",
                                "const": "plain_text"
                              },
                              "detail_path": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "kind",
                              "body_format",
                              "detail_path"
                            ],
                            "additionalProperties": false
                          },
                          "scope": {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "const": "tenant_global"
                              }
                            },
                            "required": [
                              "kind"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "id",
                          "slug",
                          "title",
                          "body",
                          "category",
                          "cover_media_id",
                          "is_pinned",
                          "published_at",
                          "renderer",
                          "scope"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "categories": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "slug": {
                            "type": "string"
                          },
                          "label": {
                            "type": "string"
                          },
                          "sort_order": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "id",
                          "slug",
                          "label",
                          "sort_order"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "pages": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "slug": {
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          },
                          "sort_order": {
                            "type": "number"
                          },
                          "organization_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "published_at": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "detail_path": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "slug",
                          "title",
                          "sort_order",
                          "organization_id",
                          "published_at",
                          "detail_path"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "next_cursor": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "items",
                    "categories",
                    "pages",
                    "next_cursor"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read:public.media"
            ]
          }
        ],
        "x-tenant-scope": "public",
        "x-rate-limit-tier": "public_widget",
        "x-audit-required": false,
        "x-privacy-classification": "public"
      }
    },
    "/public/read-model/media": {
      "get": {
        "summary": "List public media with kind-specific renderer metadata",
        "tags": [
          "public",
          "media"
        ],
        "parameters": [
          {
            "name": "match_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Public media page",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "image",
                              "video",
                              "document"
                            ]
                          },
                          "thumbnail_url": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uri"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "og_image_url": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uri"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "title": {
                            "type": "string"
                          },
                          "caption": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "captured_at": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "published_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "subjects": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "team",
                                    "match",
                                    "player"
                                  ]
                                },
                                "subject_id": {
                                  "type": "string"
                                },
                                "slug": {
                                  "oneOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "display_name": {
                                  "oneOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "kind",
                                "subject_id",
                                "slug",
                                "display_name"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "content_kind": {
                            "oneOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "image",
                                  "video",
                                  "document"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "asset_url": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uri"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "renderer": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "const": "ready"
                                  },
                                  "kind": {
                                    "type": "string",
                                    "const": "image"
                                  },
                                  "image_url": {
                                    "type": "string",
                                    "format": "uri"
                                  },
                                  "alt": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "state",
                                  "kind",
                                  "image_url",
                                  "alt"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "const": "ready"
                                  },
                                  "kind": {
                                    "type": "string",
                                    "const": "video"
                                  },
                                  "playback_url": {
                                    "type": "string",
                                    "format": "uri"
                                  },
                                  "poster_url": {
                                    "oneOf": [
                                      {
                                        "type": "string",
                                        "format": "uri"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "state",
                                  "kind",
                                  "playback_url",
                                  "poster_url"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "const": "ready"
                                  },
                                  "kind": {
                                    "type": "string",
                                    "const": "document"
                                  },
                                  "download_url": {
                                    "type": "string",
                                    "format": "uri"
                                  }
                                },
                                "required": [
                                  "state",
                                  "kind",
                                  "download_url"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "const": "unavailable"
                                  },
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "video",
                                      "document"
                                    ]
                                  },
                                  "poster_url": {
                                    "oneOf": [
                                      {
                                        "type": "string",
                                        "format": "uri"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "reason": {
                                    "type": "object",
                                    "properties": {
                                      "code": {
                                        "type": "string"
                                      },
                                      "message": {
                                        "type": "string"
                                      },
                                      "retryable": {
                                        "type": "boolean"
                                      },
                                      "recovery_action": {
                                        "oneOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "code",
                                      "message",
                                      "retryable",
                                      "recovery_action"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "state",
                                  "kind",
                                  "poster_url",
                                  "reason"
                                ],
                                "additionalProperties": false
                              }
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "kind",
                          "thumbnail_url",
                          "og_image_url",
                          "title",
                          "caption",
                          "captured_at",
                          "published_at",
                          "subjects",
                          "content_kind",
                          "asset_url",
                          "renderer"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "next_cursor": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "items",
                    "next_cursor"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "read:public.media"
            ]
          }
        ],
        "x-tenant-scope": "public",
        "x-rate-limit-tier": "public_widget",
        "x-audit-required": false,
        "x-privacy-classification": "public"
      }
    },
    "/me/public-scope": {
      "post": {
        "summary": "Explicitly change the caller public city scope",
        "tags": [
          "self",
          "cities"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "city_slug": {
                    "type": "string"
                  },
                  "organization_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "city_slug"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Saved public scope and propagation receipt",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "state": {
                      "type": "string",
                      "enum": [
                        "ready",
                        "unavailable"
                      ]
                    },
                    "scope": {
                      "type": "object",
                      "properties": {
                        "organization_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "city_slug": {
                          "type": "string"
                        },
                        "city_name": {
                          "type": "string"
                        },
                        "city_status": {
                          "type": "string",
                          "enum": [
                            "live",
                            "coming_soon"
                          ]
                        }
                      },
                      "required": [
                        "organization_id",
                        "city_slug",
                        "city_name",
                        "city_status"
                      ],
                      "additionalProperties": false
                    },
                    "preferences": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "tenant_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "user_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "favorite_tournament_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "favorite_organization_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "avatar_id": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updated_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "created_by": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "updated_by": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "tenant_id",
                        "user_id",
                        "favorite_tournament_id",
                        "favorite_organization_id",
                        "avatar_id",
                        "created_at",
                        "updated_at",
                        "created_by",
                        "updated_by"
                      ],
                      "additionalProperties": false
                    },
                    "propagation": {
                      "type": "object",
                      "properties": {
                        "schema_version": {
                          "type": "number",
                          "const": 1
                        },
                        "receipt_id": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        },
                        "resource": {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "media",
                                "feed",
                                "news",
                                "content_page",
                                "sponsor",
                                "white_label",
                                "public_scope",
                                "follow",
                                "checkin",
                                "badge"
                              ]
                            },
                            "id": {
                              "type": "string"
                            },
                            "version": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "kind",
                            "id",
                            "version"
                          ],
                          "additionalProperties": false
                        },
                        "state": {
                          "type": "string",
                          "const": "accepted"
                        },
                        "events": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "consumer": {
                                "type": "string",
                                "enum": [
                                  "web",
                                  "mobile"
                                ]
                              },
                              "cache_tag": {
                                "type": "string"
                              },
                              "state": {
                                "type": "string",
                                "const": "queued"
                              },
                              "eta_seconds": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "consumer",
                              "cache_tag",
                              "state",
                              "eta_seconds"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "emitted_at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "schema_version",
                        "receipt_id",
                        "request_id",
                        "resource",
                        "state",
                        "events",
                        "emitted_at"
                      ],
                      "additionalProperties": false
                    },
                    "reason": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string"
                            },
                            "retryable": {
                              "type": "boolean"
                            },
                            "recovery_action": {
                              "oneOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message",
                            "retryable",
                            "recovery_action"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "state",
                    "scope",
                    "preferences",
                    "propagation",
                    "reason"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "self",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": true,
        "x-privacy-classification": "pseudonymized"
      }
    },
    "/me/home": {
      "get": {
        "summary": "Read the scoped home and personal feed from one source",
        "tags": [
          "self",
          "home"
        ],
        "responses": {
          "200": {
            "description": "Personal scoped home",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "scope": {
                      "type": "object",
                      "properties": {
                        "organization_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "city_slug": {
                          "type": "string"
                        },
                        "city_name": {
                          "type": "string"
                        },
                        "city_status": {
                          "type": "string",
                          "enum": [
                            "live",
                            "coming_soon"
                          ]
                        }
                      },
                      "required": [
                        "organization_id",
                        "city_slug",
                        "city_name",
                        "city_status"
                      ],
                      "additionalProperties": false
                    },
                    "competitions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "slug": {
                            "type": "string"
                          },
                          "label": {
                            "type": "string"
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "championship",
                              "tournament"
                            ]
                          },
                          "format": {
                            "type": "string",
                            "enum": [
                              "league",
                              "league_with_playoffs",
                              "cup",
                              "group_then_knockout"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "draft",
                              "ready",
                              "scheduled",
                              "in_progress",
                              "completed",
                              "playoffs",
                              "archived",
                              "unpublished"
                            ]
                          },
                          "starts_on": {
                            "type": "string",
                            "format": "date"
                          },
                          "ends_on": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "date"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "scope": {
                            "type": "object",
                            "properties": {
                              "organization_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "city_slug": {
                                "type": "string"
                              },
                              "city_name": {
                                "type": "string"
                              },
                              "city_status": {
                                "type": "string",
                                "enum": [
                                  "live",
                                  "coming_soon"
                                ]
                              }
                            },
                            "required": [
                              "organization_id",
                              "city_slug",
                              "city_name",
                              "city_status"
                            ],
                            "additionalProperties": false
                          },
                          "season": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "slug": {
                                    "type": "string"
                                  },
                                  "label": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "id",
                                  "slug",
                                  "label"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "has_bracket": {
                            "type": "boolean"
                          },
                          "canonical_path": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "slug",
                          "label",
                          "kind",
                          "format",
                          "status",
                          "starts_on",
                          "ends_on",
                          "scope",
                          "season",
                          "has_bracket",
                          "canonical_path"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "teams": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "slug": {
                            "type": "string"
                          },
                          "label": {
                            "type": "string"
                          },
                          "short_name": {
                            "type": "string"
                          },
                          "crest": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "const": "available"
                                  },
                                  "url": {
                                    "type": "string",
                                    "format": "uri"
                                  }
                                },
                                "required": [
                                  "state",
                                  "url"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "const": "unavailable"
                                  },
                                  "reason": {
                                    "type": "string",
                                    "const": "moderated_crest_not_published"
                                  }
                                },
                                "required": [
                                  "state",
                                  "reason"
                                ],
                                "additionalProperties": false
                              }
                            ]
                          },
                          "colors": {
                            "type": "object",
                            "properties": {
                              "primary": {
                                "type": "string"
                              },
                              "secondary": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "primary",
                              "secondary"
                            ],
                            "additionalProperties": false
                          },
                          "logo_url": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uri"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "slug",
                          "label",
                          "short_name",
                          "crest",
                          "colors",
                          "logo_url"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "matches": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "scheduled_at": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "schedule_precision": {
                            "type": "string",
                            "enum": [
                              "exact",
                              "date_only",
                              "unknown"
                            ]
                          },
                          "scheduled_on": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "date"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "state": {
                            "type": "string",
                            "enum": [
                              "scheduled",
                              "live",
                              "ended",
                              "report_draft",
                              "report_submitted",
                              "report_official",
                              "corrected",
                              "cancelled",
                              "postponed"
                            ]
                          },
                          "home_team": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "slug": {
                                "type": "string"
                              },
                              "label": {
                                "type": "string"
                              },
                              "short_name": {
                                "type": "string"
                              },
                              "crest": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "state": {
                                        "type": "string",
                                        "const": "available"
                                      },
                                      "url": {
                                        "type": "string",
                                        "format": "uri"
                                      }
                                    },
                                    "required": [
                                      "state",
                                      "url"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "state": {
                                        "type": "string",
                                        "const": "unavailable"
                                      },
                                      "reason": {
                                        "type": "string",
                                        "const": "moderated_crest_not_published"
                                      }
                                    },
                                    "required": [
                                      "state",
                                      "reason"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "colors": {
                                "type": "object",
                                "properties": {
                                  "primary": {
                                    "type": "string"
                                  },
                                  "secondary": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "primary",
                                  "secondary"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "id",
                              "slug",
                              "label",
                              "short_name",
                              "crest",
                              "colors"
                            ],
                            "additionalProperties": false
                          },
                          "away_team": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "slug": {
                                "type": "string"
                              },
                              "label": {
                                "type": "string"
                              },
                              "short_name": {
                                "type": "string"
                              },
                              "crest": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "state": {
                                        "type": "string",
                                        "const": "available"
                                      },
                                      "url": {
                                        "type": "string",
                                        "format": "uri"
                                      }
                                    },
                                    "required": [
                                      "state",
                                      "url"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "state": {
                                        "type": "string",
                                        "const": "unavailable"
                                      },
                                      "reason": {
                                        "type": "string",
                                        "const": "moderated_crest_not_published"
                                      }
                                    },
                                    "required": [
                                      "state",
                                      "reason"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "colors": {
                                "type": "object",
                                "properties": {
                                  "primary": {
                                    "type": "string"
                                  },
                                  "secondary": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "primary",
                                  "secondary"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "id",
                              "slug",
                              "label",
                              "short_name",
                              "crest",
                              "colors"
                            ],
                            "additionalProperties": false
                          },
                          "score": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "home": {
                                    "type": "number"
                                  },
                                  "away": {
                                    "type": "number"
                                  }
                                },
                                "required": [
                                  "home",
                                  "away"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "live_started_at": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "live_ended_at": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "scope": {
                            "type": "object",
                            "properties": {
                              "organization_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "city_slug": {
                                "type": "string"
                              },
                              "city_name": {
                                "type": "string"
                              },
                              "city_status": {
                                "type": "string",
                                "enum": [
                                  "live",
                                  "coming_soon"
                                ]
                              }
                            },
                            "required": [
                              "organization_id",
                              "city_slug",
                              "city_name",
                              "city_status"
                            ],
                            "additionalProperties": false
                          },
                          "competition": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "slug": {
                                "type": "string"
                              },
                              "label": {
                                "type": "string"
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "championship",
                                  "tournament"
                                ]
                              },
                              "format": {
                                "type": "string",
                                "enum": [
                                  "league",
                                  "league_with_playoffs",
                                  "cup",
                                  "group_then_knockout"
                                ]
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "draft",
                                  "ready",
                                  "scheduled",
                                  "in_progress",
                                  "completed",
                                  "playoffs",
                                  "archived",
                                  "unpublished"
                                ]
                              },
                              "starts_on": {
                                "type": "string",
                                "format": "date"
                              },
                              "ends_on": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "format": "date"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "scope": {
                                "type": "object",
                                "properties": {
                                  "organization_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "city_slug": {
                                    "type": "string"
                                  },
                                  "city_name": {
                                    "type": "string"
                                  },
                                  "city_status": {
                                    "type": "string",
                                    "enum": [
                                      "live",
                                      "coming_soon"
                                    ]
                                  }
                                },
                                "required": [
                                  "organization_id",
                                  "city_slug",
                                  "city_name",
                                  "city_status"
                                ],
                                "additionalProperties": false
                              },
                              "season": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "slug": {
                                        "type": "string"
                                      },
                                      "label": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "slug",
                                      "label"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "has_bracket": {
                                "type": "boolean"
                              },
                              "canonical_path": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "slug",
                              "label",
                              "kind",
                              "format",
                              "status",
                              "starts_on",
                              "ends_on",
                              "scope",
                              "season",
                              "has_bracket",
                              "canonical_path"
                            ],
                            "additionalProperties": false
                          },
                          "round": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "label": {
                                    "type": "string"
                                  },
                                  "order_index": {
                                    "type": "number"
                                  }
                                },
                                "required": [
                                  "id",
                                  "label",
                                  "order_index"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "venue": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "const": "ready"
                                  },
                                  "id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "label": {
                                    "type": "string"
                                  },
                                  "address": {
                                    "oneOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "surface": {
                                    "oneOf": [
                                      {
                                        "type": "string",
                                        "enum": [
                                          "grass",
                                          "synthetic",
                                          "mixed",
                                          "indoor"
                                        ]
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "state",
                                  "id",
                                  "label",
                                  "address",
                                  "surface"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "const": "unavailable"
                                  },
                                  "reason": {
                                    "type": "object",
                                    "properties": {
                                      "code": {
                                        "type": "string"
                                      },
                                      "message": {
                                        "type": "string"
                                      },
                                      "retryable": {
                                        "type": "boolean"
                                      },
                                      "recovery_action": {
                                        "oneOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "code",
                                      "message",
                                      "retryable",
                                      "recovery_action"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "state",
                                  "reason"
                                ],
                                "additionalProperties": false
                              }
                            ]
                          },
                          "structure": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "const": "ready"
                                  },
                                  "phase": {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "id": {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          "label": {
                                            "type": "string"
                                          },
                                          "kind": {
                                            "type": "string",
                                            "enum": [
                                              "group_stage",
                                              "league",
                                              "knockout",
                                              "placement"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "id",
                                          "label",
                                          "kind"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "group": {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "id": {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          "label": {
                                            "type": "string"
                                          },
                                          "order_index": {
                                            "type": "number"
                                          }
                                        },
                                        "required": [
                                          "id",
                                          "label",
                                          "order_index"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "state",
                                  "phase",
                                  "group"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "const": "unavailable"
                                  },
                                  "phase": {
                                    "type": "null"
                                  },
                                  "group": {
                                    "type": "null"
                                  },
                                  "reason": {
                                    "type": "object",
                                    "properties": {
                                      "code": {
                                        "type": "string"
                                      },
                                      "message": {
                                        "type": "string"
                                      },
                                      "retryable": {
                                        "type": "boolean"
                                      },
                                      "recovery_action": {
                                        "oneOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "code",
                                      "message",
                                      "retryable",
                                      "recovery_action"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "state",
                                  "phase",
                                  "group",
                                  "reason"
                                ],
                                "additionalProperties": false
                              }
                            ]
                          },
                          "officiality": {
                            "type": "object",
                            "properties": {
                              "state": {
                                "type": "string",
                                "enum": [
                                  "scheduled",
                                  "live",
                                  "provisional",
                                  "official",
                                  "sub_iudice",
                                  "postponed",
                                  "cancelled"
                                ]
                              },
                              "is_official": {
                                "type": "boolean"
                              },
                              "reason": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "code": {
                                        "type": "string"
                                      },
                                      "message": {
                                        "type": "string"
                                      },
                                      "retryable": {
                                        "type": "boolean"
                                      },
                                      "recovery_action": {
                                        "oneOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "code",
                                      "message",
                                      "retryable",
                                      "recovery_action"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "state",
                              "is_official",
                              "reason"
                            ],
                            "additionalProperties": false
                          },
                          "status_reason": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "code": {
                                    "type": "string"
                                  },
                                  "message": {
                                    "type": "string"
                                  },
                                  "retryable": {
                                    "type": "boolean"
                                  },
                                  "recovery_action": {
                                    "oneOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "code",
                                  "message",
                                  "retryable",
                                  "recovery_action"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "result_origin": {
                            "oneOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "played",
                                  "forfeit"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "forfeit_trigger": {
                            "oneOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "no_show",
                                  "ineligible_player",
                                  "roster_below_minimum",
                                  "late_result_confirmation_both_secretariats"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "lineage": {
                            "type": "object",
                            "properties": {
                              "current_report_version_id": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "current_report_version": {
                                "oneOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "correction_of_report_version_id": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "amendment_set_id": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "is_sub_iudice": {
                                "type": "boolean"
                              },
                              "projection_revision_id": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "current_report_version_id",
                              "current_report_version",
                              "correction_of_report_version_id",
                              "amendment_set_id",
                              "is_sub_iudice",
                              "projection_revision_id"
                            ],
                            "additionalProperties": false
                          },
                          "lineups": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "side": {
                                  "type": "string",
                                  "enum": [
                                    "home",
                                    "away"
                                  ]
                                },
                                "entries": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "player_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "sport_name": {
                                        "type": "string"
                                      },
                                      "slug": {
                                        "type": "string"
                                      },
                                      "shirt_number": {
                                        "type": "number"
                                      },
                                      "role": {
                                        "oneOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "starting": {
                                        "type": "boolean"
                                      },
                                      "captain": {
                                        "type": "boolean"
                                      }
                                    },
                                    "required": [
                                      "player_id",
                                      "sport_name",
                                      "slug",
                                      "shirt_number",
                                      "role",
                                      "starting",
                                      "captain"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "protected_slots": {
                                  "type": "number"
                                }
                              },
                              "required": [
                                "side",
                                "entries",
                                "protected_slots"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "canonical_path": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "scheduled_at",
                          "schedule_precision",
                          "scheduled_on",
                          "state",
                          "home_team",
                          "away_team",
                          "score",
                          "live_started_at",
                          "live_ended_at",
                          "scope",
                          "competition",
                          "round",
                          "venue",
                          "structure",
                          "officiality",
                          "status_reason",
                          "result_origin",
                          "forfeit_trigger",
                          "lineage",
                          "lineups",
                          "canonical_path"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "freshness": {
                      "type": "object",
                      "properties": {
                        "state": {
                          "type": "string",
                          "enum": [
                            "fresh",
                            "no_authoritative_event"
                          ]
                        },
                        "generated_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "latest_authoritative_at": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "date-time"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "invalidation_cursor": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "events": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "source": {
                                "type": "string",
                                "enum": [
                                  "sport_truth",
                                  "publication"
                                ]
                              },
                              "cursor": {
                                "type": "string"
                              },
                              "occurred_at": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "consumers": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              }
                            },
                            "required": [
                              "source",
                              "cursor",
                              "occurred_at",
                              "consumers"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "reason": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string"
                                },
                                "message": {
                                  "type": "string"
                                },
                                "retryable": {
                                  "type": "boolean"
                                },
                                "recovery_action": {
                                  "oneOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "code",
                                "message",
                                "retryable",
                                "recovery_action"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "state",
                        "generated_at",
                        "latest_authoritative_at",
                        "invalidation_cursor",
                        "events",
                        "reason"
                      ],
                      "additionalProperties": false
                    },
                    "season_scope": {
                      "type": "object",
                      "properties": {
                        "requested_slug": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "defaulted",
                            "not_requested",
                            "applied",
                            "unknown"
                          ]
                        },
                        "applied_slug": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "competition_count": {
                          "type": "number"
                        },
                        "reason": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string"
                                },
                                "message": {
                                  "type": "string"
                                },
                                "retryable": {
                                  "type": "boolean"
                                },
                                "recovery_action": {
                                  "oneOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "code",
                                "message",
                                "retryable",
                                "recovery_action"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "requested_slug",
                        "state",
                        "applied_slug",
                        "competition_count",
                        "reason"
                      ],
                      "additionalProperties": false
                    },
                    "seasons": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "slug": {
                            "type": "string"
                          },
                          "label": {
                            "type": "string"
                          },
                          "starts_on": {
                            "type": "string",
                            "format": "date"
                          },
                          "ends_on": {
                            "type": "string",
                            "format": "date"
                          },
                          "competition_count": {
                            "type": "number"
                          },
                          "is_current": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "id",
                          "slug",
                          "label",
                          "starts_on",
                          "ends_on",
                          "competition_count",
                          "is_current"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "match_window": {
                      "type": "object",
                      "properties": {
                        "state": {
                          "type": "string",
                          "const": "window"
                        },
                        "per_side": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "state",
                        "per_side"
                      ],
                      "additionalProperties": false
                    },
                    "state": {
                      "type": "string",
                      "const": "ready"
                    },
                    "feed": {
                      "type": "object",
                      "properties": {
                        "tenant_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "mode": {
                          "type": "string",
                          "enum": [
                            "followed_first",
                            "public_fallback"
                          ]
                        },
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "tenant_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "post": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "match.result",
                                      "match.mvp",
                                      "standings.update",
                                      "fantasy.top",
                                      "media.published",
                                      "sponsor.campaign"
                                    ]
                                  },
                                  "body": {
                                    "type": "string"
                                  },
                                  "published_at": {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  "match_id": {
                                    "oneOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "team_id": {
                                    "oneOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "player_id": {
                                    "oneOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "target_href": {
                                    "oneOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "id",
                                  "kind",
                                  "body",
                                  "published_at",
                                  "match_id",
                                  "team_id",
                                  "player_id",
                                  "target_href"
                                ],
                                "additionalProperties": false
                              },
                              "reaction_counts": {
                                "type": "object",
                                "properties": {
                                  "tenant_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "like": {
                                    "type": "number"
                                  },
                                  "celebrate": {
                                    "type": "number"
                                  },
                                  "support": {
                                    "type": "number"
                                  }
                                },
                                "required": [
                                  "tenant_id",
                                  "like",
                                  "celebrate",
                                  "support"
                                ],
                                "additionalProperties": false
                              },
                              "viewer_reactions": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "like",
                                    "celebrate",
                                    "support"
                                  ]
                                }
                              },
                              "followed_subject": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "tenant_id",
                              "post",
                              "reaction_counts",
                              "viewer_reactions",
                              "followed_subject"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "tenant_id",
                        "mode",
                        "items"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "scope",
                    "competitions",
                    "teams",
                    "matches",
                    "freshness",
                    "season_scope",
                    "seasons",
                    "match_window",
                    "state",
                    "feed"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable selected city scope",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "state": {
                      "type": "string",
                      "const": "unavailable"
                    },
                    "scope": {
                      "type": "object",
                      "properties": {
                        "organization_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "city_slug": {
                          "type": "string"
                        },
                        "city_name": {
                          "type": "string"
                        },
                        "city_status": {
                          "type": "string",
                          "enum": [
                            "live",
                            "coming_soon"
                          ]
                        }
                      },
                      "required": [
                        "organization_id",
                        "city_slug",
                        "city_name",
                        "city_status"
                      ],
                      "additionalProperties": false
                    },
                    "reason": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "retryable": {
                          "type": "boolean"
                        },
                        "recovery_action": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "retryable",
                        "recovery_action"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "state",
                    "scope",
                    "reason"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "x-tenant-scope": "self",
        "x-rate-limit-tier": "authenticated",
        "x-audit-required": false,
        "x-privacy-classification": "pseudonymized"
      }
    }
  },
  "components": {
    "schemas": {
      "ApiError": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "minLength": 1
          },
          "message": {
            "type": "string",
            "minLength": 1
          },
          "details": {
            "type": "object",
            "additionalProperties": true
          },
          "retry_after_seconds": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "request_id": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ]
      },
      "HealthResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "ok",
              "degraded"
            ]
          },
          "version": {
            "type": "string"
          },
          "release": {
            "type": "object",
            "properties": {
              "sha": {
                "type": "string",
                "pattern": "^[0-9a-f]{40}$"
              },
              "id": {
                "type": "string",
                "pattern": "^[A-Za-z0-9._-]{1,128}$"
              },
              "built_at": {
                "type": "string",
                "format": "date-time"
              }
            },
            "required": [
              "sha",
              "id",
              "built_at"
            ]
          },
          "uptime_seconds": {
            "type": "number",
            "minimum": 0
          },
          "checks": {
            "type": "object",
            "additionalProperties": true
          },
          "mobile_update": {
            "type": "object",
            "properties": {
              "min_supported_version": {
                "type": "string",
                "pattern": "^\\d+\\.\\d+\\.\\d+$"
              },
              "ios_store_url": {
                "type": "string",
                "format": "uri"
              },
              "android_store_url": {
                "type": "string",
                "format": "uri"
              }
            },
            "required": [
              "min_supported_version",
              "ios_store_url",
              "android_store_url"
            ]
          }
        },
        "required": [
          "status",
          "version",
          "uptime_seconds",
          "checks"
        ]
      },
      "PublicTeam": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "slug": {
            "type": "string"
          },
          "display_name": {
            "type": "string"
          },
          "short_name": {
            "type": "string"
          },
          "primary_color": {
            "type": "string"
          },
          "secondary_color": {
            "type": "string"
          },
          "logo_url": {
            "oneOf": [
              {
                "type": "string",
                "format": "uri"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "slug",
          "display_name",
          "short_name",
          "primary_color",
          "secondary_color",
          "logo_url"
        ]
      },
      "PublicMatch": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "scheduled_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "schedule_precision": {
            "type": "string",
            "enum": [
              "exact",
              "date_only",
              "unknown"
            ]
          },
          "scheduled_on": {
            "oneOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ]
          },
          "state": {
            "type": "string",
            "enum": [
              "scheduled",
              "live",
              "ended",
              "report_draft",
              "report_submitted",
              "report_official",
              "corrected",
              "cancelled",
              "postponed"
            ]
          },
          "home_team_id": {
            "type": "string",
            "format": "uuid"
          },
          "away_team_id": {
            "type": "string",
            "format": "uuid"
          },
          "score_home": {
            "oneOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "score_away": {
            "oneOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "scheduled_at",
          "schedule_precision",
          "scheduled_on",
          "state",
          "home_team_id",
          "away_team_id",
          "score_home",
          "score_away"
        ]
      },
      "RealtimeEvent": {
        "type": "object",
        "properties": {
          "sequence": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "match_id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "type": "string",
            "enum": [
              "match.state_changed",
              "match.score_changed",
              "match.event_appended",
              "match.report_submitted",
              "match.report_official",
              "match.report_corrected"
            ]
          },
          "occurred_at": {
            "type": "string",
            "format": "date-time"
          },
          "payload": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "match.state_changed"
                    ]
                  },
                  "from": {
                    "type": "string",
                    "enum": [
                      "scheduled",
                      "live",
                      "ended",
                      "report_draft",
                      "report_submitted",
                      "report_official",
                      "corrected",
                      "cancelled",
                      "postponed"
                    ]
                  },
                  "to": {
                    "type": "string",
                    "enum": [
                      "scheduled",
                      "live",
                      "ended",
                      "report_draft",
                      "report_submitted",
                      "report_official",
                      "corrected",
                      "cancelled",
                      "postponed"
                    ]
                  }
                },
                "required": [
                  "kind",
                  "from",
                  "to"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "match.score_changed"
                    ]
                  },
                  "score_home": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "score_away": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "required": [
                  "kind",
                  "score_home",
                  "score_away"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "match.event_appended"
                    ]
                  },
                  "event_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "event_type": {
                    "type": "string"
                  },
                  "minute": {
                    "oneOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "side": {
                    "oneOf": [
                      {
                        "type": "string",
                        "enum": [
                          "home",
                          "away"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "kind",
                  "event_id",
                  "event_type",
                  "minute",
                  "side"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "match.report_submitted"
                    ]
                  },
                  "version": {
                    "type": "integer",
                    "exclusiveMinimum": 0
                  }
                },
                "required": [
                  "kind",
                  "version"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "match.report_official"
                    ]
                  },
                  "version": {
                    "type": "integer",
                    "exclusiveMinimum": 0
                  }
                },
                "required": [
                  "kind",
                  "version"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "match.report_corrected"
                    ]
                  },
                  "previous_version": {
                    "type": "integer",
                    "exclusiveMinimum": 0
                  },
                  "new_version": {
                    "type": "integer",
                    "exclusiveMinimum": 0
                  }
                },
                "required": [
                  "kind",
                  "previous_version",
                  "new_version"
                ]
              }
            ]
          }
        },
        "required": [
          "sequence",
          "tenant_id",
          "match_id",
          "kind",
          "occurred_at",
          "payload"
        ]
      },
      "RealtimeResyncRequired": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "resync_required"
            ]
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "reason": {
            "type": "string",
            "enum": [
              "event_count_limit",
              "event_age_limit"
            ]
          },
          "resume_cursor": {
            "type": "integer",
            "minimum": 0
          },
          "snapshot_url": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "type",
          "tenant_id",
          "reason",
          "resume_cursor",
          "snapshot_url"
        ]
      },
      "PublicPlayer": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "slug": {
            "type": "string"
          },
          "sport_name": {
            "type": "string"
          },
          "role": {
            "type": "string",
            "enum": [
              "GK",
              "DEF",
              "MID",
              "FWD"
            ]
          },
          "shirt_number": {
            "oneOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "photo_url": {
            "oneOf": [
              {
                "type": "string",
                "format": "uri"
              },
              {
                "type": "null"
              }
            ]
          },
          "avatar_head_id": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "head-01",
                  "head-02",
                  "head-03",
                  "head-04",
                  "head-05",
                  "head-06",
                  "head-07",
                  "head-08",
                  "head-09",
                  "head-10",
                  "head-11",
                  "head-12",
                  "head-13",
                  "head-14",
                  "head-15",
                  "head-16",
                  "head-17",
                  "head-18",
                  "head-19",
                  "head-20",
                  "head-21",
                  "head-22",
                  "head-23",
                  "head-24",
                  "head-25",
                  "head-26",
                  "head-27",
                  "head-28",
                  "head-29",
                  "head-30",
                  "head-31",
                  "head-32",
                  "head-33",
                  "head-34",
                  "head-35",
                  "head-36",
                  "head-37",
                  "head-38",
                  "head-39",
                  "head-40",
                  "head-41",
                  "head-42",
                  "head-43",
                  "head-44",
                  "head-45",
                  "head-46",
                  "head-47",
                  "head-48",
                  "head-49",
                  "head-50",
                  "head-51",
                  "head-52",
                  "head-53",
                  "head-54",
                  "head-55",
                  "head-56",
                  "head-57",
                  "head-58",
                  "head-59",
                  "head-60",
                  "head-61",
                  "head-62",
                  "head-63",
                  "head-64",
                  "head-65",
                  "head-66",
                  "head-67",
                  "head-68",
                  "head-69",
                  "head-70",
                  "head-71",
                  "head-72",
                  "head-73",
                  "head-74",
                  "head-75",
                  "head-76",
                  "head-77",
                  "head-78",
                  "head-79",
                  "head-80",
                  "head-81",
                  "head-82",
                  "head-83",
                  "head-84",
                  "head-85",
                  "head-86",
                  "head-87",
                  "head-88",
                  "head-89",
                  "head-90",
                  "head-91",
                  "head-92",
                  "head-93",
                  "head-94",
                  "head-95",
                  "head-96",
                  "head-97",
                  "head-98",
                  "head-99",
                  "head-100",
                  "head-101",
                  "head-102",
                  "head-103",
                  "head-104",
                  "head-105",
                  "head-106",
                  "head-107",
                  "head-108",
                  "head-109",
                  "head-110",
                  "head-111",
                  "head-112",
                  "head-113",
                  "head-114",
                  "head-115",
                  "head-116",
                  "head-117",
                  "head-118",
                  "head-119",
                  "head-120",
                  "head-121",
                  "head-122",
                  "head-123",
                  "head-124",
                  "head-125",
                  "head-126",
                  "head-127",
                  "head-128",
                  "head-129",
                  "head-130",
                  "head-131",
                  "head-132",
                  "head-133",
                  "head-134",
                  "head-135",
                  "head-136",
                  "head-137",
                  "head-138",
                  "head-139",
                  "head-140",
                  "head-141",
                  "head-142",
                  "head-143",
                  "head-144",
                  "head-145",
                  "head-146",
                  "head-147",
                  "head-148",
                  "head-149",
                  "head-150",
                  "head-151",
                  "head-152",
                  "head-153",
                  "head-154",
                  "head-155",
                  "head-156",
                  "head-157",
                  "head-158",
                  "head-159",
                  "head-160",
                  "head-161",
                  "head-162",
                  "head-163",
                  "head-164",
                  "head-165",
                  "head-166",
                  "head-167",
                  "head-168",
                  "head-169",
                  "head-170",
                  "head-171",
                  "head-172",
                  "head-173",
                  "head-174",
                  "head-175",
                  "head-176",
                  "head-177",
                  "head-178",
                  "head-179",
                  "head-180",
                  "head-181",
                  "head-182",
                  "head-183"
                ]
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "slug",
          "sport_name",
          "role",
          "shirt_number",
          "photo_url",
          "avatar_head_id"
        ]
      },
      "PublicPlayerQr": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string"
          },
          "profile_path": {
            "type": "string"
          },
          "qr_text": {
            "type": "string"
          }
        },
        "required": [
          "slug",
          "profile_path",
          "qr_text"
        ]
      },
      "PublicStanding": {
        "type": "object",
        "properties": {
          "team_id": {
            "type": "string",
            "format": "uuid"
          },
          "played": {
            "type": "integer",
            "minimum": 0
          },
          "won": {
            "type": "integer",
            "minimum": 0
          },
          "drawn": {
            "type": "integer",
            "minimum": 0
          },
          "lost": {
            "type": "integer",
            "minimum": 0
          },
          "goals_for": {
            "type": "integer",
            "minimum": 0
          },
          "goals_against": {
            "type": "integer",
            "minimum": 0
          },
          "goal_difference": {
            "type": "integer"
          },
          "points": {
            "type": "integer"
          },
          "points_on_field": {
            "type": "integer"
          },
          "points_adjustment": {
            "type": "integer"
          },
          "tournament_id": {
            "type": "string",
            "format": "uuid"
          },
          "phase_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "group_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "scope": {
            "type": "string",
            "enum": [
              "competition",
              "group"
            ]
          },
          "projection_revision_id": {
            "type": "string",
            "format": "uuid"
          },
          "ruleset_revision_id": {
            "type": "string",
            "format": "uuid"
          },
          "position": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "ranking_status": {
            "type": "string",
            "enum": [
              "pending_resolution"
            ]
          },
          "form": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "W",
                "D",
                "L"
              ]
            },
            "maxItems": 5
          },
          "zone": {
            "type": "string",
            "enum": [
              "promotion",
              "playoff",
              "relegation"
            ]
          },
          "zone_label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 40
          }
        },
        "required": [
          "team_id",
          "played",
          "won",
          "drawn",
          "lost",
          "goals_for",
          "goals_against",
          "goal_difference",
          "points",
          "position",
          "form"
        ]
      },
      "PublicTournamentCalendar": {
        "type": "object",
        "properties": {
          "rounds": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string",
                  "minLength": 1
                },
                "fixtures": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "match_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "scheduled_at": {
                        "oneOf": [
                          {
                            "type": "string",
                            "format": "date-time"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "schedule_precision": {
                        "type": "string",
                        "enum": [
                          "exact",
                          "date_only",
                          "unknown"
                        ]
                      },
                      "scheduled_on": {
                        "oneOf": [
                          {
                            "type": "string",
                            "format": "date"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "state": {
                        "type": "string",
                        "enum": [
                          "scheduled",
                          "live",
                          "ended",
                          "report_draft",
                          "report_submitted",
                          "report_official",
                          "corrected",
                          "cancelled",
                          "postponed"
                        ]
                      },
                      "home_team_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "away_team_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "field_id": {
                        "oneOf": [
                          {
                            "type": "string",
                            "format": "uuid"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "match_id",
                      "scheduled_at",
                      "schedule_precision",
                      "scheduled_on",
                      "state",
                      "home_team_id",
                      "away_team_id",
                      "field_id"
                    ]
                  }
                }
              },
              "required": [
                "label",
                "fixtures"
              ]
            }
          }
        },
        "required": [
          "rounds"
        ]
      },
      "PublicTournamentTeams": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "slug": {
                  "type": "string"
                },
                "display_name": {
                  "type": "string"
                },
                "short_name": {
                  "type": "string"
                },
                "primary_color": {
                  "type": "string"
                },
                "secondary_color": {
                  "type": "string"
                },
                "logo_url": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uri"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "slug",
                "display_name",
                "short_name",
                "primary_color",
                "secondary_color",
                "logo_url"
              ]
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "PublicTournament": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "slug": {
            "type": "string",
            "minLength": 2,
            "maxLength": 64,
            "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
          },
          "label": {
            "type": "string",
            "minLength": 1
          },
          "starts_on": {
            "type": "string",
            "format": "date"
          },
          "ends_on": {
            "oneOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ]
          },
          "organization_id": {
            "type": "string",
            "format": "uuid"
          },
          "city_name": {
            "type": "string",
            "minLength": 1
          },
          "format": {
            "type": "string",
            "enum": [
              "league",
              "league_with_playoffs",
              "cup",
              "group_then_knockout"
            ]
          }
        },
        "required": [
          "id",
          "slug",
          "label",
          "starts_on",
          "ends_on"
        ]
      },
      "PublicTournamentSummary": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "slug": {
            "type": "string",
            "minLength": 2,
            "maxLength": 64,
            "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
          },
          "label": {
            "type": "string",
            "minLength": 1
          },
          "starts_on": {
            "type": "string",
            "format": "date"
          },
          "ends_on": {
            "oneOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ]
          },
          "organization_id": {
            "type": "string",
            "format": "uuid"
          },
          "city_name": {
            "type": "string",
            "minLength": 1
          },
          "format": {
            "type": "string",
            "enum": [
              "league",
              "league_with_playoffs",
              "cup",
              "group_then_knockout"
            ]
          }
        },
        "required": [
          "id",
          "slug",
          "label",
          "starts_on",
          "ends_on"
        ]
      },
      "PublicTournamentList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "slug": {
                  "type": "string",
                  "minLength": 2,
                  "maxLength": 64,
                  "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
                },
                "label": {
                  "type": "string",
                  "minLength": 1
                },
                "starts_on": {
                  "type": "string",
                  "format": "date"
                },
                "ends_on": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "organization_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "city_name": {
                  "type": "string",
                  "minLength": 1
                },
                "format": {
                  "type": "string",
                  "enum": [
                    "league",
                    "league_with_playoffs",
                    "cup",
                    "group_then_knockout"
                  ]
                }
              },
              "required": [
                "id",
                "slug",
                "label",
                "starts_on",
                "ends_on"
              ]
            },
            "maxItems": 200
          },
          "next_cursor": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 400
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "items",
          "next_cursor"
        ]
      },
      "PublicOrganizationList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "city_name": {
                  "type": "string",
                  "minLength": 1
                },
                "city_slug": {
                  "type": "string",
                  "minLength": 2,
                  "maxLength": 64,
                  "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
                },
                "city_status": {
                  "type": "string",
                  "enum": [
                    "live",
                    "coming_soon"
                  ]
                },
                "is_national": {
                  "type": "boolean"
                },
                "counts": {
                  "type": "object",
                  "properties": {
                    "tournaments": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "teams": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "players": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": []
                }
              },
              "required": [
                "id",
                "city_name",
                "city_slug",
                "city_status"
              ]
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "PublicTournamentBracket": {
        "type": "object",
        "properties": {
          "tournament_id": {
            "type": "string",
            "format": "uuid"
          },
          "bracket_revision_id": {
            "type": "string",
            "format": "uuid"
          },
          "projection_revision_id": {
            "type": "string",
            "format": "uuid"
          },
          "rounds": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "label": {
                  "type": "string",
                  "minLength": 1
                },
                "order_index": {
                  "type": "integer",
                  "minimum": 0
                },
                "config": {
                  "type": "object",
                  "properties": {
                    "legs": {
                      "oneOf": [
                        {
                          "type": "number",
                          "enum": [
                            1
                          ]
                        },
                        {
                          "type": "number",
                          "enum": [
                            2
                          ]
                        }
                      ]
                    },
                    "away_goals_rule": {
                      "type": "boolean"
                    },
                    "extra_time": {
                      "type": "boolean"
                    },
                    "penalties": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "legs",
                    "extra_time",
                    "penalties"
                  ]
                },
                "ties": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "order_index": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "home_slot": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "team"
                                ]
                              },
                              "team_id": {
                                "type": "string",
                                "format": "uuid"
                              }
                            },
                            "required": [
                              "kind",
                              "team_id"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "winner_of_tie"
                                ]
                              },
                              "tie_id": {
                                "type": "string",
                                "format": "uuid"
                              }
                            },
                            "required": [
                              "kind",
                              "tie_id"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "bye"
                                ]
                              }
                            },
                            "required": [
                              "kind"
                            ]
                          }
                        ]
                      },
                      "away_slot": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "team"
                                ]
                              },
                              "team_id": {
                                "type": "string",
                                "format": "uuid"
                              }
                            },
                            "required": [
                              "kind",
                              "team_id"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "winner_of_tie"
                                ]
                              },
                              "tie_id": {
                                "type": "string",
                                "format": "uuid"
                              }
                            },
                            "required": [
                              "kind",
                              "tie_id"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "bye"
                                ]
                              }
                            },
                            "required": [
                              "kind"
                            ]
                          }
                        ]
                      },
                      "bye": {
                        "type": "boolean"
                      },
                      "match_ids": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "maxItems": 2
                      },
                      "winner_team_id": {
                        "oneOf": [
                          {
                            "type": "string",
                            "format": "uuid"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "projection_revision_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "bracket_revision_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "aggregate_score_home": {
                        "oneOf": [
                          {
                            "type": "integer",
                            "minimum": 0
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "aggregate_score_away": {
                        "oneOf": [
                          {
                            "type": "integer",
                            "minimum": 0
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "extra_time_score_home": {
                        "oneOf": [
                          {
                            "type": "integer",
                            "minimum": 0
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "extra_time_score_away": {
                        "oneOf": [
                          {
                            "type": "integer",
                            "minimum": 0
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "penalty_shootout_home": {
                        "oneOf": [
                          {
                            "type": "integer",
                            "minimum": 0
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "penalty_shootout_away": {
                        "oneOf": [
                          {
                            "type": "integer",
                            "minimum": 0
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "advancement_reason": {
                        "oneOf": [
                          {
                            "type": "string",
                            "enum": [
                              "aggregate",
                              "extra_time",
                              "penalties",
                              "bye",
                              "committee_decision"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "id",
                      "order_index",
                      "home_slot",
                      "away_slot",
                      "bye",
                      "match_ids",
                      "winner_team_id"
                    ]
                  }
                }
              },
              "required": [
                "id",
                "label",
                "order_index",
                "config",
                "ties"
              ]
            }
          },
          "shootout_display": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "dcr",
                  "rig"
                ]
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "tournament_id",
          "rounds"
        ]
      },
      "PublicPlayerCareer": {
        "type": "object",
        "properties": {
          "player": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "slug": {
                    "type": "string"
                  },
                  "sport_name": {
                    "type": "string"
                  },
                  "role": {
                    "type": "string",
                    "enum": [
                      "GK",
                      "DEF",
                      "MID",
                      "FWD"
                    ]
                  },
                  "shirt_number": {
                    "oneOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "photo_url": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uri"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "avatar_head_id": {
                    "oneOf": [
                      {
                        "type": "string",
                        "enum": [
                          "head-01",
                          "head-02",
                          "head-03",
                          "head-04",
                          "head-05",
                          "head-06",
                          "head-07",
                          "head-08",
                          "head-09",
                          "head-10",
                          "head-11",
                          "head-12",
                          "head-13",
                          "head-14",
                          "head-15",
                          "head-16",
                          "head-17",
                          "head-18",
                          "head-19",
                          "head-20",
                          "head-21",
                          "head-22",
                          "head-23",
                          "head-24",
                          "head-25",
                          "head-26",
                          "head-27",
                          "head-28",
                          "head-29",
                          "head-30",
                          "head-31",
                          "head-32",
                          "head-33",
                          "head-34",
                          "head-35",
                          "head-36",
                          "head-37",
                          "head-38",
                          "head-39",
                          "head-40",
                          "head-41",
                          "head-42",
                          "head-43",
                          "head-44",
                          "head-45",
                          "head-46",
                          "head-47",
                          "head-48",
                          "head-49",
                          "head-50",
                          "head-51",
                          "head-52",
                          "head-53",
                          "head-54",
                          "head-55",
                          "head-56",
                          "head-57",
                          "head-58",
                          "head-59",
                          "head-60",
                          "head-61",
                          "head-62",
                          "head-63",
                          "head-64",
                          "head-65",
                          "head-66",
                          "head-67",
                          "head-68",
                          "head-69",
                          "head-70",
                          "head-71",
                          "head-72",
                          "head-73",
                          "head-74",
                          "head-75",
                          "head-76",
                          "head-77",
                          "head-78",
                          "head-79",
                          "head-80",
                          "head-81",
                          "head-82",
                          "head-83",
                          "head-84",
                          "head-85",
                          "head-86",
                          "head-87",
                          "head-88",
                          "head-89",
                          "head-90",
                          "head-91",
                          "head-92",
                          "head-93",
                          "head-94",
                          "head-95",
                          "head-96",
                          "head-97",
                          "head-98",
                          "head-99",
                          "head-100",
                          "head-101",
                          "head-102",
                          "head-103",
                          "head-104",
                          "head-105",
                          "head-106",
                          "head-107",
                          "head-108",
                          "head-109",
                          "head-110",
                          "head-111",
                          "head-112",
                          "head-113",
                          "head-114",
                          "head-115",
                          "head-116",
                          "head-117",
                          "head-118",
                          "head-119",
                          "head-120",
                          "head-121",
                          "head-122",
                          "head-123",
                          "head-124",
                          "head-125",
                          "head-126",
                          "head-127",
                          "head-128",
                          "head-129",
                          "head-130",
                          "head-131",
                          "head-132",
                          "head-133",
                          "head-134",
                          "head-135",
                          "head-136",
                          "head-137",
                          "head-138",
                          "head-139",
                          "head-140",
                          "head-141",
                          "head-142",
                          "head-143",
                          "head-144",
                          "head-145",
                          "head-146",
                          "head-147",
                          "head-148",
                          "head-149",
                          "head-150",
                          "head-151",
                          "head-152",
                          "head-153",
                          "head-154",
                          "head-155",
                          "head-156",
                          "head-157",
                          "head-158",
                          "head-159",
                          "head-160",
                          "head-161",
                          "head-162",
                          "head-163",
                          "head-164",
                          "head-165",
                          "head-166",
                          "head-167",
                          "head-168",
                          "head-169",
                          "head-170",
                          "head-171",
                          "head-172",
                          "head-173",
                          "head-174",
                          "head-175",
                          "head-176",
                          "head-177",
                          "head-178",
                          "head-179",
                          "head-180",
                          "head-181",
                          "head-182",
                          "head-183"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "id",
                  "slug",
                  "sport_name",
                  "role",
                  "shirt_number",
                  "photo_url",
                  "avatar_head_id"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "is_minor_excluded": {
            "type": "boolean"
          },
          "timeline": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "season_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "season_label": {
                  "type": "string",
                  "minLength": 1
                },
                "team_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "team_name": {
                  "type": "string",
                  "minLength": 1
                },
                "tournament_ids": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "stat_line": {
                  "type": "object",
                  "properties": {
                    "goals": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "assists": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "yellow_cards": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "red_cards": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "appearances": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "mvp_awards": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "average_rating": {
                      "oneOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "rating_count": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "goals",
                    "assists",
                    "yellow_cards",
                    "red_cards",
                    "appearances",
                    "mvp_awards",
                    "average_rating",
                    "rating_count"
                  ]
                }
              },
              "required": [
                "season_id",
                "season_label",
                "team_id",
                "team_name",
                "tournament_ids",
                "stat_line"
              ]
            }
          },
          "discipline": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "current": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "tournament_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "team_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "accumulated_yellows": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "total_yellows": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "total_reds": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "diffida": {
                          "type": "boolean"
                        },
                        "served_suspensions": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "pending_suspension_matches": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "suspended_next_fixture": {
                          "type": "boolean"
                        },
                        "last_card_at": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "date-time"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "tournament_id",
                        "team_id",
                        "accumulated_yellows",
                        "total_yellows",
                        "total_reds",
                        "diffida",
                        "served_suspensions",
                        "pending_suspension_matches",
                        "suspended_next_fixture",
                        "last_card_at"
                      ]
                    }
                  },
                  "total_yellows": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "total_reds": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "served_suspensions": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "required": [
                  "current",
                  "total_yellows",
                  "total_reds",
                  "served_suspensions"
                ]
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "player",
          "is_minor_excluded",
          "timeline",
          "discipline"
        ]
      },
      "PublicTournamentSuspensions": {
        "type": "object",
        "properties": {
          "tournament_id": {
            "type": "string",
            "format": "uuid"
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "player": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "slug": {
                      "type": "string"
                    },
                    "sport_name": {
                      "type": "string"
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "GK",
                        "DEF",
                        "MID",
                        "FWD"
                      ]
                    },
                    "shirt_number": {
                      "oneOf": [
                        {
                          "type": "integer"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "photo_url": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uri"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "avatar_head_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "enum": [
                            "head-01",
                            "head-02",
                            "head-03",
                            "head-04",
                            "head-05",
                            "head-06",
                            "head-07",
                            "head-08",
                            "head-09",
                            "head-10",
                            "head-11",
                            "head-12",
                            "head-13",
                            "head-14",
                            "head-15",
                            "head-16",
                            "head-17",
                            "head-18",
                            "head-19",
                            "head-20",
                            "head-21",
                            "head-22",
                            "head-23",
                            "head-24",
                            "head-25",
                            "head-26",
                            "head-27",
                            "head-28",
                            "head-29",
                            "head-30",
                            "head-31",
                            "head-32",
                            "head-33",
                            "head-34",
                            "head-35",
                            "head-36",
                            "head-37",
                            "head-38",
                            "head-39",
                            "head-40",
                            "head-41",
                            "head-42",
                            "head-43",
                            "head-44",
                            "head-45",
                            "head-46",
                            "head-47",
                            "head-48",
                            "head-49",
                            "head-50",
                            "head-51",
                            "head-52",
                            "head-53",
                            "head-54",
                            "head-55",
                            "head-56",
                            "head-57",
                            "head-58",
                            "head-59",
                            "head-60",
                            "head-61",
                            "head-62",
                            "head-63",
                            "head-64",
                            "head-65",
                            "head-66",
                            "head-67",
                            "head-68",
                            "head-69",
                            "head-70",
                            "head-71",
                            "head-72",
                            "head-73",
                            "head-74",
                            "head-75",
                            "head-76",
                            "head-77",
                            "head-78",
                            "head-79",
                            "head-80",
                            "head-81",
                            "head-82",
                            "head-83",
                            "head-84",
                            "head-85",
                            "head-86",
                            "head-87",
                            "head-88",
                            "head-89",
                            "head-90",
                            "head-91",
                            "head-92",
                            "head-93",
                            "head-94",
                            "head-95",
                            "head-96",
                            "head-97",
                            "head-98",
                            "head-99",
                            "head-100",
                            "head-101",
                            "head-102",
                            "head-103",
                            "head-104",
                            "head-105",
                            "head-106",
                            "head-107",
                            "head-108",
                            "head-109",
                            "head-110",
                            "head-111",
                            "head-112",
                            "head-113",
                            "head-114",
                            "head-115",
                            "head-116",
                            "head-117",
                            "head-118",
                            "head-119",
                            "head-120",
                            "head-121",
                            "head-122",
                            "head-123",
                            "head-124",
                            "head-125",
                            "head-126",
                            "head-127",
                            "head-128",
                            "head-129",
                            "head-130",
                            "head-131",
                            "head-132",
                            "head-133",
                            "head-134",
                            "head-135",
                            "head-136",
                            "head-137",
                            "head-138",
                            "head-139",
                            "head-140",
                            "head-141",
                            "head-142",
                            "head-143",
                            "head-144",
                            "head-145",
                            "head-146",
                            "head-147",
                            "head-148",
                            "head-149",
                            "head-150",
                            "head-151",
                            "head-152",
                            "head-153",
                            "head-154",
                            "head-155",
                            "head-156",
                            "head-157",
                            "head-158",
                            "head-159",
                            "head-160",
                            "head-161",
                            "head-162",
                            "head-163",
                            "head-164",
                            "head-165",
                            "head-166",
                            "head-167",
                            "head-168",
                            "head-169",
                            "head-170",
                            "head-171",
                            "head-172",
                            "head-173",
                            "head-174",
                            "head-175",
                            "head-176",
                            "head-177",
                            "head-178",
                            "head-179",
                            "head-180",
                            "head-181",
                            "head-182",
                            "head-183"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "slug",
                    "sport_name",
                    "role",
                    "shirt_number",
                    "photo_url",
                    "avatar_head_id"
                  ]
                },
                "team_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "team_name": {
                  "oneOf": [
                    {
                      "type": "string",
                      "minLength": 1
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "discipline": {
                  "type": "object",
                  "properties": {
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "team_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "accumulated_yellows": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "total_yellows": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "total_reds": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "diffida": {
                      "type": "boolean"
                    },
                    "served_suspensions": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "pending_suspension_matches": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "suspended_next_fixture": {
                      "type": "boolean"
                    },
                    "last_card_at": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "tournament_id",
                    "team_id",
                    "accumulated_yellows",
                    "total_yellows",
                    "total_reds",
                    "diffida",
                    "served_suspensions",
                    "pending_suspension_matches",
                    "suspended_next_fixture",
                    "last_card_at"
                  ]
                }
              },
              "required": [
                "player",
                "team_id",
                "team_name",
                "discipline"
              ]
            }
          },
          "withheld_for_protection": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "tournament_id",
          "items",
          "withheld_for_protection"
        ]
      },
      "AvatarCatalog": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1
                },
                "label": {
                  "type": "string",
                  "minLength": 1
                },
                "asset_key": {
                  "type": "string",
                  "minLength": 1
                },
                "sort_order": {
                  "type": "integer",
                  "minimum": 0
                },
                "active": {
                  "type": "boolean"
                }
              },
              "required": [
                "id",
                "label",
                "asset_key",
                "sort_order",
                "active"
              ]
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "UserPreferences": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "user_id": {
            "type": "string",
            "format": "uuid"
          },
          "favorite_tournament_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "favorite_organization_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "avatar_id": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "updated_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "tenant_id",
          "user_id",
          "favorite_tournament_id",
          "favorite_organization_id",
          "avatar_id",
          "created_at",
          "updated_at",
          "created_by",
          "updated_by"
        ]
      },
      "UserPreferencesUpsert": {
        "type": "object",
        "properties": {
          "favorite_tournament_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "favorite_organization_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "avatar_id": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "favorite_tournament_id",
          "favorite_organization_id",
          "avatar_id"
        ]
      },
      "AdminBracketGenerateRequest": {
        "type": "object",
        "properties": {
          "config": {
            "type": "object",
            "properties": {
              "seeding_source": {
                "type": "string",
                "enum": [
                  "standings_top_n",
                  "manual",
                  "draw"
                ]
              },
              "qualified_count": {
                "type": "integer",
                "minimum": 2,
                "maximum": 64
              },
              "linked_source_tournament_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "round_defaults": {
                "type": "object",
                "properties": {
                  "legs": {
                    "oneOf": [
                      {
                        "type": "number",
                        "enum": [
                          1
                        ]
                      },
                      {
                        "type": "number",
                        "enum": [
                          2
                        ]
                      }
                    ]
                  },
                  "away_goals_rule": {
                    "type": "boolean"
                  },
                  "extra_time": {
                    "type": "boolean"
                  },
                  "penalties": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "legs",
                  "extra_time",
                  "penalties"
                ]
              }
            },
            "required": [
              "seeding_source",
              "round_defaults"
            ]
          },
          "participant_team_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "minItems": 2,
            "maxItems": 64
          },
          "manual_seed_order": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "minItems": 2,
            "maxItems": 64
          }
        },
        "required": [
          "config"
        ]
      },
      "AdminBracketTieOverride": {
        "type": "object",
        "properties": {
          "tie_id": {
            "type": "string",
            "format": "uuid"
          },
          "order_index": {
            "type": "integer",
            "minimum": 0
          },
          "home_slot": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "team"
                    ]
                  },
                  "team_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "kind",
                  "team_id"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "winner_of_tie"
                    ]
                  },
                  "tie_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "kind",
                  "tie_id"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "bye"
                    ]
                  }
                },
                "required": [
                  "kind"
                ]
              }
            ]
          },
          "away_slot": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "team"
                    ]
                  },
                  "team_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "kind",
                  "team_id"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "winner_of_tie"
                    ]
                  },
                  "tie_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "kind",
                  "tie_id"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "bye"
                    ]
                  }
                },
                "required": [
                  "kind"
                ]
              }
            ]
          },
          "bye": {
            "type": "boolean"
          }
        },
        "required": [
          "tie_id",
          "order_index",
          "home_slot",
          "away_slot",
          "bye"
        ]
      },
      "AdminBracketRoundUpdateRequest": {
        "type": "object",
        "properties": {
          "config": {
            "type": "object",
            "properties": {
              "legs": {
                "oneOf": [
                  {
                    "type": "number",
                    "enum": [
                      1
                    ]
                  },
                  {
                    "type": "number",
                    "enum": [
                      2
                    ]
                  }
                ]
              },
              "away_goals_rule": {
                "type": "boolean"
              },
              "extra_time": {
                "type": "boolean"
              },
              "penalties": {
                "type": "boolean"
              }
            },
            "required": [
              "legs",
              "extra_time",
              "penalties"
            ]
          },
          "ties": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "tie_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "order_index": {
                  "type": "integer",
                  "minimum": 0
                },
                "home_slot": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "enum": [
                            "team"
                          ]
                        },
                        "team_id": {
                          "type": "string",
                          "format": "uuid"
                        }
                      },
                      "required": [
                        "kind",
                        "team_id"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "enum": [
                            "winner_of_tie"
                          ]
                        },
                        "tie_id": {
                          "type": "string",
                          "format": "uuid"
                        }
                      },
                      "required": [
                        "kind",
                        "tie_id"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "enum": [
                            "bye"
                          ]
                        }
                      },
                      "required": [
                        "kind"
                      ]
                    }
                  ]
                },
                "away_slot": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "enum": [
                            "team"
                          ]
                        },
                        "team_id": {
                          "type": "string",
                          "format": "uuid"
                        }
                      },
                      "required": [
                        "kind",
                        "team_id"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "enum": [
                            "winner_of_tie"
                          ]
                        },
                        "tie_id": {
                          "type": "string",
                          "format": "uuid"
                        }
                      },
                      "required": [
                        "kind",
                        "tie_id"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "enum": [
                            "bye"
                          ]
                        }
                      },
                      "required": [
                        "kind"
                      ]
                    }
                  ]
                },
                "bye": {
                  "type": "boolean"
                }
              },
              "required": [
                "tie_id",
                "order_index",
                "home_slot",
                "away_slot",
                "bye"
              ]
            },
            "minItems": 1
          }
        },
        "required": [
          "config",
          "ties"
        ]
      },
      "AdminBracketTieMatchesLinkRequest": {
        "type": "object",
        "properties": {
          "match_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "minItems": 1,
            "maxItems": 2
          }
        },
        "required": [
          "match_ids"
        ]
      },
      "ApiKeyRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "prefix": {
            "type": "string",
            "minLength": 4,
            "maxLength": 16
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "read:public.standings",
                "read:public.matches",
                "read:public.teams",
                "read:public.players",
                "read:public.media",
                "read:public.legal",
                "read:public.theme",
                "read:public.fantasy",
                "write:public.support",
                "read:tenant.fantasy",
                "read:tenant.audit",
                "write:tenant.matches",
                "write:tenant.lineups",
                "write:tenant.media",
                "admin:tenant.privacy",
                "admin:tenant.white_label",
                "admin:tenant.api_keys"
              ]
            },
            "minItems": 1
          },
          "rate_limit_tier": {
            "type": "string",
            "enum": [
              "public_widget",
              "partner",
              "internal"
            ]
          },
          "entitled_modules": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "rotated",
              "revoked"
            ]
          },
          "issued_at": {
            "type": "string",
            "format": "date-time"
          },
          "last_used_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "expires_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "rotated_from_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "revoked_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "revoked_reason": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "tenant_id",
          "label",
          "prefix",
          "scopes",
          "rate_limit_tier",
          "entitled_modules",
          "status",
          "issued_at",
          "last_used_at",
          "expires_at",
          "rotated_from_id",
          "revoked_at",
          "revoked_reason"
        ]
      },
      "ApiKeyCreateRequest": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "read:public.standings",
                "read:public.matches",
                "read:public.teams",
                "read:public.players",
                "read:public.media",
                "read:public.legal",
                "read:public.theme",
                "read:public.fantasy",
                "write:public.support",
                "read:tenant.fantasy",
                "read:tenant.audit",
                "write:tenant.matches",
                "write:tenant.lineups",
                "write:tenant.media",
                "admin:tenant.privacy",
                "admin:tenant.white_label",
                "admin:tenant.api_keys"
              ]
            },
            "minItems": 1
          },
          "rate_limit_tier": {
            "type": "string",
            "enum": [
              "public_widget",
              "partner",
              "internal"
            ]
          },
          "entitled_modules": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "sport_core",
                "live_reporting",
                "fantasy",
                "media_feed",
                "sponsor_inventory",
                "api_widgets",
                "white_label",
                "certification"
              ]
            }
          },
          "expires_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "label",
          "scopes",
          "rate_limit_tier",
          "entitled_modules",
          "expires_at"
        ]
      },
      "ApiKeyCreateResponse": {
        "type": "object",
        "properties": {
          "key": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "tenant_id": {
                "type": "string",
                "format": "uuid"
              },
              "label": {
                "type": "string",
                "minLength": 1,
                "maxLength": 120
              },
              "prefix": {
                "type": "string",
                "minLength": 4,
                "maxLength": 16
              },
              "scopes": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "read:public.standings",
                    "read:public.matches",
                    "read:public.teams",
                    "read:public.players",
                    "read:public.media",
                    "read:public.legal",
                    "read:public.theme",
                    "read:public.fantasy",
                    "write:public.support",
                    "read:tenant.fantasy",
                    "read:tenant.audit",
                    "write:tenant.matches",
                    "write:tenant.lineups",
                    "write:tenant.media",
                    "admin:tenant.privacy",
                    "admin:tenant.white_label",
                    "admin:tenant.api_keys"
                  ]
                },
                "minItems": 1
              },
              "rate_limit_tier": {
                "type": "string",
                "enum": [
                  "public_widget",
                  "partner",
                  "internal"
                ]
              },
              "entitled_modules": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "status": {
                "type": "string",
                "enum": [
                  "active",
                  "rotated",
                  "revoked"
                ]
              },
              "issued_at": {
                "type": "string",
                "format": "date-time"
              },
              "last_used_at": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "expires_at": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "rotated_from_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "revoked_at": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "revoked_reason": {
                "oneOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "id",
              "tenant_id",
              "label",
              "prefix",
              "scopes",
              "rate_limit_tier",
              "entitled_modules",
              "status",
              "issued_at",
              "last_used_at",
              "expires_at",
              "rotated_from_id",
              "revoked_at",
              "revoked_reason"
            ]
          },
          "plaintext": {
            "type": "string",
            "minLength": 32
          }
        },
        "required": [
          "key",
          "plaintext"
        ]
      },
      "ApiKeyRotateResponse": {
        "type": "object",
        "properties": {
          "key": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "tenant_id": {
                "type": "string",
                "format": "uuid"
              },
              "label": {
                "type": "string",
                "minLength": 1,
                "maxLength": 120
              },
              "prefix": {
                "type": "string",
                "minLength": 4,
                "maxLength": 16
              },
              "scopes": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "read:public.standings",
                    "read:public.matches",
                    "read:public.teams",
                    "read:public.players",
                    "read:public.media",
                    "read:public.legal",
                    "read:public.theme",
                    "read:public.fantasy",
                    "write:public.support",
                    "read:tenant.fantasy",
                    "read:tenant.audit",
                    "write:tenant.matches",
                    "write:tenant.lineups",
                    "write:tenant.media",
                    "admin:tenant.privacy",
                    "admin:tenant.white_label",
                    "admin:tenant.api_keys"
                  ]
                },
                "minItems": 1
              },
              "rate_limit_tier": {
                "type": "string",
                "enum": [
                  "public_widget",
                  "partner",
                  "internal"
                ]
              },
              "entitled_modules": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "status": {
                "type": "string",
                "enum": [
                  "active",
                  "rotated",
                  "revoked"
                ]
              },
              "issued_at": {
                "type": "string",
                "format": "date-time"
              },
              "last_used_at": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "expires_at": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "rotated_from_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "revoked_at": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "revoked_reason": {
                "oneOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "id",
              "tenant_id",
              "label",
              "prefix",
              "scopes",
              "rate_limit_tier",
              "entitled_modules",
              "status",
              "issued_at",
              "last_used_at",
              "expires_at",
              "rotated_from_id",
              "revoked_at",
              "revoked_reason"
            ]
          },
          "plaintext": {
            "type": "string",
            "minLength": 32
          }
        },
        "required": [
          "key",
          "plaintext"
        ]
      },
      "ApiKeyRevokeRequest": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "reason"
        ]
      },
      "ApiKeyListResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "tenant_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "label": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120
                },
                "prefix": {
                  "type": "string",
                  "minLength": 4,
                  "maxLength": 16
                },
                "scopes": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "read:public.standings",
                      "read:public.matches",
                      "read:public.teams",
                      "read:public.players",
                      "read:public.media",
                      "read:public.legal",
                      "read:public.theme",
                      "read:public.fantasy",
                      "write:public.support",
                      "read:tenant.fantasy",
                      "read:tenant.audit",
                      "write:tenant.matches",
                      "write:tenant.lineups",
                      "write:tenant.media",
                      "admin:tenant.privacy",
                      "admin:tenant.white_label",
                      "admin:tenant.api_keys"
                    ]
                  },
                  "minItems": 1
                },
                "rate_limit_tier": {
                  "type": "string",
                  "enum": [
                    "public_widget",
                    "partner",
                    "internal"
                  ]
                },
                "entitled_modules": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "active",
                    "rotated",
                    "revoked"
                  ]
                },
                "issued_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "last_used_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "expires_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "rotated_from_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "revoked_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "revoked_reason": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "tenant_id",
                "label",
                "prefix",
                "scopes",
                "rate_limit_tier",
                "entitled_modules",
                "status",
                "issued_at",
                "last_used_at",
                "expires_at",
                "rotated_from_id",
                "revoked_at",
                "revoked_reason"
              ]
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "WidgetConfigRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "api_key_id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "type": "string",
            "enum": [
              "standings",
              "next_matches",
              "last_results",
              "top_scorers",
              "live_ticker",
              "team_card",
              "fantasy_leaderboard"
            ]
          },
          "params": {
            "type": "object",
            "additionalProperties": true
          },
          "allowed_origins": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uri"
            },
            "minItems": 1
          },
          "is_active": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "updated_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "tenant_id",
          "api_key_id",
          "kind",
          "params",
          "allowed_origins",
          "is_active",
          "created_at",
          "updated_at",
          "created_by",
          "updated_by"
        ]
      },
      "WidgetConfigUpsert": {
        "type": "object",
        "properties": {
          "id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "api_key_id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "type": "string",
            "enum": [
              "standings",
              "next_matches",
              "last_results",
              "top_scorers",
              "live_ticker",
              "team_card",
              "fantasy_leaderboard"
            ]
          },
          "params": {
            "type": "object",
            "additionalProperties": true
          },
          "allowed_origins": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uri"
            },
            "minItems": 1
          },
          "is_active": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "api_key_id",
          "kind",
          "params",
          "allowed_origins",
          "is_active"
        ]
      },
      "WidgetConfigList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "tenant_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "api_key_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "standings",
                    "next_matches",
                    "last_results",
                    "top_scorers",
                    "live_ticker",
                    "team_card",
                    "fantasy_leaderboard"
                  ]
                },
                "params": {
                  "type": "object",
                  "additionalProperties": true
                },
                "allowed_origins": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uri"
                  },
                  "minItems": 1
                },
                "is_active": {
                  "type": "boolean"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "created_by": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "updated_by": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "tenant_id",
                "api_key_id",
                "kind",
                "params",
                "allowed_origins",
                "is_active",
                "created_at",
                "updated_at",
                "created_by",
                "updated_by"
              ]
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "WidgetPayloadResponse": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "standings",
              "next_matches",
              "last_results",
              "top_scorers",
              "live_ticker",
              "team_card",
              "fantasy_leaderboard"
            ]
          },
          "subject_id": {
            "type": "string"
          },
          "payload": {
            "type": "object",
            "additionalProperties": true
          },
          "embed_allowed_origins": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uri"
            }
          },
          "sponsor": {
            "type": "object",
            "properties": {
              "campaign_id": {
                "type": "string",
                "format": "uuid"
              },
              "sponsor_name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              "title": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              "creative_url": {
                "type": "string",
                "format": "uri",
                "pattern": "^https?:\\/\\/"
              },
              "slot": {
                "type": "string",
                "enum": [
                  "feed_card",
                  "standings_banner",
                  "live_overlay",
                  "mvp_card",
                  "top8_card"
                ]
              },
              "advertiser_name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              "paid_for_by": {
                "oneOf": [
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "content_category": {
                "type": "string",
                "enum": [
                  "general",
                  "food_beverage",
                  "sport_equipment",
                  "local_services",
                  "gambling",
                  "alcohol",
                  "betting",
                  "other"
                ]
              },
              "click_token": {
                "type": "string",
                "minLength": 16,
                "maxLength": 512
              }
            },
            "required": [
              "campaign_id",
              "sponsor_name",
              "title",
              "creative_url",
              "slot",
              "advertiser_name",
              "paid_for_by",
              "content_category",
              "click_token"
            ]
          }
        },
        "required": [
          "kind",
          "subject_id",
          "payload",
          "embed_allowed_origins"
        ]
      },
      "PublicFantasyLeagueDirectory": {
        "type": "object",
        "properties": {
          "seasons": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "slug": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "slug",
                "label"
              ]
            }
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "tournament_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "season_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "season": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "slug": {
                      "type": "string"
                    },
                    "label": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "slug",
                    "label"
                  ]
                },
                "tournament_name": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "format": {
                  "type": "string",
                  "enum": [
                    "total_points",
                    "head_to_head"
                  ]
                },
                "starts_on": {
                  "type": "string"
                },
                "ends_on": {
                  "type": "string"
                },
                "team_count": {
                  "type": "integer",
                  "minimum": 0
                },
                "standings_state": {
                  "type": "string",
                  "enum": [
                    "final",
                    "unavailable"
                  ]
                },
                "archived": {
                  "type": "boolean"
                }
              },
              "required": [
                "id",
                "tournament_id",
                "season_id",
                "season",
                "tournament_name",
                "name",
                "format",
                "starts_on",
                "ends_on",
                "team_count",
                "standings_state"
              ]
            }
          },
          "next_cursor": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 400
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "seasons",
          "items",
          "next_cursor"
        ]
      },
      "PublicFantasyLeagueDetail": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "league": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "tournament_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "season_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "season": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "slug": {
                        "type": "string"
                      },
                      "label": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "slug",
                      "label"
                    ]
                  },
                  "tournament_name": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "format": {
                    "type": "string",
                    "enum": [
                      "total_points",
                      "head_to_head"
                    ]
                  },
                  "starts_on": {
                    "type": "string"
                  },
                  "ends_on": {
                    "type": "string"
                  },
                  "team_count": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "standings_state": {
                    "type": "string",
                    "enum": [
                      "final",
                      "unavailable"
                    ]
                  },
                  "archived": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "id",
                  "tournament_id",
                  "season_id",
                  "season",
                  "tournament_name",
                  "name",
                  "format",
                  "starts_on",
                  "ends_on",
                  "team_count",
                  "standings_state"
                ]
              },
              "standings_state": {
                "type": "string",
                "enum": [
                  "final",
                  "unavailable"
                ]
              },
              "authority": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "league_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "round_ids": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "format": "uuid"
                        }
                      },
                      "ruleset_versions": {
                        "type": "array",
                        "items": {
                          "type": "integer",
                          "exclusiveMinimum": 0
                        }
                      },
                      "projection_revision_ids": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "format": "uuid"
                        }
                      },
                      "finality": {
                        "type": "string",
                        "enum": [
                          "empty",
                          "provisional",
                          "official",
                          "corrected",
                          "superseded",
                          "stale"
                        ]
                      }
                    },
                    "required": [
                      "league_id",
                      "round_ids",
                      "ruleset_versions",
                      "projection_revision_ids",
                      "finality"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "teams": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "fantasy_team_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "fantasy_team_id",
                    "name"
                  ]
                }
              },
              "teams_next_cursor": {
                "oneOf": [
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 400
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "next_cursor": {
                "oneOf": [
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 400
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "format": {
                "type": "string",
                "enum": [
                  "total_points"
                ]
              },
              "rows": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "fantasy_team_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "display_name": {
                      "type": "string"
                    },
                    "total_points": {
                      "type": "number"
                    },
                    "position": {
                      "type": "integer",
                      "exclusiveMinimum": 0
                    }
                  },
                  "required": [
                    "fantasy_team_id",
                    "display_name",
                    "total_points",
                    "position"
                  ]
                }
              }
            },
            "required": [
              "league",
              "standings_state",
              "authority",
              "teams",
              "teams_next_cursor",
              "next_cursor",
              "format",
              "rows"
            ]
          },
          {
            "type": "object",
            "properties": {
              "league": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "tournament_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "season_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "season": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "slug": {
                        "type": "string"
                      },
                      "label": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "slug",
                      "label"
                    ]
                  },
                  "tournament_name": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "format": {
                    "type": "string",
                    "enum": [
                      "total_points",
                      "head_to_head"
                    ]
                  },
                  "starts_on": {
                    "type": "string"
                  },
                  "ends_on": {
                    "type": "string"
                  },
                  "team_count": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "standings_state": {
                    "type": "string",
                    "enum": [
                      "final",
                      "unavailable"
                    ]
                  },
                  "archived": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "id",
                  "tournament_id",
                  "season_id",
                  "season",
                  "tournament_name",
                  "name",
                  "format",
                  "starts_on",
                  "ends_on",
                  "team_count",
                  "standings_state"
                ]
              },
              "standings_state": {
                "type": "string",
                "enum": [
                  "final",
                  "unavailable"
                ]
              },
              "authority": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "league_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "round_ids": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "format": "uuid"
                        }
                      },
                      "ruleset_versions": {
                        "type": "array",
                        "items": {
                          "type": "integer",
                          "exclusiveMinimum": 0
                        }
                      },
                      "projection_revision_ids": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "format": "uuid"
                        }
                      },
                      "finality": {
                        "type": "string",
                        "enum": [
                          "empty",
                          "provisional",
                          "official",
                          "corrected",
                          "superseded",
                          "stale"
                        ]
                      }
                    },
                    "required": [
                      "league_id",
                      "round_ids",
                      "ruleset_versions",
                      "projection_revision_ids",
                      "finality"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "teams": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "fantasy_team_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "fantasy_team_id",
                    "name"
                  ]
                }
              },
              "teams_next_cursor": {
                "oneOf": [
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 400
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "next_cursor": {
                "oneOf": [
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 400
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "format": {
                "type": "string",
                "enum": [
                  "head_to_head"
                ]
              },
              "rows": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "fantasy_team_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "display_name": {
                      "type": "string"
                    },
                    "position": {
                      "type": "integer",
                      "exclusiveMinimum": 0
                    },
                    "played": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "wins": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "draws": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "losses": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "goals_for": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "goals_against": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "goal_difference": {
                      "type": "integer"
                    },
                    "points": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "fantasy_team_id",
                    "display_name",
                    "position",
                    "played",
                    "wins",
                    "draws",
                    "losses",
                    "goals_for",
                    "goals_against",
                    "goal_difference",
                    "points"
                  ]
                }
              }
            },
            "required": [
              "league",
              "standings_state",
              "authority",
              "teams",
              "teams_next_cursor",
              "next_cursor",
              "format",
              "rows"
            ]
          }
        ]
      },
      "WhiteLabelBaseRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "organization_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "brand_name": {
            "type": "string",
            "minLength": 1
          },
          "primary_color": {
            "type": "string",
            "pattern": "^#[0-9a-fA-F]{6}$"
          },
          "logo_url": {
            "oneOf": [
              {
                "type": "string",
                "format": "uri"
              },
              {
                "type": "null"
              }
            ]
          },
          "favicon_url": {
            "oneOf": [
              {
                "type": "string",
                "format": "uri"
              },
              {
                "type": "null"
              }
            ]
          },
          "custom_domain": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "legal_footer": {
            "type": "string"
          },
          "home_featured_match_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "home_live_badge_enabled": {
            "type": "boolean"
          },
          "home_spotlight_mode": {
            "type": "string",
            "enum": [
              "auto",
              "pinned",
              "hidden"
            ]
          },
          "home_spotlight_message": {
            "oneOf": [
              {
                "type": "string",
                "maxLength": 120
              },
              {
                "type": "null"
              }
            ]
          },
          "communication_ack_due_hours": {
            "oneOf": [
              {
                "type": "integer",
                "minimum": 1,
                "maximum": 720
              },
              {
                "type": "null"
              }
            ]
          },
          "version": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "etag": {
            "type": "string",
            "minLength": 1
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "updated_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "tenant_id",
          "organization_id",
          "brand_name",
          "primary_color",
          "logo_url",
          "favicon_url",
          "custom_domain",
          "legal_footer",
          "created_at",
          "updated_at",
          "created_by",
          "updated_by"
        ]
      },
      "WhiteLabelBaseUpsert": {
        "type": "object",
        "properties": {
          "brand_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "primary_color": {
            "type": "string",
            "pattern": "^#[0-9A-Fa-f]{6}$"
          },
          "logo_url": {
            "type": "string",
            "format": "uri"
          },
          "favicon_url": {
            "type": "string",
            "format": "uri"
          },
          "custom_domain": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ]
          },
          "legal_footer": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1000
          },
          "home_featured_match_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "home_live_badge_enabled": {
            "type": "boolean"
          },
          "home_spotlight_mode": {
            "type": "string",
            "enum": [
              "auto",
              "pinned",
              "hidden"
            ]
          },
          "home_spotlight_message": {
            "oneOf": [
              {
                "type": "string",
                "maxLength": 120
              },
              {
                "type": "null"
              }
            ]
          },
          "communication_ack_due_hours": {
            "oneOf": [
              {
                "type": "integer",
                "minimum": 1,
                "maximum": 720
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "brand_name",
          "primary_color",
          "logo_url",
          "favicon_url",
          "custom_domain",
          "legal_footer"
        ]
      },
      "WhiteLabelBaseResponse": {
        "type": "object",
        "properties": {
          "item": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "tenant_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "organization_id": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "brand_name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "primary_color": {
                    "type": "string",
                    "pattern": "^#[0-9a-fA-F]{6}$"
                  },
                  "logo_url": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uri"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "favicon_url": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uri"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "custom_domain": {
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "legal_footer": {
                    "type": "string"
                  },
                  "home_featured_match_id": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "home_live_badge_enabled": {
                    "type": "boolean"
                  },
                  "home_spotlight_mode": {
                    "type": "string",
                    "enum": [
                      "auto",
                      "pinned",
                      "hidden"
                    ]
                  },
                  "home_spotlight_message": {
                    "oneOf": [
                      {
                        "type": "string",
                        "maxLength": 120
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "communication_ack_due_hours": {
                    "oneOf": [
                      {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 720
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "version": {
                    "type": "integer",
                    "exclusiveMinimum": 0
                  },
                  "etag": {
                    "type": "string",
                    "minLength": 1
                  },
                  "created_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "updated_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "created_by": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "updated_by": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "id",
                  "tenant_id",
                  "organization_id",
                  "brand_name",
                  "primary_color",
                  "logo_url",
                  "favicon_url",
                  "custom_domain",
                  "legal_footer",
                  "created_at",
                  "updated_at",
                  "created_by",
                  "updated_by"
                ]
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "item"
        ]
      },
      "HomeSpotlightUpsertRequest": {
        "type": "object",
        "properties": {
          "organization_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "mode": {
            "type": "string",
            "enum": [
              "auto",
              "pinned",
              "hidden"
            ]
          },
          "pinned_match_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "message": {
            "oneOf": [
              {
                "type": "string",
                "maxLength": 120
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "mode"
        ],
        "additionalProperties": false
      },
      "HomeSpotlightAdminResponse": {
        "type": "object",
        "properties": {
          "scope": {
            "type": "object",
            "properties": {
              "organization_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "city_name": {
                "oneOf": [
                  {
                    "type": "string",
                    "minLength": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "organization_id",
              "city_name"
            ]
          },
          "cities": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "organization_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "city_slug": {
                  "type": "string",
                  "minLength": 1
                },
                "city_name": {
                  "type": "string",
                  "minLength": 1
                },
                "city_status": {
                  "type": "string",
                  "enum": [
                    "live",
                    "coming_soon"
                  ]
                },
                "canonical_path": {
                  "type": "string"
                }
              },
              "required": [
                "organization_id",
                "city_slug",
                "city_name",
                "city_status",
                "canonical_path"
              ]
            }
          },
          "config": {
            "type": "object",
            "properties": {
              "organization_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "mode": {
                "type": "string",
                "enum": [
                  "auto",
                  "pinned",
                  "hidden"
                ]
              },
              "pinned_match_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "message": {
                "oneOf": [
                  {
                    "type": "string",
                    "minLength": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "live_badge_enabled": {
                "type": "boolean"
              },
              "source": {
                "type": "object",
                "properties": {
                  "mode": {
                    "type": "string",
                    "enum": [
                      "organization",
                      "tenant",
                      "default"
                    ]
                  },
                  "pinned_match_id": {
                    "type": "string",
                    "enum": [
                      "organization",
                      "tenant",
                      "default"
                    ]
                  },
                  "message": {
                    "type": "string",
                    "enum": [
                      "organization",
                      "tenant",
                      "default"
                    ]
                  },
                  "live_badge_enabled": {
                    "type": "string",
                    "enum": [
                      "organization",
                      "tenant",
                      "default"
                    ]
                  }
                },
                "required": [
                  "mode",
                  "pinned_match_id",
                  "message",
                  "live_badge_enabled"
                ]
              },
              "inherits_tenant_row": {
                "type": "boolean"
              },
              "updated_at": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "updated_by": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "organization_id",
              "mode",
              "pinned_match_id",
              "message",
              "live_badge_enabled",
              "source",
              "inherits_tenant_row",
              "updated_at",
              "updated_by"
            ]
          },
          "tenant_default": {
            "type": "object",
            "properties": {
              "mode": {
                "type": "string",
                "enum": [
                  "auto",
                  "pinned",
                  "hidden"
                ]
              },
              "pinned_match_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "message": {
                "oneOf": [
                  {
                    "type": "string",
                    "minLength": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "mode",
              "pinned_match_id",
              "message"
            ]
          },
          "candidates": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "state": {
                  "type": "string",
                  "minLength": 1
                },
                "scheduled_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "home_team": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "label": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "id",
                    "label"
                  ]
                },
                "away_team": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "label": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "id",
                    "label"
                  ]
                },
                "score": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "home": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "away": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "home",
                        "away"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "competition_label": {
                  "type": "string",
                  "minLength": 1
                },
                "organization_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "city_name": {
                  "type": "string",
                  "minLength": 1
                },
                "live_started_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "state",
                "scheduled_at",
                "home_team",
                "away_team",
                "score",
                "competition_label",
                "organization_id",
                "city_name",
                "live_started_at"
              ]
            }
          },
          "previews": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "organization_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "city_name": {
                  "type": "string",
                  "minLength": 1
                },
                "city_slug": {
                  "type": "string",
                  "minLength": 1
                },
                "city_status": {
                  "type": "string",
                  "enum": [
                    "live",
                    "coming_soon"
                  ]
                },
                "resolved_by": {
                  "type": "string",
                  "enum": [
                    "pinned",
                    "auto_live",
                    "auto_next",
                    "auto_last",
                    "hidden",
                    "no_match"
                  ]
                },
                "refresh_hint": {
                  "type": "string",
                  "enum": [
                    "live",
                    "imminent",
                    "idle"
                  ]
                },
                "pin_out_of_scope": {
                  "type": "boolean"
                },
                "pin_reason": {
                  "oneOf": [
                    {
                      "type": "string",
                      "enum": [
                        "out_of_scope",
                        "cancelled"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "message": {
                  "oneOf": [
                    {
                      "type": "string",
                      "minLength": 1
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "match": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "state": {
                          "type": "string",
                          "minLength": 1
                        },
                        "scheduled_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "home_team": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "label": {
                              "type": "string",
                              "minLength": 1
                            }
                          },
                          "required": [
                            "id",
                            "label"
                          ]
                        },
                        "away_team": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "label": {
                              "type": "string",
                              "minLength": 1
                            }
                          },
                          "required": [
                            "id",
                            "label"
                          ]
                        },
                        "score": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "home": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "away": {
                                  "type": "integer",
                                  "minimum": 0
                                }
                              },
                              "required": [
                                "home",
                                "away"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "competition_label": {
                          "type": "string",
                          "minLength": 1
                        }
                      },
                      "required": [
                        "id",
                        "state",
                        "scheduled_at",
                        "home_team",
                        "away_team",
                        "score",
                        "competition_label"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "organization_id",
                "city_name",
                "city_slug",
                "city_status",
                "resolved_by",
                "refresh_hint",
                "pin_out_of_scope",
                "pin_reason",
                "message",
                "match"
              ]
            }
          },
          "refresh_hint_now": {
            "type": "string",
            "enum": [
              "live",
              "imminent",
              "idle"
            ]
          }
        },
        "required": [
          "scope",
          "cities",
          "config",
          "tenant_default",
          "candidates",
          "previews",
          "refresh_hint_now"
        ]
      },
      "WhiteLabelAtomicUpsert": {
        "type": "object",
        "properties": {
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "organization_id": {
            "type": "string",
            "format": "uuid"
          },
          "expected_etag": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "idempotency_key": {
            "type": "string",
            "minLength": 8,
            "maxLength": 200
          },
          "base": {
            "type": "object",
            "properties": {
              "brand_name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              "primary_color": {
                "type": "string",
                "pattern": "^#[0-9A-Fa-f]{6}$"
              },
              "logo_url": {
                "type": "string",
                "format": "uri"
              },
              "favicon_url": {
                "type": "string",
                "format": "uri"
              },
              "custom_domain": {
                "oneOf": [
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "legal_footer": {
                "type": "string",
                "minLength": 1,
                "maxLength": 1000
              },
              "home_featured_match_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "home_live_badge_enabled": {
                "type": "boolean"
              },
              "home_spotlight_mode": {
                "type": "string",
                "enum": [
                  "auto",
                  "pinned",
                  "hidden"
                ]
              },
              "home_spotlight_message": {
                "oneOf": [
                  {
                    "type": "string",
                    "maxLength": 120
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "communication_ack_due_hours": {
                "oneOf": [
                  {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 720
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "brand_name",
              "primary_color",
              "logo_url",
              "favicon_url",
              "custom_domain",
              "legal_footer"
            ]
          },
          "extras": {
            "type": "object",
            "properties": {
              "public_subdomain": {
                "type": "string",
                "minLength": 1,
                "maxLength": 63
              },
              "secondary_color": {
                "type": "string",
                "pattern": "^#[0-9A-Fa-f]{6}$"
              },
              "active_modules": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "data_visibility": {
                "type": "string",
                "enum": [
                  "public",
                  "members_only",
                  "mixed"
                ]
              },
              "default_language": {
                "type": "string",
                "minLength": 2,
                "maxLength": 8
              },
              "terms_url": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uri"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "privacy_url": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uri"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "public_subdomain",
              "secondary_color",
              "active_modules",
              "data_visibility",
              "default_language",
              "terms_url",
              "privacy_url"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "tenant_id",
          "organization_id",
          "expected_etag",
          "idempotency_key",
          "base",
          "extras"
        ],
        "additionalProperties": false
      },
      "WhiteLabelAtomicResponse": {
        "type": "object",
        "properties": {
          "object_id": {
            "type": "string",
            "format": "uuid"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "organization_id": {
            "type": "string",
            "format": "uuid"
          },
          "version": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "etag": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "object_id",
          "tenant_id",
          "organization_id",
          "version",
          "etag"
        ]
      },
      "WhiteLabelAtomicAggregateResponse": {
        "type": "object",
        "properties": {
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "organization_id": {
            "type": "string",
            "format": "uuid"
          },
          "base": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "tenant_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "organization_id": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "brand_name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "primary_color": {
                    "type": "string",
                    "pattern": "^#[0-9a-fA-F]{6}$"
                  },
                  "logo_url": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uri"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "favicon_url": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uri"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "custom_domain": {
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "legal_footer": {
                    "type": "string"
                  },
                  "home_featured_match_id": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "home_live_badge_enabled": {
                    "type": "boolean"
                  },
                  "home_spotlight_mode": {
                    "type": "string",
                    "enum": [
                      "auto",
                      "pinned",
                      "hidden"
                    ]
                  },
                  "home_spotlight_message": {
                    "oneOf": [
                      {
                        "type": "string",
                        "maxLength": 120
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "communication_ack_due_hours": {
                    "oneOf": [
                      {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 720
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "version": {
                    "type": "integer",
                    "exclusiveMinimum": 0
                  },
                  "etag": {
                    "type": "string",
                    "minLength": 1
                  },
                  "created_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "updated_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "created_by": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "updated_by": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "id",
                  "tenant_id",
                  "organization_id",
                  "brand_name",
                  "primary_color",
                  "logo_url",
                  "favicon_url",
                  "custom_domain",
                  "legal_footer",
                  "created_at",
                  "updated_at",
                  "created_by",
                  "updated_by"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "extras": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "tenant_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "organization_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "public_subdomain": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 63
                  },
                  "secondary_color": {
                    "type": "string",
                    "pattern": "^#[0-9A-Fa-f]{6}$"
                  },
                  "active_modules": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "sponsor_slots": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "position": {
                          "type": "string"
                        },
                        "sponsor_name": {
                          "type": "string",
                          "minLength": 1
                        },
                        "logo_url": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uri"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "position",
                        "sponsor_name",
                        "logo_url"
                      ]
                    }
                  },
                  "data_visibility": {
                    "type": "string",
                    "enum": [
                      "public",
                      "members_only",
                      "mixed"
                    ]
                  },
                  "default_language": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 8
                  },
                  "terms_url": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uri"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "privacy_url": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uri"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "version": {
                    "type": "integer",
                    "exclusiveMinimum": 0
                  },
                  "etag": {
                    "type": "string",
                    "minLength": 1
                  },
                  "created_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "updated_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "created_by": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "updated_by": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "id",
                  "tenant_id",
                  "organization_id",
                  "public_subdomain",
                  "secondary_color",
                  "active_modules",
                  "sponsor_slots",
                  "data_visibility",
                  "default_language",
                  "terms_url",
                  "privacy_url",
                  "created_at",
                  "updated_at",
                  "created_by",
                  "updated_by"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "version": {
            "type": "integer",
            "minimum": 0
          },
          "etag": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "tenant_id",
          "organization_id",
          "base",
          "extras",
          "version",
          "etag"
        ]
      },
      "PlatformAuthorityConfigResponse": {
        "type": "object",
        "properties": {
          "schema_version": {
            "type": "number",
            "enum": [
              1
            ]
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "organization_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "etag": {
            "type": "string",
            "minLength": 1
          },
          "generated_at": {
            "type": "string",
            "format": "date-time"
          },
          "capabilities": {
            "type": "object",
            "properties": {
              "season_entity_cas": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "state": {
                        "type": "string",
                        "enum": [
                          "enabled"
                        ]
                      },
                      "source": {
                        "type": "string",
                        "enum": [
                          "entity_etag_cas",
                          "server_projection"
                        ]
                      }
                    },
                    "required": [
                      "state",
                      "source"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "state": {
                        "type": "string",
                        "enum": [
                          "disabled"
                        ]
                      },
                      "reason": {
                        "type": "string",
                        "enum": [
                          "aggregate_cas_not_implemented",
                          "signed_policy_revision_not_configured",
                          "carry_over_preview_not_implemented",
                          "sport_checkin_dossier_not_implemented",
                          "import_dossier_not_implemented",
                          "authoritative_candidate_projection_not_implemented"
                        ]
                      },
                      "recovery": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 300
                      }
                    },
                    "required": [
                      "state",
                      "reason"
                    ]
                  }
                ]
              },
              "season_aggregate_cas": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "state": {
                        "type": "string",
                        "enum": [
                          "enabled"
                        ]
                      },
                      "source": {
                        "type": "string",
                        "enum": [
                          "entity_etag_cas",
                          "server_projection"
                        ]
                      }
                    },
                    "required": [
                      "state",
                      "source"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "state": {
                        "type": "string",
                        "enum": [
                          "disabled"
                        ]
                      },
                      "reason": {
                        "type": "string",
                        "enum": [
                          "aggregate_cas_not_implemented",
                          "signed_policy_revision_not_configured",
                          "carry_over_preview_not_implemented",
                          "sport_checkin_dossier_not_implemented",
                          "import_dossier_not_implemented",
                          "authoritative_candidate_projection_not_implemented"
                        ]
                      },
                      "recovery": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 300
                      }
                    },
                    "required": [
                      "state",
                      "reason"
                    ]
                  }
                ]
              },
              "calendar_aggregate_cas": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "state": {
                        "type": "string",
                        "enum": [
                          "enabled"
                        ]
                      },
                      "source": {
                        "type": "string",
                        "enum": [
                          "entity_etag_cas",
                          "server_projection"
                        ]
                      }
                    },
                    "required": [
                      "state",
                      "source"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "state": {
                        "type": "string",
                        "enum": [
                          "disabled"
                        ]
                      },
                      "reason": {
                        "type": "string",
                        "enum": [
                          "aggregate_cas_not_implemented",
                          "signed_policy_revision_not_configured",
                          "carry_over_preview_not_implemented",
                          "sport_checkin_dossier_not_implemented",
                          "import_dossier_not_implemented",
                          "authoritative_candidate_projection_not_implemented"
                        ]
                      },
                      "recovery": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 300
                      }
                    },
                    "required": [
                      "state",
                      "reason"
                    ]
                  }
                ]
              },
              "tournament_aggregate_cas": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "state": {
                        "type": "string",
                        "enum": [
                          "enabled"
                        ]
                      },
                      "source": {
                        "type": "string",
                        "enum": [
                          "entity_etag_cas",
                          "server_projection"
                        ]
                      }
                    },
                    "required": [
                      "state",
                      "source"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "state": {
                        "type": "string",
                        "enum": [
                          "disabled"
                        ]
                      },
                      "reason": {
                        "type": "string",
                        "enum": [
                          "aggregate_cas_not_implemented",
                          "signed_policy_revision_not_configured",
                          "carry_over_preview_not_implemented",
                          "sport_checkin_dossier_not_implemented",
                          "import_dossier_not_implemented",
                          "authoritative_candidate_projection_not_implemented"
                        ]
                      },
                      "recovery": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 300
                      }
                    },
                    "required": [
                      "state",
                      "reason"
                    ]
                  }
                ]
              },
              "knockout_aggregate_cas": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "state": {
                        "type": "string",
                        "enum": [
                          "enabled"
                        ]
                      },
                      "source": {
                        "type": "string",
                        "enum": [
                          "entity_etag_cas",
                          "server_projection"
                        ]
                      }
                    },
                    "required": [
                      "state",
                      "source"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "state": {
                        "type": "string",
                        "enum": [
                          "disabled"
                        ]
                      },
                      "reason": {
                        "type": "string",
                        "enum": [
                          "aggregate_cas_not_implemented",
                          "signed_policy_revision_not_configured",
                          "carry_over_preview_not_implemented",
                          "sport_checkin_dossier_not_implemented",
                          "import_dossier_not_implemented",
                          "authoritative_candidate_projection_not_implemented"
                        ]
                      },
                      "recovery": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 300
                      }
                    },
                    "required": [
                      "state",
                      "reason"
                    ]
                  }
                ]
              },
              "promotion": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "state": {
                        "type": "string",
                        "enum": [
                          "enabled"
                        ]
                      },
                      "source": {
                        "type": "string",
                        "enum": [
                          "entity_etag_cas",
                          "server_projection"
                        ]
                      }
                    },
                    "required": [
                      "state",
                      "source"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "state": {
                        "type": "string",
                        "enum": [
                          "disabled"
                        ]
                      },
                      "reason": {
                        "type": "string",
                        "enum": [
                          "aggregate_cas_not_implemented",
                          "signed_policy_revision_not_configured",
                          "carry_over_preview_not_implemented",
                          "sport_checkin_dossier_not_implemented",
                          "import_dossier_not_implemented",
                          "authoritative_candidate_projection_not_implemented"
                        ]
                      },
                      "recovery": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 300
                      }
                    },
                    "required": [
                      "state",
                      "reason"
                    ]
                  }
                ]
              },
              "tie_break": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "state": {
                        "type": "string",
                        "enum": [
                          "enabled"
                        ]
                      },
                      "source": {
                        "type": "string",
                        "enum": [
                          "entity_etag_cas",
                          "server_projection"
                        ]
                      }
                    },
                    "required": [
                      "state",
                      "source"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "state": {
                        "type": "string",
                        "enum": [
                          "disabled"
                        ]
                      },
                      "reason": {
                        "type": "string",
                        "enum": [
                          "aggregate_cas_not_implemented",
                          "signed_policy_revision_not_configured",
                          "carry_over_preview_not_implemented",
                          "sport_checkin_dossier_not_implemented",
                          "import_dossier_not_implemented",
                          "authoritative_candidate_projection_not_implemented"
                        ]
                      },
                      "recovery": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 300
                      }
                    },
                    "required": [
                      "state",
                      "reason"
                    ]
                  }
                ]
              },
              "rollover": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "state": {
                        "type": "string",
                        "enum": [
                          "enabled"
                        ]
                      },
                      "source": {
                        "type": "string",
                        "enum": [
                          "entity_etag_cas",
                          "server_projection"
                        ]
                      }
                    },
                    "required": [
                      "state",
                      "source"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "state": {
                        "type": "string",
                        "enum": [
                          "disabled"
                        ]
                      },
                      "reason": {
                        "type": "string",
                        "enum": [
                          "aggregate_cas_not_implemented",
                          "signed_policy_revision_not_configured",
                          "carry_over_preview_not_implemented",
                          "sport_checkin_dossier_not_implemented",
                          "import_dossier_not_implemented",
                          "authoritative_candidate_projection_not_implemented"
                        ]
                      },
                      "recovery": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 300
                      }
                    },
                    "required": [
                      "state",
                      "reason"
                    ]
                  }
                ]
              },
              "sport_checkin": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "state": {
                        "type": "string",
                        "enum": [
                          "enabled"
                        ]
                      },
                      "source": {
                        "type": "string",
                        "enum": [
                          "entity_etag_cas",
                          "server_projection"
                        ]
                      }
                    },
                    "required": [
                      "state",
                      "source"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "state": {
                        "type": "string",
                        "enum": [
                          "disabled"
                        ]
                      },
                      "reason": {
                        "type": "string",
                        "enum": [
                          "aggregate_cas_not_implemented",
                          "signed_policy_revision_not_configured",
                          "carry_over_preview_not_implemented",
                          "sport_checkin_dossier_not_implemented",
                          "import_dossier_not_implemented",
                          "authoritative_candidate_projection_not_implemented"
                        ]
                      },
                      "recovery": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 300
                      }
                    },
                    "required": [
                      "state",
                      "reason"
                    ]
                  }
                ]
              },
              "import_dossier": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "state": {
                        "type": "string",
                        "enum": [
                          "enabled"
                        ]
                      },
                      "source": {
                        "type": "string",
                        "enum": [
                          "entity_etag_cas",
                          "server_projection"
                        ]
                      }
                    },
                    "required": [
                      "state",
                      "source"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "state": {
                        "type": "string",
                        "enum": [
                          "disabled"
                        ]
                      },
                      "reason": {
                        "type": "string",
                        "enum": [
                          "aggregate_cas_not_implemented",
                          "signed_policy_revision_not_configured",
                          "carry_over_preview_not_implemented",
                          "sport_checkin_dossier_not_implemented",
                          "import_dossier_not_implemented",
                          "authoritative_candidate_projection_not_implemented"
                        ]
                      },
                      "recovery": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 300
                      }
                    },
                    "required": [
                      "state",
                      "reason"
                    ]
                  }
                ]
              },
              "feed_candidates": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "state": {
                        "type": "string",
                        "enum": [
                          "enabled"
                        ]
                      },
                      "source": {
                        "type": "string",
                        "enum": [
                          "entity_etag_cas",
                          "server_projection"
                        ]
                      }
                    },
                    "required": [
                      "state",
                      "source"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "state": {
                        "type": "string",
                        "enum": [
                          "disabled"
                        ]
                      },
                      "reason": {
                        "type": "string",
                        "enum": [
                          "aggregate_cas_not_implemented",
                          "signed_policy_revision_not_configured",
                          "carry_over_preview_not_implemented",
                          "sport_checkin_dossier_not_implemented",
                          "import_dossier_not_implemented",
                          "authoritative_candidate_projection_not_implemented"
                        ]
                      },
                      "recovery": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 300
                      }
                    },
                    "required": [
                      "state",
                      "reason"
                    ]
                  }
                ]
              }
            },
            "required": [
              "season_entity_cas",
              "season_aggregate_cas",
              "calendar_aggregate_cas",
              "tournament_aggregate_cas",
              "knockout_aggregate_cas",
              "promotion",
              "tie_break",
              "rollover",
              "sport_checkin",
              "import_dossier",
              "feed_candidates"
            ]
          },
          "internal_attestation": {
            "type": "object",
            "properties": {
              "state": {
                "type": "string",
                "enum": [
                  "disabled"
                ]
              },
              "reason": {
                "type": "string",
                "enum": [
                  "durable_signer_not_configured"
                ]
              },
              "algorithm": {
                "type": "string",
                "enum": [
                  "ed25519"
                ]
              },
              "key_id": {
                "type": "null"
              },
              "signature_base64": {
                "type": "null"
              }
            },
            "required": [
              "state",
              "reason",
              "algorithm",
              "key_id",
              "signature_base64"
            ]
          }
        },
        "required": [
          "schema_version",
          "tenant_id",
          "organization_id",
          "revision",
          "etag",
          "generated_at",
          "capabilities",
          "internal_attestation"
        ]
      },
      "WhiteLabelExtrasRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "organization_id": {
            "type": "string",
            "format": "uuid"
          },
          "public_subdomain": {
            "type": "string",
            "minLength": 1,
            "maxLength": 63
          },
          "secondary_color": {
            "type": "string",
            "pattern": "^#[0-9A-Fa-f]{6}$"
          },
          "active_modules": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "sponsor_slots": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "position": {
                  "type": "string"
                },
                "sponsor_name": {
                  "type": "string",
                  "minLength": 1
                },
                "logo_url": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uri"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "position",
                "sponsor_name",
                "logo_url"
              ]
            }
          },
          "data_visibility": {
            "type": "string",
            "enum": [
              "public",
              "members_only",
              "mixed"
            ]
          },
          "default_language": {
            "type": "string",
            "minLength": 2,
            "maxLength": 8
          },
          "terms_url": {
            "oneOf": [
              {
                "type": "string",
                "format": "uri"
              },
              {
                "type": "null"
              }
            ]
          },
          "privacy_url": {
            "oneOf": [
              {
                "type": "string",
                "format": "uri"
              },
              {
                "type": "null"
              }
            ]
          },
          "version": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "etag": {
            "type": "string",
            "minLength": 1
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "updated_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "tenant_id",
          "organization_id",
          "public_subdomain",
          "secondary_color",
          "active_modules",
          "sponsor_slots",
          "data_visibility",
          "default_language",
          "terms_url",
          "privacy_url",
          "created_at",
          "updated_at",
          "created_by",
          "updated_by"
        ]
      },
      "WhiteLabelExtrasUpsert": {
        "type": "object",
        "properties": {
          "organization_id": {
            "type": "string",
            "format": "uuid"
          },
          "public_subdomain": {
            "type": "string",
            "minLength": 1,
            "maxLength": 63
          },
          "secondary_color": {
            "type": "string",
            "pattern": "^#[0-9A-Fa-f]{6}$"
          },
          "active_modules": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "sponsor_slots": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "position": {
                  "type": "string"
                },
                "sponsor_name": {
                  "type": "string",
                  "minLength": 1
                },
                "logo_url": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uri"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "position",
                "sponsor_name",
                "logo_url"
              ]
            }
          },
          "data_visibility": {
            "type": "string",
            "enum": [
              "public",
              "members_only",
              "mixed"
            ]
          },
          "default_language": {
            "type": "string",
            "minLength": 2,
            "maxLength": 8
          },
          "terms_url": {
            "oneOf": [
              {
                "type": "string",
                "format": "uri"
              },
              {
                "type": "null"
              }
            ]
          },
          "privacy_url": {
            "oneOf": [
              {
                "type": "string",
                "format": "uri"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "organization_id",
          "public_subdomain",
          "secondary_color",
          "active_modules",
          "sponsor_slots",
          "data_visibility",
          "default_language",
          "terms_url",
          "privacy_url"
        ]
      },
      "WhiteLabelExtrasList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "tenant_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "organization_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "public_subdomain": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 63
                },
                "secondary_color": {
                  "type": "string",
                  "pattern": "^#[0-9A-Fa-f]{6}$"
                },
                "active_modules": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "sponsor_slots": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "position": {
                        "type": "string"
                      },
                      "sponsor_name": {
                        "type": "string",
                        "minLength": 1
                      },
                      "logo_url": {
                        "oneOf": [
                          {
                            "type": "string",
                            "format": "uri"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "position",
                      "sponsor_name",
                      "logo_url"
                    ]
                  }
                },
                "data_visibility": {
                  "type": "string",
                  "enum": [
                    "public",
                    "members_only",
                    "mixed"
                  ]
                },
                "default_language": {
                  "type": "string",
                  "minLength": 2,
                  "maxLength": 8
                },
                "terms_url": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uri"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "privacy_url": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uri"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "version": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "etag": {
                  "type": "string",
                  "minLength": 1
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "created_by": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "updated_by": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "tenant_id",
                "organization_id",
                "public_subdomain",
                "secondary_color",
                "active_modules",
                "sponsor_slots",
                "data_visibility",
                "default_language",
                "terms_url",
                "privacy_url",
                "created_at",
                "updated_at",
                "created_by",
                "updated_by"
              ]
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "PublicTheme": {
        "type": "object",
        "properties": {
          "brand_name": {
            "type": "string",
            "minLength": 1
          },
          "primary_color": {
            "type": "string",
            "pattern": "^#[0-9A-Fa-f]{6}$"
          },
          "secondary_color": {
            "oneOf": [
              {
                "type": "string",
                "pattern": "^#[0-9A-Fa-f]{6}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "logo_url": {
            "oneOf": [
              {
                "type": "string",
                "format": "uri"
              },
              {
                "type": "null"
              }
            ]
          },
          "favicon_url": {
            "oneOf": [
              {
                "type": "string",
                "format": "uri"
              },
              {
                "type": "null"
              }
            ]
          },
          "custom_domain": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "legal_footer": {
            "type": "string"
          },
          "public_subdomain": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "active_modules": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "sponsor_slots": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "position": {
                  "type": "string"
                },
                "sponsor_name": {
                  "type": "string",
                  "minLength": 1
                },
                "logo_url": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uri"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "position",
                "sponsor_name",
                "logo_url"
              ]
            }
          },
          "data_visibility": {
            "type": "string",
            "enum": [
              "public",
              "members_only",
              "mixed"
            ]
          },
          "default_language": {
            "type": "string",
            "minLength": 2,
            "maxLength": 8
          },
          "terms_url": {
            "oneOf": [
              {
                "type": "string",
                "format": "uri"
              },
              {
                "type": "null"
              }
            ]
          },
          "privacy_url": {
            "oneOf": [
              {
                "type": "string",
                "format": "uri"
              },
              {
                "type": "null"
              }
            ]
          },
          "home_featured_match_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "home_live_badge_enabled": {
            "type": "boolean"
          },
          "source": {
            "type": "object",
            "properties": {
              "base_configured": {
                "type": "boolean"
              },
              "extras_configured": {
                "type": "boolean"
              },
              "tenant_resolved_by": {
                "type": "string",
                "enum": [
                  "api_key",
                  "host"
                ]
              }
            },
            "required": [
              "base_configured",
              "extras_configured",
              "tenant_resolved_by"
            ]
          },
          "rendering_fast_follow": {
            "type": "object",
            "properties": {
              "host_routing_ready": {
                "type": "boolean"
              },
              "owner_decision": {
                "type": "string",
                "enum": [
                  "O-MON-4"
                ]
              }
            },
            "required": [
              "host_routing_ready",
              "owner_decision"
            ]
          }
        },
        "required": [
          "brand_name",
          "primary_color",
          "secondary_color",
          "logo_url",
          "favicon_url",
          "custom_domain",
          "legal_footer",
          "public_subdomain",
          "active_modules",
          "sponsor_slots",
          "data_visibility",
          "default_language",
          "terms_url",
          "privacy_url",
          "home_featured_match_id",
          "home_live_badge_enabled",
          "source",
          "rendering_fast_follow"
        ]
      },
      "MobileDemoSessionRequest": {
        "type": "object",
        "properties": {
          "role_id": {
            "type": "string",
            "enum": [
              "team_captain",
              "team_member",
              "referee",
              "evaluator",
              "fantasy_manager",
              "public_user"
            ]
          }
        },
        "required": [
          "role_id"
        ],
        "additionalProperties": false
      },
      "MobileDemoSessionResponse": {
        "type": "object",
        "properties": {
          "role_id": {
            "type": "string",
            "enum": [
              "team_captain",
              "team_member",
              "referee",
              "evaluator",
              "fantasy_manager",
              "public_user"
            ]
          },
          "bearer_token": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "role_id",
          "bearer_token"
        ],
        "additionalProperties": false
      },
      "AffiliationTransfer": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "from_organization_id": {
            "type": "string",
            "format": "uuid"
          },
          "to_organization_id": {
            "type": "string",
            "format": "uuid"
          },
          "moved_entity_kinds": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "team",
                "player",
                "roster_entry",
                "tournament",
                "standing"
              ]
            }
          },
          "moved_entity_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "status": {
            "type": "string",
            "enum": [
              "proposed",
              "accepted",
              "applied",
              "rejected",
              "rolled_back"
            ]
          },
          "proposed_by": {
            "type": "string",
            "format": "uuid"
          },
          "proposed_at": {
            "type": "string",
            "format": "date-time"
          },
          "decided_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "decided_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "applied_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "decision_reason": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "notes": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "updated_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "tenant_id",
          "from_organization_id",
          "to_organization_id",
          "moved_entity_kinds",
          "moved_entity_ids",
          "status",
          "proposed_by",
          "proposed_at",
          "decided_by",
          "decided_at",
          "applied_at",
          "decision_reason",
          "notes",
          "created_at",
          "updated_at",
          "created_by",
          "updated_by"
        ]
      },
      "AffiliationTransferCreate": {
        "type": "object",
        "properties": {
          "from_organization_id": {
            "type": "string",
            "format": "uuid"
          },
          "to_organization_id": {
            "type": "string",
            "format": "uuid"
          },
          "moved_entity_kinds": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "team",
                "player",
                "roster_entry",
                "tournament",
                "standing"
              ]
            }
          },
          "moved_entity_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "notes": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "from_organization_id",
          "to_organization_id",
          "moved_entity_kinds",
          "moved_entity_ids",
          "notes"
        ]
      },
      "AffiliationTransferDecide": {
        "type": "object",
        "properties": {
          "decision": {
            "type": "string",
            "enum": [
              "accepted",
              "rejected"
            ]
          },
          "reason": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "decision",
          "reason"
        ]
      },
      "AffiliationTransferRollback": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "reason"
        ]
      },
      "AffiliationTransferList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "tenant_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "from_organization_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "to_organization_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "moved_entity_kinds": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "team",
                      "player",
                      "roster_entry",
                      "tournament",
                      "standing"
                    ]
                  }
                },
                "moved_entity_ids": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "proposed",
                    "accepted",
                    "applied",
                    "rejected",
                    "rolled_back"
                  ]
                },
                "proposed_by": {
                  "type": "string",
                  "format": "uuid"
                },
                "proposed_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "decided_by": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "decided_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "applied_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "decision_reason": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "notes": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "created_by": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "updated_by": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "tenant_id",
                "from_organization_id",
                "to_organization_id",
                "moved_entity_kinds",
                "moved_entity_ids",
                "status",
                "proposed_by",
                "proposed_at",
                "decided_by",
                "decided_at",
                "applied_at",
                "decision_reason",
                "notes",
                "created_at",
                "updated_at",
                "created_by",
                "updated_by"
              ]
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "offset": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "items",
          "total",
          "limit",
          "offset"
        ]
      },
      "AffiliationTransferHistoryList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "entity_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "history": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "organization_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "effective_at": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "via_transfer_id": {
                        "oneOf": [
                          {
                            "type": "string",
                            "format": "uuid"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "status": {
                        "type": "string",
                        "enum": [
                          "active",
                          "superseded"
                        ]
                      }
                    },
                    "required": [
                      "organization_id",
                      "effective_at",
                      "via_transfer_id",
                      "status"
                    ]
                  }
                }
              },
              "required": [
                "entity_id",
                "history"
              ]
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "MediaAssetRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "organization_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "kind": {
            "type": "string",
            "enum": [
              "image",
              "video",
              "document"
            ]
          },
          "storage_key": {
            "type": "string",
            "minLength": 1
          },
          "mime_type": {
            "type": "string",
            "minLength": 1
          },
          "byte_size": {
            "type": "integer",
            "minimum": 0
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "caption": {
            "oneOf": [
              {
                "type": "string",
                "maxLength": 1000
              },
              {
                "type": "null"
              }
            ]
          },
          "rights_state": {
            "type": "string",
            "enum": [
              "unlicensed_blocked",
              "player_reconsent_required",
              "licensed_verified",
              "challenged_taken_down"
            ]
          },
          "rights_basis": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "owned_by_league",
                  "team_match_attestation",
                  "licensed_from_author",
                  "subject_release_on_file",
                  "public_event_coverage",
                  "team_captain_attestation",
                  "player_self_attestation"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "rights_notes": {
            "oneOf": [
              {
                "type": "string",
                "maxLength": 1000
              },
              {
                "type": "null"
              }
            ]
          },
          "rights_attested_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "rights_attested_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "moderation_status": {
            "type": "string",
            "enum": [
              "pending",
              "approved",
              "rejected",
              "taken_down"
            ]
          },
          "processing_status": {
            "type": "string",
            "enum": [
              "queued",
              "processing",
              "ready",
              "failed"
            ]
          },
          "thumbnail_storage_key": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "public_rendition_sha256": {
            "oneOf": [
              {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "public_rendition_version": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 64
              },
              {
                "type": "null"
              }
            ]
          },
          "public_rendition_byte_size": {
            "oneOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "processing_attempt_id": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "processing_error": {
            "oneOf": [
              {
                "type": "string",
                "maxLength": 1000
              },
              {
                "type": "null"
              }
            ]
          },
          "public_title": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              {
                "type": "null"
              }
            ]
          },
          "public_caption": {
            "oneOf": [
              {
                "type": "string",
                "maxLength": 1000
              },
              {
                "type": "null"
              }
            ]
          },
          "consumer_binding_kind": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "team_logo",
                  "player_photo",
                  "match_media"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "consumer_binding_target_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "consumer_rights_policy_version": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 64
              },
              {
                "type": "null"
              }
            ]
          },
          "consumer_idempotency_key": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 8,
                "maxLength": 200
              },
              {
                "type": "null"
              }
            ]
          },
          "version": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "rejection_reason": {
            "oneOf": [
              {
                "type": "string",
                "maxLength": 1000
              },
              {
                "type": "null"
              }
            ]
          },
          "takedown_reason": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "captured_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "uploaded_by": {
            "type": "string",
            "format": "uuid"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "updated_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "tenant_id",
          "kind",
          "storage_key",
          "mime_type",
          "byte_size",
          "title",
          "caption",
          "moderation_status",
          "processing_status",
          "takedown_reason",
          "captured_at",
          "uploaded_by",
          "created_at",
          "updated_at",
          "created_by",
          "updated_by"
        ]
      },
      "MediaAssetList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "tenant_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "organization_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "image",
                    "video",
                    "document"
                  ]
                },
                "storage_key": {
                  "type": "string",
                  "minLength": 1
                },
                "mime_type": {
                  "type": "string",
                  "minLength": 1
                },
                "byte_size": {
                  "type": "integer",
                  "minimum": 0
                },
                "title": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "caption": {
                  "oneOf": [
                    {
                      "type": "string",
                      "maxLength": 1000
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "rights_state": {
                  "type": "string",
                  "enum": [
                    "unlicensed_blocked",
                    "player_reconsent_required",
                    "licensed_verified",
                    "challenged_taken_down"
                  ]
                },
                "rights_basis": {
                  "oneOf": [
                    {
                      "type": "string",
                      "enum": [
                        "owned_by_league",
                        "team_match_attestation",
                        "licensed_from_author",
                        "subject_release_on_file",
                        "public_event_coverage",
                        "team_captain_attestation",
                        "player_self_attestation"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "rights_notes": {
                  "oneOf": [
                    {
                      "type": "string",
                      "maxLength": 1000
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "rights_attested_by": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "rights_attested_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "moderation_status": {
                  "type": "string",
                  "enum": [
                    "pending",
                    "approved",
                    "rejected",
                    "taken_down"
                  ]
                },
                "processing_status": {
                  "type": "string",
                  "enum": [
                    "queued",
                    "processing",
                    "ready",
                    "failed"
                  ]
                },
                "thumbnail_storage_key": {
                  "oneOf": [
                    {
                      "type": "string",
                      "minLength": 1
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "public_rendition_sha256": {
                  "oneOf": [
                    {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "public_rendition_version": {
                  "oneOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "public_rendition_byte_size": {
                  "oneOf": [
                    {
                      "type": "integer",
                      "exclusiveMinimum": 0
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "processing_attempt_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "minLength": 1
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "processing_error": {
                  "oneOf": [
                    {
                      "type": "string",
                      "maxLength": 1000
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "public_title": {
                  "oneOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "public_caption": {
                  "oneOf": [
                    {
                      "type": "string",
                      "maxLength": 1000
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "consumer_binding_kind": {
                  "oneOf": [
                    {
                      "type": "string",
                      "enum": [
                        "team_logo",
                        "player_photo",
                        "match_media"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "consumer_binding_target_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "consumer_rights_policy_version": {
                  "oneOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "consumer_idempotency_key": {
                  "oneOf": [
                    {
                      "type": "string",
                      "minLength": 8,
                      "maxLength": 200
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "version": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "rejection_reason": {
                  "oneOf": [
                    {
                      "type": "string",
                      "maxLength": 1000
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "takedown_reason": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "captured_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "uploaded_by": {
                  "type": "string",
                  "format": "uuid"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "created_by": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "updated_by": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "tenant_id",
                "kind",
                "storage_key",
                "mime_type",
                "byte_size",
                "title",
                "caption",
                "moderation_status",
                "processing_status",
                "takedown_reason",
                "captured_at",
                "uploaded_by",
                "created_at",
                "updated_at",
                "created_by",
                "updated_by"
              ]
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "AdminMediaAssetRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "type": "string",
            "enum": [
              "image",
              "video",
              "document"
            ]
          },
          "mime_type": {
            "type": "string",
            "minLength": 1
          },
          "byte_size": {
            "type": "integer",
            "minimum": 0
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "caption": {
            "oneOf": [
              {
                "type": "string",
                "maxLength": 1000
              },
              {
                "type": "null"
              }
            ]
          },
          "public_title": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              {
                "type": "null"
              }
            ]
          },
          "public_caption": {
            "oneOf": [
              {
                "type": "string",
                "maxLength": 1000
              },
              {
                "type": "null"
              }
            ]
          },
          "rights_state": {
            "type": "string",
            "enum": [
              "unlicensed_blocked",
              "player_reconsent_required",
              "licensed_verified",
              "challenged_taken_down"
            ]
          },
          "rights_basis": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "owned_by_league",
                  "team_match_attestation",
                  "licensed_from_author",
                  "subject_release_on_file",
                  "public_event_coverage",
                  "team_captain_attestation",
                  "player_self_attestation"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "rights_notes": {
            "oneOf": [
              {
                "type": "string",
                "maxLength": 1000
              },
              {
                "type": "null"
              }
            ]
          },
          "rights_attested_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "rights_attested_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "moderation_status": {
            "type": "string",
            "enum": [
              "pending",
              "approved",
              "rejected",
              "taken_down"
            ]
          },
          "processing_status": {
            "type": "string",
            "enum": [
              "queued",
              "processing",
              "ready",
              "failed"
            ]
          },
          "captured_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "processing_error": {
            "oneOf": [
              {
                "type": "string",
                "maxLength": 1000
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "kind",
          "mime_type",
          "byte_size",
          "title",
          "caption",
          "moderation_status",
          "processing_status",
          "captured_at",
          "created_at",
          "updated_at",
          "processing_error"
        ]
      },
      "AdminMediaAssetListRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "type": "string",
            "enum": [
              "image",
              "video",
              "document"
            ]
          },
          "mime_type": {
            "type": "string",
            "minLength": 1
          },
          "byte_size": {
            "type": "integer",
            "minimum": 0
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "caption": {
            "oneOf": [
              {
                "type": "string",
                "maxLength": 1000
              },
              {
                "type": "null"
              }
            ]
          },
          "public_title": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              {
                "type": "null"
              }
            ]
          },
          "public_caption": {
            "oneOf": [
              {
                "type": "string",
                "maxLength": 1000
              },
              {
                "type": "null"
              }
            ]
          },
          "rights_state": {
            "type": "string",
            "enum": [
              "unlicensed_blocked",
              "player_reconsent_required",
              "licensed_verified",
              "challenged_taken_down"
            ]
          },
          "rights_basis": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "owned_by_league",
                  "team_match_attestation",
                  "licensed_from_author",
                  "subject_release_on_file",
                  "public_event_coverage",
                  "team_captain_attestation",
                  "player_self_attestation"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "rights_notes": {
            "oneOf": [
              {
                "type": "string",
                "maxLength": 1000
              },
              {
                "type": "null"
              }
            ]
          },
          "rights_attested_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "rights_attested_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "moderation_status": {
            "type": "string",
            "enum": [
              "pending",
              "approved",
              "rejected",
              "taken_down"
            ]
          },
          "processing_status": {
            "type": "string",
            "enum": [
              "queued",
              "processing",
              "ready",
              "failed"
            ]
          },
          "captured_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "processing_error": {
            "oneOf": [
              {
                "type": "string",
                "maxLength": 1000
              },
              {
                "type": "null"
              }
            ]
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "media_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "subject_kind": {
                  "type": "string",
                  "enum": [
                    "player",
                    "team",
                    "match"
                  ]
                },
                "subject_id": {
                  "type": "string",
                  "minLength": 1
                },
                "consent_status": {
                  "type": "string",
                  "enum": [
                    "pending",
                    "granted",
                    "denied",
                    "revoked"
                  ]
                },
                "removed_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "id",
                "media_id",
                "subject_kind",
                "subject_id",
                "consent_status",
                "removed_at",
                "created_at",
                "updated_at"
              ]
            }
          },
          "preview_url": {
            "oneOf": [
              {
                "type": "string",
                "format": "uri"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "kind",
          "mime_type",
          "byte_size",
          "title",
          "caption",
          "moderation_status",
          "processing_status",
          "captured_at",
          "created_at",
          "updated_at",
          "processing_error",
          "tags",
          "preview_url"
        ]
      },
      "AdminMediaAssetList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "image",
                    "video",
                    "document"
                  ]
                },
                "mime_type": {
                  "type": "string",
                  "minLength": 1
                },
                "byte_size": {
                  "type": "integer",
                  "minimum": 0
                },
                "title": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "caption": {
                  "oneOf": [
                    {
                      "type": "string",
                      "maxLength": 1000
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "public_title": {
                  "oneOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "public_caption": {
                  "oneOf": [
                    {
                      "type": "string",
                      "maxLength": 1000
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "rights_state": {
                  "type": "string",
                  "enum": [
                    "unlicensed_blocked",
                    "player_reconsent_required",
                    "licensed_verified",
                    "challenged_taken_down"
                  ]
                },
                "rights_basis": {
                  "oneOf": [
                    {
                      "type": "string",
                      "enum": [
                        "owned_by_league",
                        "team_match_attestation",
                        "licensed_from_author",
                        "subject_release_on_file",
                        "public_event_coverage",
                        "team_captain_attestation",
                        "player_self_attestation"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "rights_notes": {
                  "oneOf": [
                    {
                      "type": "string",
                      "maxLength": 1000
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "rights_attested_by": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "rights_attested_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "moderation_status": {
                  "type": "string",
                  "enum": [
                    "pending",
                    "approved",
                    "rejected",
                    "taken_down"
                  ]
                },
                "processing_status": {
                  "type": "string",
                  "enum": [
                    "queued",
                    "processing",
                    "ready",
                    "failed"
                  ]
                },
                "captured_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "processing_error": {
                  "oneOf": [
                    {
                      "type": "string",
                      "maxLength": 1000
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "media_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "subject_kind": {
                        "type": "string",
                        "enum": [
                          "player",
                          "team",
                          "match"
                        ]
                      },
                      "subject_id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "consent_status": {
                        "type": "string",
                        "enum": [
                          "pending",
                          "granted",
                          "denied",
                          "revoked"
                        ]
                      },
                      "removed_at": {
                        "oneOf": [
                          {
                            "type": "string",
                            "format": "date-time"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "created_at": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "updated_at": {
                        "type": "string",
                        "format": "date-time"
                      }
                    },
                    "required": [
                      "id",
                      "media_id",
                      "subject_kind",
                      "subject_id",
                      "consent_status",
                      "removed_at",
                      "created_at",
                      "updated_at"
                    ]
                  }
                },
                "preview_url": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uri"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "kind",
                "mime_type",
                "byte_size",
                "title",
                "caption",
                "moderation_status",
                "processing_status",
                "captured_at",
                "created_at",
                "updated_at",
                "processing_error",
                "tags",
                "preview_url"
              ]
            }
          },
          "next_cursor": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 400
              },
              {
                "type": "null"
              }
            ]
          },
          "summary": {
            "type": "object",
            "properties": {
              "total": {
                "type": "integer",
                "minimum": 0
              },
              "pending": {
                "type": "integer",
                "minimum": 0
              },
              "approved": {
                "type": "integer",
                "minimum": 0
              },
              "processing": {
                "type": "integer",
                "minimum": 0
              },
              "stuck": {
                "type": "integer",
                "minimum": 0
              },
              "stuck_after_minutes": {
                "oneOf": [
                  {
                    "type": "number",
                    "minimum": 0
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "total",
              "pending",
              "approved",
              "processing",
              "stuck",
              "stuck_after_minutes"
            ]
          }
        },
        "required": [
          "items",
          "next_cursor",
          "summary"
        ]
      },
      "AdminMediaTagRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "media_id": {
            "type": "string",
            "format": "uuid"
          },
          "subject_kind": {
            "type": "string",
            "enum": [
              "player",
              "team",
              "match"
            ]
          },
          "subject_id": {
            "type": "string",
            "minLength": 1
          },
          "consent_status": {
            "type": "string",
            "enum": [
              "pending",
              "granted",
              "denied",
              "revoked"
            ]
          },
          "removed_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "media_id",
          "subject_kind",
          "subject_id",
          "consent_status",
          "removed_at",
          "created_at",
          "updated_at"
        ]
      },
      "MediaRightsAttestationRequest": {
        "type": "object",
        "properties": {
          "media_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "minItems": 1,
            "maxItems": 50
          },
          "basis": {
            "type": "string",
            "enum": [
              "owned_by_league",
              "team_match_attestation",
              "licensed_from_author",
              "subject_release_on_file",
              "public_event_coverage",
              "team_captain_attestation",
              "player_self_attestation"
            ]
          },
          "notes": {
            "oneOf": [
              {
                "type": "string",
                "maxLength": 1000
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "media_ids",
          "basis",
          "notes"
        ]
      },
      "MediaRightsAttestationResult": {
        "type": "object",
        "properties": {
          "attested": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "image",
                    "video",
                    "document"
                  ]
                },
                "mime_type": {
                  "type": "string",
                  "minLength": 1
                },
                "byte_size": {
                  "type": "integer",
                  "minimum": 0
                },
                "title": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "caption": {
                  "oneOf": [
                    {
                      "type": "string",
                      "maxLength": 1000
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "public_title": {
                  "oneOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "public_caption": {
                  "oneOf": [
                    {
                      "type": "string",
                      "maxLength": 1000
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "rights_state": {
                  "type": "string",
                  "enum": [
                    "unlicensed_blocked",
                    "player_reconsent_required",
                    "licensed_verified",
                    "challenged_taken_down"
                  ]
                },
                "rights_basis": {
                  "oneOf": [
                    {
                      "type": "string",
                      "enum": [
                        "owned_by_league",
                        "team_match_attestation",
                        "licensed_from_author",
                        "subject_release_on_file",
                        "public_event_coverage",
                        "team_captain_attestation",
                        "player_self_attestation"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "rights_notes": {
                  "oneOf": [
                    {
                      "type": "string",
                      "maxLength": 1000
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "rights_attested_by": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "rights_attested_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "moderation_status": {
                  "type": "string",
                  "enum": [
                    "pending",
                    "approved",
                    "rejected",
                    "taken_down"
                  ]
                },
                "processing_status": {
                  "type": "string",
                  "enum": [
                    "queued",
                    "processing",
                    "ready",
                    "failed"
                  ]
                },
                "captured_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "processing_error": {
                  "oneOf": [
                    {
                      "type": "string",
                      "maxLength": 1000
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "kind",
                "mime_type",
                "byte_size",
                "title",
                "caption",
                "moderation_status",
                "processing_status",
                "captured_at",
                "created_at",
                "updated_at",
                "processing_error"
              ]
            }
          },
          "skipped": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "media_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "reason": {
                  "type": "string",
                  "enum": [
                    "not_found",
                    "already_verified",
                    "taken_down"
                  ]
                }
              },
              "required": [
                "media_id",
                "reason"
              ]
            }
          }
        },
        "required": [
          "attested",
          "skipped"
        ]
      },
      "MediaTagSubjectOptionRow": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "player",
              "team",
              "match"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 180
          }
        },
        "required": [
          "kind",
          "id",
          "label"
        ]
      },
      "MediaTagSubjectOptionList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "player",
                    "team",
                    "match"
                  ]
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "label": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 180
                }
              },
              "required": [
                "kind",
                "id",
                "label"
              ]
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "MediaUploadRequest": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "image"
            ]
          },
          "storage_key": {
            "type": "string",
            "minLength": 1
          },
          "mime_type": {
            "type": "string",
            "minLength": 1
          },
          "byte_size": {
            "type": "integer",
            "minimum": 0
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "caption": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "captured_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "kind",
          "storage_key",
          "mime_type",
          "byte_size",
          "title",
          "caption",
          "captured_at"
        ]
      },
      "MediaPresignRequest": {
        "type": "object",
        "properties": {
          "filename": {
            "type": "string",
            "minLength": 1,
            "maxLength": 240
          },
          "mime_type": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "byte_size": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "filename",
          "mime_type",
          "byte_size"
        ]
      },
      "MediaPresignResponse": {
        "type": "object",
        "properties": {
          "method": {
            "type": "string",
            "enum": [
              "PUT"
            ]
          },
          "upload_url": {
            "type": "string",
            "minLength": 1
          },
          "storage_key": {
            "type": "string",
            "minLength": 1
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "headers": {
            "type": "object",
            "additionalProperties": true
          }
        },
        "required": [
          "method",
          "upload_url",
          "storage_key",
          "expires_at",
          "headers"
        ]
      },
      "MediaGatewayUploadRequest": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "image"
            ]
          },
          "filename": {
            "type": "string",
            "minLength": 1,
            "maxLength": 240
          },
          "mime_type": {
            "type": "string",
            "enum": [
              "image/jpeg",
              "image/png",
              "image/webp",
              "image/avif"
            ]
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "caption": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "captured_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "idempotency_key": {
            "type": "string",
            "minLength": 8,
            "maxLength": 200
          },
          "content_base64": {
            "type": "string",
            "minLength": 4,
            "maxLength": 7000000
          }
        },
        "required": [
          "kind",
          "filename",
          "mime_type",
          "title",
          "caption",
          "captured_at",
          "content_base64"
        ]
      },
      "ConsumerMediaUploadRequest": {
        "type": "object",
        "properties": {
          "filename": {
            "type": "string",
            "minLength": 1,
            "maxLength": 240
          },
          "mime_type": {
            "type": "string",
            "enum": [
              "image/jpeg",
              "image/png",
              "image/webp",
              "image/avif",
              "video/mp4",
              "video/quicktime"
            ]
          },
          "idempotency_key": {
            "type": "string",
            "minLength": 8,
            "maxLength": 200
          },
          "content_base64": {
            "type": "string",
            "minLength": 4,
            "maxLength": 7000000
          },
          "binding_kind": {
            "type": "string",
            "enum": [
              "team_logo",
              "player_photo",
              "match_media"
            ]
          },
          "target_id": {
            "type": "string",
            "format": "uuid"
          },
          "rights_attested": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "rights_policy_version": {
            "type": "string",
            "pattern": "^consumer-media-rights-(v1|r[1-9]\\d*)$"
          },
          "preflight_receipt_id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "filename",
          "mime_type",
          "idempotency_key",
          "content_base64",
          "binding_kind",
          "target_id",
          "rights_attested",
          "rights_policy_version",
          "preflight_receipt_id"
        ]
      },
      "ConsumerMediaUploadStatus": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "binding_kind": {
            "type": "string",
            "enum": [
              "team_logo",
              "player_photo",
              "match_media"
            ]
          },
          "target_id": {
            "type": "string",
            "format": "uuid"
          },
          "moderation_status": {
            "type": "string",
            "enum": [
              "pending",
              "approved",
              "rejected"
            ]
          },
          "processing_status": {
            "type": "string",
            "enum": [
              "queued",
              "processing",
              "ready",
              "failed"
            ]
          },
          "rejection_reason": {
            "oneOf": [
              {
                "type": "string",
                "maxLength": 1000
              },
              {
                "type": "null"
              }
            ]
          },
          "public_url": {
            "oneOf": [
              {
                "type": "string",
                "format": "uri"
              },
              {
                "type": "null"
              }
            ]
          },
          "submitted_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "version": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "etag": {
            "type": "string",
            "minLength": 1
          },
          "rights_policy_version": {
            "type": "string",
            "pattern": "^consumer-media-rights-(v1|r[1-9]\\d*)$"
          },
          "receipts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "receipt_version": {
                  "type": "number",
                  "enum": [
                    1
                  ]
                },
                "phase": {
                  "type": "string",
                  "enum": [
                    "preflight",
                    "upload",
                    "processing",
                    "moderation",
                    "withdrawal"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "accepted",
                    "queued",
                    "processing",
                    "ready",
                    "failed",
                    "approved",
                    "rejected",
                    "taken_down",
                    "withdrawn"
                  ]
                },
                "media_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "binding_kind": {
                  "type": "string",
                  "enum": [
                    "team_logo",
                    "player_photo",
                    "match_media"
                  ]
                },
                "target_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "rights_policy_version": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64
                },
                "preflight_receipt_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "expires_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "occurred_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "truth_receipt": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "schema_version": {
                          "type": "number",
                          "enum": [
                            1
                          ]
                        },
                        "receipt_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "entity": {
                          "type": "object",
                          "properties": {
                            "entity_type": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "entity_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "entity_version": {
                              "oneOf": [
                                {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 200
                                }
                              ]
                            }
                          },
                          "required": [
                            "entity_type",
                            "entity_id",
                            "entity_version"
                          ]
                        },
                        "scope": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "schema_version": {
                                  "type": "number",
                                  "enum": [
                                    1
                                  ]
                                },
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "tenant"
                                  ]
                                },
                                "tenant_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "league_id": {
                                  "type": "null"
                                },
                                "match_id": {
                                  "type": "null"
                                }
                              },
                              "required": [
                                "schema_version",
                                "kind",
                                "tenant_id",
                                "league_id",
                                "match_id"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "schema_version": {
                                  "type": "number",
                                  "enum": [
                                    1
                                  ]
                                },
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "league"
                                  ]
                                },
                                "tenant_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "league_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "match_id": {
                                  "type": "null"
                                }
                              },
                              "required": [
                                "schema_version",
                                "kind",
                                "tenant_id",
                                "league_id",
                                "match_id"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "schema_version": {
                                  "type": "number",
                                  "enum": [
                                    1
                                  ]
                                },
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "match"
                                  ]
                                },
                                "tenant_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "league_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "match_id": {
                                  "type": "string",
                                  "format": "uuid"
                                }
                              },
                              "required": [
                                "schema_version",
                                "kind",
                                "tenant_id",
                                "league_id",
                                "match_id"
                              ]
                            }
                          ]
                        },
                        "actor_user_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "consumers": {
                          "type": "array",
                          "items": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "consumer": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 120
                                  },
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "pending"
                                    ]
                                  },
                                  "propagated_at": {
                                    "type": "null"
                                  },
                                  "reason": {
                                    "type": "null"
                                  }
                                },
                                "required": [
                                  "consumer",
                                  "state",
                                  "propagated_at",
                                  "reason"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "consumer": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 120
                                  },
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "applied"
                                    ]
                                  },
                                  "propagated_at": {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  "reason": {
                                    "type": "null"
                                  }
                                },
                                "required": [
                                  "consumer",
                                  "state",
                                  "propagated_at",
                                  "reason"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "consumer": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 120
                                  },
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "failed"
                                    ]
                                  },
                                  "propagated_at": {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  "reason": {
                                    "type": "object",
                                    "properties": {
                                      "code": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 120
                                      },
                                      "message": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 1000
                                      },
                                      "retryable": {
                                        "type": "boolean"
                                      },
                                      "recovery_action": {
                                        "oneOf": [
                                          {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 500
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "code",
                                      "message",
                                      "retryable",
                                      "recovery_action"
                                    ]
                                  }
                                },
                                "required": [
                                  "consumer",
                                  "state",
                                  "propagated_at",
                                  "reason"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "consumer": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 120
                                  },
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "not_applicable"
                                    ]
                                  },
                                  "propagated_at": {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  "reason": {
                                    "type": "object",
                                    "properties": {
                                      "code": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 120
                                      },
                                      "message": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 1000
                                      },
                                      "retryable": {
                                        "type": "boolean"
                                      },
                                      "recovery_action": {
                                        "oneOf": [
                                          {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 500
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "code",
                                      "message",
                                      "retryable",
                                      "recovery_action"
                                    ]
                                  }
                                },
                                "required": [
                                  "consumer",
                                  "state",
                                  "propagated_at",
                                  "reason"
                                ]
                              }
                            ]
                          }
                        },
                        "server_timestamp": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "correlation_id": {
                          "type": "string",
                          "minLength": 8,
                          "maxLength": 200
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "queued"
                          ]
                        },
                        "reason": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "message": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1000
                                },
                                "retryable": {
                                  "type": "boolean"
                                },
                                "recovery_action": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 500
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "code",
                                "message",
                                "retryable",
                                "recovery_action"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "schema_version",
                        "receipt_id",
                        "entity",
                        "scope",
                        "actor_user_id",
                        "consumers",
                        "server_timestamp",
                        "correlation_id",
                        "status",
                        "reason"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "schema_version": {
                          "type": "number",
                          "enum": [
                            1
                          ]
                        },
                        "receipt_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "entity": {
                          "type": "object",
                          "properties": {
                            "entity_type": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "entity_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "entity_version": {
                              "oneOf": [
                                {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 200
                                }
                              ]
                            }
                          },
                          "required": [
                            "entity_type",
                            "entity_id",
                            "entity_version"
                          ]
                        },
                        "scope": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "schema_version": {
                                  "type": "number",
                                  "enum": [
                                    1
                                  ]
                                },
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "tenant"
                                  ]
                                },
                                "tenant_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "league_id": {
                                  "type": "null"
                                },
                                "match_id": {
                                  "type": "null"
                                }
                              },
                              "required": [
                                "schema_version",
                                "kind",
                                "tenant_id",
                                "league_id",
                                "match_id"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "schema_version": {
                                  "type": "number",
                                  "enum": [
                                    1
                                  ]
                                },
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "league"
                                  ]
                                },
                                "tenant_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "league_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "match_id": {
                                  "type": "null"
                                }
                              },
                              "required": [
                                "schema_version",
                                "kind",
                                "tenant_id",
                                "league_id",
                                "match_id"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "schema_version": {
                                  "type": "number",
                                  "enum": [
                                    1
                                  ]
                                },
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "match"
                                  ]
                                },
                                "tenant_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "league_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "match_id": {
                                  "type": "string",
                                  "format": "uuid"
                                }
                              },
                              "required": [
                                "schema_version",
                                "kind",
                                "tenant_id",
                                "league_id",
                                "match_id"
                              ]
                            }
                          ]
                        },
                        "actor_user_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "consumers": {
                          "type": "array",
                          "items": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "consumer": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 120
                                  },
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "pending"
                                    ]
                                  },
                                  "propagated_at": {
                                    "type": "null"
                                  },
                                  "reason": {
                                    "type": "null"
                                  }
                                },
                                "required": [
                                  "consumer",
                                  "state",
                                  "propagated_at",
                                  "reason"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "consumer": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 120
                                  },
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "applied"
                                    ]
                                  },
                                  "propagated_at": {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  "reason": {
                                    "type": "null"
                                  }
                                },
                                "required": [
                                  "consumer",
                                  "state",
                                  "propagated_at",
                                  "reason"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "consumer": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 120
                                  },
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "failed"
                                    ]
                                  },
                                  "propagated_at": {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  "reason": {
                                    "type": "object",
                                    "properties": {
                                      "code": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 120
                                      },
                                      "message": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 1000
                                      },
                                      "retryable": {
                                        "type": "boolean"
                                      },
                                      "recovery_action": {
                                        "oneOf": [
                                          {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 500
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "code",
                                      "message",
                                      "retryable",
                                      "recovery_action"
                                    ]
                                  }
                                },
                                "required": [
                                  "consumer",
                                  "state",
                                  "propagated_at",
                                  "reason"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "consumer": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 120
                                  },
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "not_applicable"
                                    ]
                                  },
                                  "propagated_at": {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  "reason": {
                                    "type": "object",
                                    "properties": {
                                      "code": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 120
                                      },
                                      "message": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 1000
                                      },
                                      "retryable": {
                                        "type": "boolean"
                                      },
                                      "recovery_action": {
                                        "oneOf": [
                                          {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 500
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "code",
                                      "message",
                                      "retryable",
                                      "recovery_action"
                                    ]
                                  }
                                },
                                "required": [
                                  "consumer",
                                  "state",
                                  "propagated_at",
                                  "reason"
                                ]
                              }
                            ]
                          }
                        },
                        "server_timestamp": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "correlation_id": {
                          "type": "string",
                          "minLength": 8,
                          "maxLength": 200
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "accepted"
                          ]
                        },
                        "reason": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "message": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1000
                                },
                                "retryable": {
                                  "type": "boolean"
                                },
                                "recovery_action": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 500
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "code",
                                "message",
                                "retryable",
                                "recovery_action"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "schema_version",
                        "receipt_id",
                        "entity",
                        "scope",
                        "actor_user_id",
                        "consumers",
                        "server_timestamp",
                        "correlation_id",
                        "status",
                        "reason"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "schema_version": {
                          "type": "number",
                          "enum": [
                            1
                          ]
                        },
                        "receipt_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "entity": {
                          "type": "object",
                          "properties": {
                            "entity_type": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "entity_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "entity_version": {
                              "oneOf": [
                                {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 200
                                }
                              ]
                            }
                          },
                          "required": [
                            "entity_type",
                            "entity_id",
                            "entity_version"
                          ]
                        },
                        "scope": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "schema_version": {
                                  "type": "number",
                                  "enum": [
                                    1
                                  ]
                                },
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "tenant"
                                  ]
                                },
                                "tenant_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "league_id": {
                                  "type": "null"
                                },
                                "match_id": {
                                  "type": "null"
                                }
                              },
                              "required": [
                                "schema_version",
                                "kind",
                                "tenant_id",
                                "league_id",
                                "match_id"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "schema_version": {
                                  "type": "number",
                                  "enum": [
                                    1
                                  ]
                                },
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "league"
                                  ]
                                },
                                "tenant_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "league_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "match_id": {
                                  "type": "null"
                                }
                              },
                              "required": [
                                "schema_version",
                                "kind",
                                "tenant_id",
                                "league_id",
                                "match_id"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "schema_version": {
                                  "type": "number",
                                  "enum": [
                                    1
                                  ]
                                },
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "match"
                                  ]
                                },
                                "tenant_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "league_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "match_id": {
                                  "type": "string",
                                  "format": "uuid"
                                }
                              },
                              "required": [
                                "schema_version",
                                "kind",
                                "tenant_id",
                                "league_id",
                                "match_id"
                              ]
                            }
                          ]
                        },
                        "actor_user_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "consumers": {
                          "type": "array",
                          "items": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "consumer": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 120
                                  },
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "pending"
                                    ]
                                  },
                                  "propagated_at": {
                                    "type": "null"
                                  },
                                  "reason": {
                                    "type": "null"
                                  }
                                },
                                "required": [
                                  "consumer",
                                  "state",
                                  "propagated_at",
                                  "reason"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "consumer": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 120
                                  },
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "applied"
                                    ]
                                  },
                                  "propagated_at": {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  "reason": {
                                    "type": "null"
                                  }
                                },
                                "required": [
                                  "consumer",
                                  "state",
                                  "propagated_at",
                                  "reason"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "consumer": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 120
                                  },
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "failed"
                                    ]
                                  },
                                  "propagated_at": {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  "reason": {
                                    "type": "object",
                                    "properties": {
                                      "code": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 120
                                      },
                                      "message": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 1000
                                      },
                                      "retryable": {
                                        "type": "boolean"
                                      },
                                      "recovery_action": {
                                        "oneOf": [
                                          {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 500
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "code",
                                      "message",
                                      "retryable",
                                      "recovery_action"
                                    ]
                                  }
                                },
                                "required": [
                                  "consumer",
                                  "state",
                                  "propagated_at",
                                  "reason"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "consumer": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 120
                                  },
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "not_applicable"
                                    ]
                                  },
                                  "propagated_at": {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  "reason": {
                                    "type": "object",
                                    "properties": {
                                      "code": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 120
                                      },
                                      "message": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 1000
                                      },
                                      "retryable": {
                                        "type": "boolean"
                                      },
                                      "recovery_action": {
                                        "oneOf": [
                                          {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 500
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "code",
                                      "message",
                                      "retryable",
                                      "recovery_action"
                                    ]
                                  }
                                },
                                "required": [
                                  "consumer",
                                  "state",
                                  "propagated_at",
                                  "reason"
                                ]
                              }
                            ]
                          }
                        },
                        "server_timestamp": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "correlation_id": {
                          "type": "string",
                          "minLength": 8,
                          "maxLength": 200
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "rejected"
                          ]
                        },
                        "reason": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "message": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 1000
                            },
                            "retryable": {
                              "type": "boolean"
                            },
                            "recovery_action": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 500
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message",
                            "retryable",
                            "recovery_action"
                          ]
                        }
                      },
                      "required": [
                        "schema_version",
                        "receipt_id",
                        "entity",
                        "scope",
                        "actor_user_id",
                        "consumers",
                        "server_timestamp",
                        "correlation_id",
                        "status",
                        "reason"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "schema_version": {
                          "type": "number",
                          "enum": [
                            1
                          ]
                        },
                        "receipt_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "entity": {
                          "type": "object",
                          "properties": {
                            "entity_type": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "entity_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "entity_version": {
                              "oneOf": [
                                {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 200
                                }
                              ]
                            }
                          },
                          "required": [
                            "entity_type",
                            "entity_id",
                            "entity_version"
                          ]
                        },
                        "scope": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "schema_version": {
                                  "type": "number",
                                  "enum": [
                                    1
                                  ]
                                },
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "tenant"
                                  ]
                                },
                                "tenant_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "league_id": {
                                  "type": "null"
                                },
                                "match_id": {
                                  "type": "null"
                                }
                              },
                              "required": [
                                "schema_version",
                                "kind",
                                "tenant_id",
                                "league_id",
                                "match_id"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "schema_version": {
                                  "type": "number",
                                  "enum": [
                                    1
                                  ]
                                },
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "league"
                                  ]
                                },
                                "tenant_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "league_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "match_id": {
                                  "type": "null"
                                }
                              },
                              "required": [
                                "schema_version",
                                "kind",
                                "tenant_id",
                                "league_id",
                                "match_id"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "schema_version": {
                                  "type": "number",
                                  "enum": [
                                    1
                                  ]
                                },
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "match"
                                  ]
                                },
                                "tenant_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "league_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "match_id": {
                                  "type": "string",
                                  "format": "uuid"
                                }
                              },
                              "required": [
                                "schema_version",
                                "kind",
                                "tenant_id",
                                "league_id",
                                "match_id"
                              ]
                            }
                          ]
                        },
                        "actor_user_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "consumers": {
                          "type": "array",
                          "items": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "consumer": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 120
                                  },
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "pending"
                                    ]
                                  },
                                  "propagated_at": {
                                    "type": "null"
                                  },
                                  "reason": {
                                    "type": "null"
                                  }
                                },
                                "required": [
                                  "consumer",
                                  "state",
                                  "propagated_at",
                                  "reason"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "consumer": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 120
                                  },
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "applied"
                                    ]
                                  },
                                  "propagated_at": {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  "reason": {
                                    "type": "null"
                                  }
                                },
                                "required": [
                                  "consumer",
                                  "state",
                                  "propagated_at",
                                  "reason"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "consumer": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 120
                                  },
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "failed"
                                    ]
                                  },
                                  "propagated_at": {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  "reason": {
                                    "type": "object",
                                    "properties": {
                                      "code": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 120
                                      },
                                      "message": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 1000
                                      },
                                      "retryable": {
                                        "type": "boolean"
                                      },
                                      "recovery_action": {
                                        "oneOf": [
                                          {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 500
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "code",
                                      "message",
                                      "retryable",
                                      "recovery_action"
                                    ]
                                  }
                                },
                                "required": [
                                  "consumer",
                                  "state",
                                  "propagated_at",
                                  "reason"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "consumer": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 120
                                  },
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "not_applicable"
                                    ]
                                  },
                                  "propagated_at": {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  "reason": {
                                    "type": "object",
                                    "properties": {
                                      "code": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 120
                                      },
                                      "message": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 1000
                                      },
                                      "retryable": {
                                        "type": "boolean"
                                      },
                                      "recovery_action": {
                                        "oneOf": [
                                          {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 500
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "code",
                                      "message",
                                      "retryable",
                                      "recovery_action"
                                    ]
                                  }
                                },
                                "required": [
                                  "consumer",
                                  "state",
                                  "propagated_at",
                                  "reason"
                                ]
                              }
                            ]
                          }
                        },
                        "server_timestamp": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "correlation_id": {
                          "type": "string",
                          "minLength": 8,
                          "maxLength": 200
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "superseded"
                          ]
                        },
                        "reason": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "message": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 1000
                            },
                            "retryable": {
                              "type": "boolean"
                            },
                            "recovery_action": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 500
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message",
                            "retryable",
                            "recovery_action"
                          ]
                        }
                      },
                      "required": [
                        "schema_version",
                        "receipt_id",
                        "entity",
                        "scope",
                        "actor_user_id",
                        "consumers",
                        "server_timestamp",
                        "correlation_id",
                        "status",
                        "reason"
                      ]
                    }
                  ]
                }
              },
              "required": [
                "id",
                "receipt_version",
                "phase",
                "status",
                "media_id",
                "binding_kind",
                "target_id",
                "rights_policy_version",
                "preflight_receipt_id",
                "expires_at",
                "occurred_at"
              ]
            }
          }
        },
        "required": [
          "id",
          "binding_kind",
          "target_id",
          "moderation_status",
          "processing_status",
          "rejection_reason",
          "public_url",
          "submitted_at",
          "updated_at",
          "version",
          "etag",
          "rights_policy_version",
          "receipts"
        ]
      },
      "ConsumerMediaUploadList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "binding_kind": {
                  "type": "string",
                  "enum": [
                    "team_logo",
                    "player_photo",
                    "match_media"
                  ]
                },
                "target_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "moderation_status": {
                  "type": "string",
                  "enum": [
                    "pending",
                    "approved",
                    "rejected"
                  ]
                },
                "processing_status": {
                  "type": "string",
                  "enum": [
                    "queued",
                    "processing",
                    "ready",
                    "failed"
                  ]
                },
                "rejection_reason": {
                  "oneOf": [
                    {
                      "type": "string",
                      "maxLength": 1000
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "public_url": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uri"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "submitted_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "version": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "etag": {
                  "type": "string",
                  "minLength": 1
                },
                "rights_policy_version": {
                  "type": "string",
                  "pattern": "^consumer-media-rights-(v1|r[1-9]\\d*)$"
                },
                "receipts": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "receipt_version": {
                        "type": "number",
                        "enum": [
                          1
                        ]
                      },
                      "phase": {
                        "type": "string",
                        "enum": [
                          "preflight",
                          "upload",
                          "processing",
                          "moderation",
                          "withdrawal"
                        ]
                      },
                      "status": {
                        "type": "string",
                        "enum": [
                          "accepted",
                          "queued",
                          "processing",
                          "ready",
                          "failed",
                          "approved",
                          "rejected",
                          "taken_down",
                          "withdrawn"
                        ]
                      },
                      "media_id": {
                        "oneOf": [
                          {
                            "type": "string",
                            "format": "uuid"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "binding_kind": {
                        "type": "string",
                        "enum": [
                          "team_logo",
                          "player_photo",
                          "match_media"
                        ]
                      },
                      "target_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "rights_policy_version": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64
                      },
                      "preflight_receipt_id": {
                        "oneOf": [
                          {
                            "type": "string",
                            "format": "uuid"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "expires_at": {
                        "oneOf": [
                          {
                            "type": "string",
                            "format": "date-time"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "occurred_at": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "truth_receipt": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "schema_version": {
                                "type": "number",
                                "enum": [
                                  1
                                ]
                              },
                              "receipt_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "entity": {
                                "type": "object",
                                "properties": {
                                  "entity_type": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 120
                                  },
                                  "entity_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "entity_version": {
                                    "oneOf": [
                                      {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 200
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "entity_type",
                                  "entity_id",
                                  "entity_version"
                                ]
                              },
                              "scope": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "schema_version": {
                                        "type": "number",
                                        "enum": [
                                          1
                                        ]
                                      },
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "tenant"
                                        ]
                                      },
                                      "tenant_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "league_id": {
                                        "type": "null"
                                      },
                                      "match_id": {
                                        "type": "null"
                                      }
                                    },
                                    "required": [
                                      "schema_version",
                                      "kind",
                                      "tenant_id",
                                      "league_id",
                                      "match_id"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "schema_version": {
                                        "type": "number",
                                        "enum": [
                                          1
                                        ]
                                      },
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "league"
                                        ]
                                      },
                                      "tenant_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "league_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "match_id": {
                                        "type": "null"
                                      }
                                    },
                                    "required": [
                                      "schema_version",
                                      "kind",
                                      "tenant_id",
                                      "league_id",
                                      "match_id"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "schema_version": {
                                        "type": "number",
                                        "enum": [
                                          1
                                        ]
                                      },
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "match"
                                        ]
                                      },
                                      "tenant_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "league_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "match_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      }
                                    },
                                    "required": [
                                      "schema_version",
                                      "kind",
                                      "tenant_id",
                                      "league_id",
                                      "match_id"
                                    ]
                                  }
                                ]
                              },
                              "actor_user_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "consumers": {
                                "type": "array",
                                "items": {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "consumer": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 120
                                        },
                                        "state": {
                                          "type": "string",
                                          "enum": [
                                            "pending"
                                          ]
                                        },
                                        "propagated_at": {
                                          "type": "null"
                                        },
                                        "reason": {
                                          "type": "null"
                                        }
                                      },
                                      "required": [
                                        "consumer",
                                        "state",
                                        "propagated_at",
                                        "reason"
                                      ]
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "consumer": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 120
                                        },
                                        "state": {
                                          "type": "string",
                                          "enum": [
                                            "applied"
                                          ]
                                        },
                                        "propagated_at": {
                                          "type": "string",
                                          "format": "date-time"
                                        },
                                        "reason": {
                                          "type": "null"
                                        }
                                      },
                                      "required": [
                                        "consumer",
                                        "state",
                                        "propagated_at",
                                        "reason"
                                      ]
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "consumer": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 120
                                        },
                                        "state": {
                                          "type": "string",
                                          "enum": [
                                            "failed"
                                          ]
                                        },
                                        "propagated_at": {
                                          "type": "string",
                                          "format": "date-time"
                                        },
                                        "reason": {
                                          "type": "object",
                                          "properties": {
                                            "code": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 120
                                            },
                                            "message": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 1000
                                            },
                                            "retryable": {
                                              "type": "boolean"
                                            },
                                            "recovery_action": {
                                              "oneOf": [
                                                {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 500
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "code",
                                            "message",
                                            "retryable",
                                            "recovery_action"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "consumer",
                                        "state",
                                        "propagated_at",
                                        "reason"
                                      ]
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "consumer": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 120
                                        },
                                        "state": {
                                          "type": "string",
                                          "enum": [
                                            "not_applicable"
                                          ]
                                        },
                                        "propagated_at": {
                                          "type": "string",
                                          "format": "date-time"
                                        },
                                        "reason": {
                                          "type": "object",
                                          "properties": {
                                            "code": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 120
                                            },
                                            "message": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 1000
                                            },
                                            "retryable": {
                                              "type": "boolean"
                                            },
                                            "recovery_action": {
                                              "oneOf": [
                                                {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 500
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "code",
                                            "message",
                                            "retryable",
                                            "recovery_action"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "consumer",
                                        "state",
                                        "propagated_at",
                                        "reason"
                                      ]
                                    }
                                  ]
                                }
                              },
                              "server_timestamp": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "correlation_id": {
                                "type": "string",
                                "minLength": 8,
                                "maxLength": 200
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "queued"
                                ]
                              },
                              "reason": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "code": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 120
                                      },
                                      "message": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 1000
                                      },
                                      "retryable": {
                                        "type": "boolean"
                                      },
                                      "recovery_action": {
                                        "oneOf": [
                                          {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 500
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "code",
                                      "message",
                                      "retryable",
                                      "recovery_action"
                                    ]
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "schema_version",
                              "receipt_id",
                              "entity",
                              "scope",
                              "actor_user_id",
                              "consumers",
                              "server_timestamp",
                              "correlation_id",
                              "status",
                              "reason"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "schema_version": {
                                "type": "number",
                                "enum": [
                                  1
                                ]
                              },
                              "receipt_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "entity": {
                                "type": "object",
                                "properties": {
                                  "entity_type": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 120
                                  },
                                  "entity_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "entity_version": {
                                    "oneOf": [
                                      {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 200
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "entity_type",
                                  "entity_id",
                                  "entity_version"
                                ]
                              },
                              "scope": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "schema_version": {
                                        "type": "number",
                                        "enum": [
                                          1
                                        ]
                                      },
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "tenant"
                                        ]
                                      },
                                      "tenant_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "league_id": {
                                        "type": "null"
                                      },
                                      "match_id": {
                                        "type": "null"
                                      }
                                    },
                                    "required": [
                                      "schema_version",
                                      "kind",
                                      "tenant_id",
                                      "league_id",
                                      "match_id"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "schema_version": {
                                        "type": "number",
                                        "enum": [
                                          1
                                        ]
                                      },
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "league"
                                        ]
                                      },
                                      "tenant_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "league_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "match_id": {
                                        "type": "null"
                                      }
                                    },
                                    "required": [
                                      "schema_version",
                                      "kind",
                                      "tenant_id",
                                      "league_id",
                                      "match_id"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "schema_version": {
                                        "type": "number",
                                        "enum": [
                                          1
                                        ]
                                      },
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "match"
                                        ]
                                      },
                                      "tenant_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "league_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "match_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      }
                                    },
                                    "required": [
                                      "schema_version",
                                      "kind",
                                      "tenant_id",
                                      "league_id",
                                      "match_id"
                                    ]
                                  }
                                ]
                              },
                              "actor_user_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "consumers": {
                                "type": "array",
                                "items": {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "consumer": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 120
                                        },
                                        "state": {
                                          "type": "string",
                                          "enum": [
                                            "pending"
                                          ]
                                        },
                                        "propagated_at": {
                                          "type": "null"
                                        },
                                        "reason": {
                                          "type": "null"
                                        }
                                      },
                                      "required": [
                                        "consumer",
                                        "state",
                                        "propagated_at",
                                        "reason"
                                      ]
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "consumer": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 120
                                        },
                                        "state": {
                                          "type": "string",
                                          "enum": [
                                            "applied"
                                          ]
                                        },
                                        "propagated_at": {
                                          "type": "string",
                                          "format": "date-time"
                                        },
                                        "reason": {
                                          "type": "null"
                                        }
                                      },
                                      "required": [
                                        "consumer",
                                        "state",
                                        "propagated_at",
                                        "reason"
                                      ]
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "consumer": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 120
                                        },
                                        "state": {
                                          "type": "string",
                                          "enum": [
                                            "failed"
                                          ]
                                        },
                                        "propagated_at": {
                                          "type": "string",
                                          "format": "date-time"
                                        },
                                        "reason": {
                                          "type": "object",
                                          "properties": {
                                            "code": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 120
                                            },
                                            "message": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 1000
                                            },
                                            "retryable": {
                                              "type": "boolean"
                                            },
                                            "recovery_action": {
                                              "oneOf": [
                                                {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 500
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "code",
                                            "message",
                                            "retryable",
                                            "recovery_action"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "consumer",
                                        "state",
                                        "propagated_at",
                                        "reason"
                                      ]
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "consumer": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 120
                                        },
                                        "state": {
                                          "type": "string",
                                          "enum": [
                                            "not_applicable"
                                          ]
                                        },
                                        "propagated_at": {
                                          "type": "string",
                                          "format": "date-time"
                                        },
                                        "reason": {
                                          "type": "object",
                                          "properties": {
                                            "code": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 120
                                            },
                                            "message": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 1000
                                            },
                                            "retryable": {
                                              "type": "boolean"
                                            },
                                            "recovery_action": {
                                              "oneOf": [
                                                {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 500
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "code",
                                            "message",
                                            "retryable",
                                            "recovery_action"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "consumer",
                                        "state",
                                        "propagated_at",
                                        "reason"
                                      ]
                                    }
                                  ]
                                }
                              },
                              "server_timestamp": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "correlation_id": {
                                "type": "string",
                                "minLength": 8,
                                "maxLength": 200
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "accepted"
                                ]
                              },
                              "reason": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "code": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 120
                                      },
                                      "message": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 1000
                                      },
                                      "retryable": {
                                        "type": "boolean"
                                      },
                                      "recovery_action": {
                                        "oneOf": [
                                          {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 500
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "code",
                                      "message",
                                      "retryable",
                                      "recovery_action"
                                    ]
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "schema_version",
                              "receipt_id",
                              "entity",
                              "scope",
                              "actor_user_id",
                              "consumers",
                              "server_timestamp",
                              "correlation_id",
                              "status",
                              "reason"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "schema_version": {
                                "type": "number",
                                "enum": [
                                  1
                                ]
                              },
                              "receipt_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "entity": {
                                "type": "object",
                                "properties": {
                                  "entity_type": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 120
                                  },
                                  "entity_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "entity_version": {
                                    "oneOf": [
                                      {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 200
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "entity_type",
                                  "entity_id",
                                  "entity_version"
                                ]
                              },
                              "scope": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "schema_version": {
                                        "type": "number",
                                        "enum": [
                                          1
                                        ]
                                      },
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "tenant"
                                        ]
                                      },
                                      "tenant_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "league_id": {
                                        "type": "null"
                                      },
                                      "match_id": {
                                        "type": "null"
                                      }
                                    },
                                    "required": [
                                      "schema_version",
                                      "kind",
                                      "tenant_id",
                                      "league_id",
                                      "match_id"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "schema_version": {
                                        "type": "number",
                                        "enum": [
                                          1
                                        ]
                                      },
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "league"
                                        ]
                                      },
                                      "tenant_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "league_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "match_id": {
                                        "type": "null"
                                      }
                                    },
                                    "required": [
                                      "schema_version",
                                      "kind",
                                      "tenant_id",
                                      "league_id",
                                      "match_id"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "schema_version": {
                                        "type": "number",
                                        "enum": [
                                          1
                                        ]
                                      },
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "match"
                                        ]
                                      },
                                      "tenant_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "league_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "match_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      }
                                    },
                                    "required": [
                                      "schema_version",
                                      "kind",
                                      "tenant_id",
                                      "league_id",
                                      "match_id"
                                    ]
                                  }
                                ]
                              },
                              "actor_user_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "consumers": {
                                "type": "array",
                                "items": {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "consumer": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 120
                                        },
                                        "state": {
                                          "type": "string",
                                          "enum": [
                                            "pending"
                                          ]
                                        },
                                        "propagated_at": {
                                          "type": "null"
                                        },
                                        "reason": {
                                          "type": "null"
                                        }
                                      },
                                      "required": [
                                        "consumer",
                                        "state",
                                        "propagated_at",
                                        "reason"
                                      ]
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "consumer": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 120
                                        },
                                        "state": {
                                          "type": "string",
                                          "enum": [
                                            "applied"
                                          ]
                                        },
                                        "propagated_at": {
                                          "type": "string",
                                          "format": "date-time"
                                        },
                                        "reason": {
                                          "type": "null"
                                        }
                                      },
                                      "required": [
                                        "consumer",
                                        "state",
                                        "propagated_at",
                                        "reason"
                                      ]
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "consumer": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 120
                                        },
                                        "state": {
                                          "type": "string",
                                          "enum": [
                                            "failed"
                                          ]
                                        },
                                        "propagated_at": {
                                          "type": "string",
                                          "format": "date-time"
                                        },
                                        "reason": {
                                          "type": "object",
                                          "properties": {
                                            "code": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 120
                                            },
                                            "message": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 1000
                                            },
                                            "retryable": {
                                              "type": "boolean"
                                            },
                                            "recovery_action": {
                                              "oneOf": [
                                                {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 500
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "code",
                                            "message",
                                            "retryable",
                                            "recovery_action"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "consumer",
                                        "state",
                                        "propagated_at",
                                        "reason"
                                      ]
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "consumer": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 120
                                        },
                                        "state": {
                                          "type": "string",
                                          "enum": [
                                            "not_applicable"
                                          ]
                                        },
                                        "propagated_at": {
                                          "type": "string",
                                          "format": "date-time"
                                        },
                                        "reason": {
                                          "type": "object",
                                          "properties": {
                                            "code": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 120
                                            },
                                            "message": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 1000
                                            },
                                            "retryable": {
                                              "type": "boolean"
                                            },
                                            "recovery_action": {
                                              "oneOf": [
                                                {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 500
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "code",
                                            "message",
                                            "retryable",
                                            "recovery_action"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "consumer",
                                        "state",
                                        "propagated_at",
                                        "reason"
                                      ]
                                    }
                                  ]
                                }
                              },
                              "server_timestamp": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "correlation_id": {
                                "type": "string",
                                "minLength": 8,
                                "maxLength": 200
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "rejected"
                                ]
                              },
                              "reason": {
                                "type": "object",
                                "properties": {
                                  "code": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 120
                                  },
                                  "message": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 1000
                                  },
                                  "retryable": {
                                    "type": "boolean"
                                  },
                                  "recovery_action": {
                                    "oneOf": [
                                      {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 500
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "code",
                                  "message",
                                  "retryable",
                                  "recovery_action"
                                ]
                              }
                            },
                            "required": [
                              "schema_version",
                              "receipt_id",
                              "entity",
                              "scope",
                              "actor_user_id",
                              "consumers",
                              "server_timestamp",
                              "correlation_id",
                              "status",
                              "reason"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "schema_version": {
                                "type": "number",
                                "enum": [
                                  1
                                ]
                              },
                              "receipt_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "entity": {
                                "type": "object",
                                "properties": {
                                  "entity_type": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 120
                                  },
                                  "entity_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "entity_version": {
                                    "oneOf": [
                                      {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 200
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "entity_type",
                                  "entity_id",
                                  "entity_version"
                                ]
                              },
                              "scope": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "schema_version": {
                                        "type": "number",
                                        "enum": [
                                          1
                                        ]
                                      },
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "tenant"
                                        ]
                                      },
                                      "tenant_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "league_id": {
                                        "type": "null"
                                      },
                                      "match_id": {
                                        "type": "null"
                                      }
                                    },
                                    "required": [
                                      "schema_version",
                                      "kind",
                                      "tenant_id",
                                      "league_id",
                                      "match_id"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "schema_version": {
                                        "type": "number",
                                        "enum": [
                                          1
                                        ]
                                      },
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "league"
                                        ]
                                      },
                                      "tenant_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "league_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "match_id": {
                                        "type": "null"
                                      }
                                    },
                                    "required": [
                                      "schema_version",
                                      "kind",
                                      "tenant_id",
                                      "league_id",
                                      "match_id"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "schema_version": {
                                        "type": "number",
                                        "enum": [
                                          1
                                        ]
                                      },
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "match"
                                        ]
                                      },
                                      "tenant_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "league_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "match_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      }
                                    },
                                    "required": [
                                      "schema_version",
                                      "kind",
                                      "tenant_id",
                                      "league_id",
                                      "match_id"
                                    ]
                                  }
                                ]
                              },
                              "actor_user_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "consumers": {
                                "type": "array",
                                "items": {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "consumer": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 120
                                        },
                                        "state": {
                                          "type": "string",
                                          "enum": [
                                            "pending"
                                          ]
                                        },
                                        "propagated_at": {
                                          "type": "null"
                                        },
                                        "reason": {
                                          "type": "null"
                                        }
                                      },
                                      "required": [
                                        "consumer",
                                        "state",
                                        "propagated_at",
                                        "reason"
                                      ]
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "consumer": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 120
                                        },
                                        "state": {
                                          "type": "string",
                                          "enum": [
                                            "applied"
                                          ]
                                        },
                                        "propagated_at": {
                                          "type": "string",
                                          "format": "date-time"
                                        },
                                        "reason": {
                                          "type": "null"
                                        }
                                      },
                                      "required": [
                                        "consumer",
                                        "state",
                                        "propagated_at",
                                        "reason"
                                      ]
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "consumer": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 120
                                        },
                                        "state": {
                                          "type": "string",
                                          "enum": [
                                            "failed"
                                          ]
                                        },
                                        "propagated_at": {
                                          "type": "string",
                                          "format": "date-time"
                                        },
                                        "reason": {
                                          "type": "object",
                                          "properties": {
                                            "code": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 120
                                            },
                                            "message": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 1000
                                            },
                                            "retryable": {
                                              "type": "boolean"
                                            },
                                            "recovery_action": {
                                              "oneOf": [
                                                {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 500
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "code",
                                            "message",
                                            "retryable",
                                            "recovery_action"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "consumer",
                                        "state",
                                        "propagated_at",
                                        "reason"
                                      ]
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "consumer": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 120
                                        },
                                        "state": {
                                          "type": "string",
                                          "enum": [
                                            "not_applicable"
                                          ]
                                        },
                                        "propagated_at": {
                                          "type": "string",
                                          "format": "date-time"
                                        },
                                        "reason": {
                                          "type": "object",
                                          "properties": {
                                            "code": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 120
                                            },
                                            "message": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 1000
                                            },
                                            "retryable": {
                                              "type": "boolean"
                                            },
                                            "recovery_action": {
                                              "oneOf": [
                                                {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 500
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "code",
                                            "message",
                                            "retryable",
                                            "recovery_action"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "consumer",
                                        "state",
                                        "propagated_at",
                                        "reason"
                                      ]
                                    }
                                  ]
                                }
                              },
                              "server_timestamp": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "correlation_id": {
                                "type": "string",
                                "minLength": 8,
                                "maxLength": 200
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "superseded"
                                ]
                              },
                              "reason": {
                                "type": "object",
                                "properties": {
                                  "code": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 120
                                  },
                                  "message": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 1000
                                  },
                                  "retryable": {
                                    "type": "boolean"
                                  },
                                  "recovery_action": {
                                    "oneOf": [
                                      {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 500
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "code",
                                  "message",
                                  "retryable",
                                  "recovery_action"
                                ]
                              }
                            },
                            "required": [
                              "schema_version",
                              "receipt_id",
                              "entity",
                              "scope",
                              "actor_user_id",
                              "consumers",
                              "server_timestamp",
                              "correlation_id",
                              "status",
                              "reason"
                            ]
                          }
                        ]
                      }
                    },
                    "required": [
                      "id",
                      "receipt_version",
                      "phase",
                      "status",
                      "media_id",
                      "binding_kind",
                      "target_id",
                      "rights_policy_version",
                      "preflight_receipt_id",
                      "expires_at",
                      "occurred_at"
                    ]
                  }
                }
              },
              "required": [
                "id",
                "binding_kind",
                "target_id",
                "moderation_status",
                "processing_status",
                "rejection_reason",
                "public_url",
                "submitted_at",
                "updated_at",
                "version",
                "etag",
                "rights_policy_version",
                "receipts"
              ]
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "ConsumerMediaRightsPolicy": {
        "type": "object",
        "properties": {
          "policy_version": {
            "type": "string",
            "pattern": "^consumer-media-rights-(v1|r[1-9]\\d*)$"
          },
          "binding_kind": {
            "type": "string",
            "enum": [
              "team_logo",
              "player_photo",
              "match_media"
            ]
          },
          "target_id": {
            "type": "string",
            "format": "uuid"
          },
          "rights_basis": {
            "type": "string",
            "enum": [
              "team_captain_attestation",
              "player_self_attestation",
              "team_match_attestation"
            ]
          },
          "effective_at": {
            "type": "string",
            "format": "date-time"
          },
          "server_time": {
            "type": "string",
            "format": "date-time"
          },
          "server_timezone": {
            "type": "string",
            "enum": [
              "UTC"
            ]
          },
          "required_attestations": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            },
            "minItems": 1
          },
          "allowed_mime_types": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "image/jpeg",
                "image/png",
                "image/webp",
                "image/avif",
                "video/mp4",
                "video/quicktime"
              ]
            }
          },
          "max_upload_bytes": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "policy_version",
          "binding_kind",
          "target_id",
          "rights_basis",
          "effective_at",
          "server_time",
          "server_timezone",
          "required_attestations",
          "allowed_mime_types",
          "max_upload_bytes"
        ]
      },
      "ConsumerMediaPreflightRequest": {
        "type": "object",
        "properties": {
          "binding_kind": {
            "type": "string",
            "enum": [
              "team_logo",
              "player_photo",
              "match_media"
            ]
          },
          "target_id": {
            "type": "string",
            "format": "uuid"
          },
          "filename": {
            "type": "string",
            "minLength": 1,
            "maxLength": 240
          },
          "mime_type": {
            "type": "string",
            "enum": [
              "image/jpeg",
              "image/png",
              "image/webp",
              "image/avif",
              "video/mp4",
              "video/quicktime"
            ]
          },
          "byte_size": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "content_sha256": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "idempotency_key": {
            "type": "string",
            "minLength": 8,
            "maxLength": 200
          },
          "rights_attested": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "rights_policy_version": {
            "type": "string",
            "pattern": "^consumer-media-rights-(v1|r[1-9]\\d*)$"
          }
        },
        "required": [
          "binding_kind",
          "target_id",
          "filename",
          "mime_type",
          "byte_size",
          "content_sha256",
          "idempotency_key",
          "rights_attested",
          "rights_policy_version"
        ]
      },
      "ConsumerMediaPreflightResponse": {
        "type": "object",
        "properties": {
          "policy": {
            "type": "object",
            "properties": {
              "policy_version": {
                "type": "string",
                "pattern": "^consumer-media-rights-(v1|r[1-9]\\d*)$"
              },
              "binding_kind": {
                "type": "string",
                "enum": [
                  "team_logo",
                  "player_photo",
                  "match_media"
                ]
              },
              "target_id": {
                "type": "string",
                "format": "uuid"
              },
              "rights_basis": {
                "type": "string",
                "enum": [
                  "team_captain_attestation",
                  "player_self_attestation",
                  "team_match_attestation"
                ]
              },
              "effective_at": {
                "type": "string",
                "format": "date-time"
              },
              "server_time": {
                "type": "string",
                "format": "date-time"
              },
              "server_timezone": {
                "type": "string",
                "enum": [
                  "UTC"
                ]
              },
              "required_attestations": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                },
                "minItems": 1
              },
              "allowed_mime_types": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "image/jpeg",
                    "image/png",
                    "image/webp",
                    "image/avif",
                    "video/mp4",
                    "video/quicktime"
                  ]
                }
              },
              "max_upload_bytes": {
                "type": "integer",
                "exclusiveMinimum": 0
              }
            },
            "required": [
              "policy_version",
              "binding_kind",
              "target_id",
              "rights_basis",
              "effective_at",
              "server_time",
              "server_timezone",
              "required_attestations",
              "allowed_mime_types",
              "max_upload_bytes"
            ]
          },
          "receipt": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "receipt_version": {
                "type": "number",
                "enum": [
                  1
                ]
              },
              "phase": {
                "type": "string",
                "enum": [
                  "preflight",
                  "upload",
                  "processing",
                  "moderation",
                  "withdrawal"
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "accepted",
                  "queued",
                  "processing",
                  "ready",
                  "failed",
                  "approved",
                  "rejected",
                  "taken_down",
                  "withdrawn"
                ]
              },
              "media_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "binding_kind": {
                "type": "string",
                "enum": [
                  "team_logo",
                  "player_photo",
                  "match_media"
                ]
              },
              "target_id": {
                "type": "string",
                "format": "uuid"
              },
              "rights_policy_version": {
                "type": "string",
                "minLength": 1,
                "maxLength": 64
              },
              "preflight_receipt_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "expires_at": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "occurred_at": {
                "type": "string",
                "format": "date-time"
              },
              "truth_receipt": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "schema_version": {
                        "type": "number",
                        "enum": [
                          1
                        ]
                      },
                      "receipt_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "entity": {
                        "type": "object",
                        "properties": {
                          "entity_type": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 120
                          },
                          "entity_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "entity_version": {
                            "oneOf": [
                              {
                                "type": "integer",
                                "minimum": 0
                              },
                              {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 200
                              }
                            ]
                          }
                        },
                        "required": [
                          "entity_type",
                          "entity_id",
                          "entity_version"
                        ]
                      },
                      "scope": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "schema_version": {
                                "type": "number",
                                "enum": [
                                  1
                                ]
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "tenant"
                                ]
                              },
                              "tenant_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "league_id": {
                                "type": "null"
                              },
                              "match_id": {
                                "type": "null"
                              }
                            },
                            "required": [
                              "schema_version",
                              "kind",
                              "tenant_id",
                              "league_id",
                              "match_id"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "schema_version": {
                                "type": "number",
                                "enum": [
                                  1
                                ]
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "league"
                                ]
                              },
                              "tenant_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "league_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "match_id": {
                                "type": "null"
                              }
                            },
                            "required": [
                              "schema_version",
                              "kind",
                              "tenant_id",
                              "league_id",
                              "match_id"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "schema_version": {
                                "type": "number",
                                "enum": [
                                  1
                                ]
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "match"
                                ]
                              },
                              "tenant_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "league_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "match_id": {
                                "type": "string",
                                "format": "uuid"
                              }
                            },
                            "required": [
                              "schema_version",
                              "kind",
                              "tenant_id",
                              "league_id",
                              "match_id"
                            ]
                          }
                        ]
                      },
                      "actor_user_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "consumers": {
                        "type": "array",
                        "items": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "consumer": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "state": {
                                  "type": "string",
                                  "enum": [
                                    "pending"
                                  ]
                                },
                                "propagated_at": {
                                  "type": "null"
                                },
                                "reason": {
                                  "type": "null"
                                }
                              },
                              "required": [
                                "consumer",
                                "state",
                                "propagated_at",
                                "reason"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "consumer": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "state": {
                                  "type": "string",
                                  "enum": [
                                    "applied"
                                  ]
                                },
                                "propagated_at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "reason": {
                                  "type": "null"
                                }
                              },
                              "required": [
                                "consumer",
                                "state",
                                "propagated_at",
                                "reason"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "consumer": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "state": {
                                  "type": "string",
                                  "enum": [
                                    "failed"
                                  ]
                                },
                                "propagated_at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "reason": {
                                  "type": "object",
                                  "properties": {
                                    "code": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 120
                                    },
                                    "message": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 1000
                                    },
                                    "retryable": {
                                      "type": "boolean"
                                    },
                                    "recovery_action": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 500
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "code",
                                    "message",
                                    "retryable",
                                    "recovery_action"
                                  ]
                                }
                              },
                              "required": [
                                "consumer",
                                "state",
                                "propagated_at",
                                "reason"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "consumer": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "state": {
                                  "type": "string",
                                  "enum": [
                                    "not_applicable"
                                  ]
                                },
                                "propagated_at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "reason": {
                                  "type": "object",
                                  "properties": {
                                    "code": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 120
                                    },
                                    "message": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 1000
                                    },
                                    "retryable": {
                                      "type": "boolean"
                                    },
                                    "recovery_action": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 500
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "code",
                                    "message",
                                    "retryable",
                                    "recovery_action"
                                  ]
                                }
                              },
                              "required": [
                                "consumer",
                                "state",
                                "propagated_at",
                                "reason"
                              ]
                            }
                          ]
                        }
                      },
                      "server_timestamp": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "correlation_id": {
                        "type": "string",
                        "minLength": 8,
                        "maxLength": 200
                      },
                      "status": {
                        "type": "string",
                        "enum": [
                          "queued"
                        ]
                      },
                      "reason": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 120
                              },
                              "message": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1000
                              },
                              "retryable": {
                                "type": "boolean"
                              },
                              "recovery_action": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 500
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "code",
                              "message",
                              "retryable",
                              "recovery_action"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "schema_version",
                      "receipt_id",
                      "entity",
                      "scope",
                      "actor_user_id",
                      "consumers",
                      "server_timestamp",
                      "correlation_id",
                      "status",
                      "reason"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "schema_version": {
                        "type": "number",
                        "enum": [
                          1
                        ]
                      },
                      "receipt_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "entity": {
                        "type": "object",
                        "properties": {
                          "entity_type": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 120
                          },
                          "entity_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "entity_version": {
                            "oneOf": [
                              {
                                "type": "integer",
                                "minimum": 0
                              },
                              {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 200
                              }
                            ]
                          }
                        },
                        "required": [
                          "entity_type",
                          "entity_id",
                          "entity_version"
                        ]
                      },
                      "scope": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "schema_version": {
                                "type": "number",
                                "enum": [
                                  1
                                ]
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "tenant"
                                ]
                              },
                              "tenant_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "league_id": {
                                "type": "null"
                              },
                              "match_id": {
                                "type": "null"
                              }
                            },
                            "required": [
                              "schema_version",
                              "kind",
                              "tenant_id",
                              "league_id",
                              "match_id"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "schema_version": {
                                "type": "number",
                                "enum": [
                                  1
                                ]
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "league"
                                ]
                              },
                              "tenant_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "league_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "match_id": {
                                "type": "null"
                              }
                            },
                            "required": [
                              "schema_version",
                              "kind",
                              "tenant_id",
                              "league_id",
                              "match_id"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "schema_version": {
                                "type": "number",
                                "enum": [
                                  1
                                ]
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "match"
                                ]
                              },
                              "tenant_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "league_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "match_id": {
                                "type": "string",
                                "format": "uuid"
                              }
                            },
                            "required": [
                              "schema_version",
                              "kind",
                              "tenant_id",
                              "league_id",
                              "match_id"
                            ]
                          }
                        ]
                      },
                      "actor_user_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "consumers": {
                        "type": "array",
                        "items": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "consumer": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "state": {
                                  "type": "string",
                                  "enum": [
                                    "pending"
                                  ]
                                },
                                "propagated_at": {
                                  "type": "null"
                                },
                                "reason": {
                                  "type": "null"
                                }
                              },
                              "required": [
                                "consumer",
                                "state",
                                "propagated_at",
                                "reason"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "consumer": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "state": {
                                  "type": "string",
                                  "enum": [
                                    "applied"
                                  ]
                                },
                                "propagated_at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "reason": {
                                  "type": "null"
                                }
                              },
                              "required": [
                                "consumer",
                                "state",
                                "propagated_at",
                                "reason"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "consumer": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "state": {
                                  "type": "string",
                                  "enum": [
                                    "failed"
                                  ]
                                },
                                "propagated_at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "reason": {
                                  "type": "object",
                                  "properties": {
                                    "code": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 120
                                    },
                                    "message": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 1000
                                    },
                                    "retryable": {
                                      "type": "boolean"
                                    },
                                    "recovery_action": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 500
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "code",
                                    "message",
                                    "retryable",
                                    "recovery_action"
                                  ]
                                }
                              },
                              "required": [
                                "consumer",
                                "state",
                                "propagated_at",
                                "reason"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "consumer": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "state": {
                                  "type": "string",
                                  "enum": [
                                    "not_applicable"
                                  ]
                                },
                                "propagated_at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "reason": {
                                  "type": "object",
                                  "properties": {
                                    "code": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 120
                                    },
                                    "message": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 1000
                                    },
                                    "retryable": {
                                      "type": "boolean"
                                    },
                                    "recovery_action": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 500
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "code",
                                    "message",
                                    "retryable",
                                    "recovery_action"
                                  ]
                                }
                              },
                              "required": [
                                "consumer",
                                "state",
                                "propagated_at",
                                "reason"
                              ]
                            }
                          ]
                        }
                      },
                      "server_timestamp": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "correlation_id": {
                        "type": "string",
                        "minLength": 8,
                        "maxLength": 200
                      },
                      "status": {
                        "type": "string",
                        "enum": [
                          "accepted"
                        ]
                      },
                      "reason": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 120
                              },
                              "message": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1000
                              },
                              "retryable": {
                                "type": "boolean"
                              },
                              "recovery_action": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 500
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "code",
                              "message",
                              "retryable",
                              "recovery_action"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "schema_version",
                      "receipt_id",
                      "entity",
                      "scope",
                      "actor_user_id",
                      "consumers",
                      "server_timestamp",
                      "correlation_id",
                      "status",
                      "reason"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "schema_version": {
                        "type": "number",
                        "enum": [
                          1
                        ]
                      },
                      "receipt_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "entity": {
                        "type": "object",
                        "properties": {
                          "entity_type": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 120
                          },
                          "entity_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "entity_version": {
                            "oneOf": [
                              {
                                "type": "integer",
                                "minimum": 0
                              },
                              {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 200
                              }
                            ]
                          }
                        },
                        "required": [
                          "entity_type",
                          "entity_id",
                          "entity_version"
                        ]
                      },
                      "scope": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "schema_version": {
                                "type": "number",
                                "enum": [
                                  1
                                ]
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "tenant"
                                ]
                              },
                              "tenant_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "league_id": {
                                "type": "null"
                              },
                              "match_id": {
                                "type": "null"
                              }
                            },
                            "required": [
                              "schema_version",
                              "kind",
                              "tenant_id",
                              "league_id",
                              "match_id"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "schema_version": {
                                "type": "number",
                                "enum": [
                                  1
                                ]
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "league"
                                ]
                              },
                              "tenant_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "league_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "match_id": {
                                "type": "null"
                              }
                            },
                            "required": [
                              "schema_version",
                              "kind",
                              "tenant_id",
                              "league_id",
                              "match_id"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "schema_version": {
                                "type": "number",
                                "enum": [
                                  1
                                ]
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "match"
                                ]
                              },
                              "tenant_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "league_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "match_id": {
                                "type": "string",
                                "format": "uuid"
                              }
                            },
                            "required": [
                              "schema_version",
                              "kind",
                              "tenant_id",
                              "league_id",
                              "match_id"
                            ]
                          }
                        ]
                      },
                      "actor_user_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "consumers": {
                        "type": "array",
                        "items": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "consumer": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "state": {
                                  "type": "string",
                                  "enum": [
                                    "pending"
                                  ]
                                },
                                "propagated_at": {
                                  "type": "null"
                                },
                                "reason": {
                                  "type": "null"
                                }
                              },
                              "required": [
                                "consumer",
                                "state",
                                "propagated_at",
                                "reason"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "consumer": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "state": {
                                  "type": "string",
                                  "enum": [
                                    "applied"
                                  ]
                                },
                                "propagated_at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "reason": {
                                  "type": "null"
                                }
                              },
                              "required": [
                                "consumer",
                                "state",
                                "propagated_at",
                                "reason"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "consumer": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "state": {
                                  "type": "string",
                                  "enum": [
                                    "failed"
                                  ]
                                },
                                "propagated_at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "reason": {
                                  "type": "object",
                                  "properties": {
                                    "code": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 120
                                    },
                                    "message": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 1000
                                    },
                                    "retryable": {
                                      "type": "boolean"
                                    },
                                    "recovery_action": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 500
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "code",
                                    "message",
                                    "retryable",
                                    "recovery_action"
                                  ]
                                }
                              },
                              "required": [
                                "consumer",
                                "state",
                                "propagated_at",
                                "reason"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "consumer": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "state": {
                                  "type": "string",
                                  "enum": [
                                    "not_applicable"
                                  ]
                                },
                                "propagated_at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "reason": {
                                  "type": "object",
                                  "properties": {
                                    "code": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 120
                                    },
                                    "message": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 1000
                                    },
                                    "retryable": {
                                      "type": "boolean"
                                    },
                                    "recovery_action": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 500
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "code",
                                    "message",
                                    "retryable",
                                    "recovery_action"
                                  ]
                                }
                              },
                              "required": [
                                "consumer",
                                "state",
                                "propagated_at",
                                "reason"
                              ]
                            }
                          ]
                        }
                      },
                      "server_timestamp": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "correlation_id": {
                        "type": "string",
                        "minLength": 8,
                        "maxLength": 200
                      },
                      "status": {
                        "type": "string",
                        "enum": [
                          "rejected"
                        ]
                      },
                      "reason": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 120
                          },
                          "message": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 1000
                          },
                          "retryable": {
                            "type": "boolean"
                          },
                          "recovery_action": {
                            "oneOf": [
                              {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 500
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "code",
                          "message",
                          "retryable",
                          "recovery_action"
                        ]
                      }
                    },
                    "required": [
                      "schema_version",
                      "receipt_id",
                      "entity",
                      "scope",
                      "actor_user_id",
                      "consumers",
                      "server_timestamp",
                      "correlation_id",
                      "status",
                      "reason"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "schema_version": {
                        "type": "number",
                        "enum": [
                          1
                        ]
                      },
                      "receipt_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "entity": {
                        "type": "object",
                        "properties": {
                          "entity_type": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 120
                          },
                          "entity_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "entity_version": {
                            "oneOf": [
                              {
                                "type": "integer",
                                "minimum": 0
                              },
                              {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 200
                              }
                            ]
                          }
                        },
                        "required": [
                          "entity_type",
                          "entity_id",
                          "entity_version"
                        ]
                      },
                      "scope": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "schema_version": {
                                "type": "number",
                                "enum": [
                                  1
                                ]
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "tenant"
                                ]
                              },
                              "tenant_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "league_id": {
                                "type": "null"
                              },
                              "match_id": {
                                "type": "null"
                              }
                            },
                            "required": [
                              "schema_version",
                              "kind",
                              "tenant_id",
                              "league_id",
                              "match_id"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "schema_version": {
                                "type": "number",
                                "enum": [
                                  1
                                ]
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "league"
                                ]
                              },
                              "tenant_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "league_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "match_id": {
                                "type": "null"
                              }
                            },
                            "required": [
                              "schema_version",
                              "kind",
                              "tenant_id",
                              "league_id",
                              "match_id"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "schema_version": {
                                "type": "number",
                                "enum": [
                                  1
                                ]
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "match"
                                ]
                              },
                              "tenant_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "league_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "match_id": {
                                "type": "string",
                                "format": "uuid"
                              }
                            },
                            "required": [
                              "schema_version",
                              "kind",
                              "tenant_id",
                              "league_id",
                              "match_id"
                            ]
                          }
                        ]
                      },
                      "actor_user_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "consumers": {
                        "type": "array",
                        "items": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "consumer": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "state": {
                                  "type": "string",
                                  "enum": [
                                    "pending"
                                  ]
                                },
                                "propagated_at": {
                                  "type": "null"
                                },
                                "reason": {
                                  "type": "null"
                                }
                              },
                              "required": [
                                "consumer",
                                "state",
                                "propagated_at",
                                "reason"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "consumer": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "state": {
                                  "type": "string",
                                  "enum": [
                                    "applied"
                                  ]
                                },
                                "propagated_at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "reason": {
                                  "type": "null"
                                }
                              },
                              "required": [
                                "consumer",
                                "state",
                                "propagated_at",
                                "reason"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "consumer": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "state": {
                                  "type": "string",
                                  "enum": [
                                    "failed"
                                  ]
                                },
                                "propagated_at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "reason": {
                                  "type": "object",
                                  "properties": {
                                    "code": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 120
                                    },
                                    "message": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 1000
                                    },
                                    "retryable": {
                                      "type": "boolean"
                                    },
                                    "recovery_action": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 500
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "code",
                                    "message",
                                    "retryable",
                                    "recovery_action"
                                  ]
                                }
                              },
                              "required": [
                                "consumer",
                                "state",
                                "propagated_at",
                                "reason"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "consumer": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "state": {
                                  "type": "string",
                                  "enum": [
                                    "not_applicable"
                                  ]
                                },
                                "propagated_at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "reason": {
                                  "type": "object",
                                  "properties": {
                                    "code": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 120
                                    },
                                    "message": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 1000
                                    },
                                    "retryable": {
                                      "type": "boolean"
                                    },
                                    "recovery_action": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 500
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "code",
                                    "message",
                                    "retryable",
                                    "recovery_action"
                                  ]
                                }
                              },
                              "required": [
                                "consumer",
                                "state",
                                "propagated_at",
                                "reason"
                              ]
                            }
                          ]
                        }
                      },
                      "server_timestamp": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "correlation_id": {
                        "type": "string",
                        "minLength": 8,
                        "maxLength": 200
                      },
                      "status": {
                        "type": "string",
                        "enum": [
                          "superseded"
                        ]
                      },
                      "reason": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 120
                          },
                          "message": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 1000
                          },
                          "retryable": {
                            "type": "boolean"
                          },
                          "recovery_action": {
                            "oneOf": [
                              {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 500
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "code",
                          "message",
                          "retryable",
                          "recovery_action"
                        ]
                      }
                    },
                    "required": [
                      "schema_version",
                      "receipt_id",
                      "entity",
                      "scope",
                      "actor_user_id",
                      "consumers",
                      "server_timestamp",
                      "correlation_id",
                      "status",
                      "reason"
                    ]
                  }
                ]
              }
            },
            "required": [
              "id",
              "receipt_version",
              "phase",
              "status",
              "media_id",
              "binding_kind",
              "target_id",
              "rights_policy_version",
              "preflight_receipt_id",
              "expires_at",
              "occurred_at"
            ]
          }
        },
        "required": [
          "policy",
          "receipt"
        ]
      },
      "ConsumerMediaReceipt": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "receipt_version": {
            "type": "number",
            "enum": [
              1
            ]
          },
          "phase": {
            "type": "string",
            "enum": [
              "preflight",
              "upload",
              "processing",
              "moderation",
              "withdrawal"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "accepted",
              "queued",
              "processing",
              "ready",
              "failed",
              "approved",
              "rejected",
              "taken_down",
              "withdrawn"
            ]
          },
          "media_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "binding_kind": {
            "type": "string",
            "enum": [
              "team_logo",
              "player_photo",
              "match_media"
            ]
          },
          "target_id": {
            "type": "string",
            "format": "uuid"
          },
          "rights_policy_version": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "preflight_receipt_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "expires_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "occurred_at": {
            "type": "string",
            "format": "date-time"
          },
          "truth_receipt": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "schema_version": {
                    "type": "number",
                    "enum": [
                      1
                    ]
                  },
                  "receipt_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "entity": {
                    "type": "object",
                    "properties": {
                      "entity_type": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "entity_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "entity_version": {
                        "oneOf": [
                          {
                            "type": "integer",
                            "minimum": 0
                          },
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          }
                        ]
                      }
                    },
                    "required": [
                      "entity_type",
                      "entity_id",
                      "entity_version"
                    ]
                  },
                  "scope": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "tenant"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "null"
                          },
                          "match_id": {
                            "type": "null"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "league"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "match_id": {
                            "type": "null"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "match"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "match_id": {
                            "type": "string",
                            "format": "uuid"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      }
                    ]
                  },
                  "actor_user_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "consumers": {
                    "type": "array",
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "pending"
                              ]
                            },
                            "propagated_at": {
                              "type": "null"
                            },
                            "reason": {
                              "type": "null"
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "applied"
                              ]
                            },
                            "propagated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "reason": {
                              "type": "null"
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "failed"
                              ]
                            },
                            "propagated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "reason": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "message": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1000
                                },
                                "retryable": {
                                  "type": "boolean"
                                },
                                "recovery_action": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 500
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "code",
                                "message",
                                "retryable",
                                "recovery_action"
                              ]
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "not_applicable"
                              ]
                            },
                            "propagated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "reason": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "message": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1000
                                },
                                "retryable": {
                                  "type": "boolean"
                                },
                                "recovery_action": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 500
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "code",
                                "message",
                                "retryable",
                                "recovery_action"
                              ]
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        }
                      ]
                    }
                  },
                  "server_timestamp": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "correlation_id": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 200
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "queued"
                    ]
                  },
                  "reason": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 120
                          },
                          "message": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 1000
                          },
                          "retryable": {
                            "type": "boolean"
                          },
                          "recovery_action": {
                            "oneOf": [
                              {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 500
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "code",
                          "message",
                          "retryable",
                          "recovery_action"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "schema_version",
                  "receipt_id",
                  "entity",
                  "scope",
                  "actor_user_id",
                  "consumers",
                  "server_timestamp",
                  "correlation_id",
                  "status",
                  "reason"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "schema_version": {
                    "type": "number",
                    "enum": [
                      1
                    ]
                  },
                  "receipt_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "entity": {
                    "type": "object",
                    "properties": {
                      "entity_type": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "entity_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "entity_version": {
                        "oneOf": [
                          {
                            "type": "integer",
                            "minimum": 0
                          },
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          }
                        ]
                      }
                    },
                    "required": [
                      "entity_type",
                      "entity_id",
                      "entity_version"
                    ]
                  },
                  "scope": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "tenant"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "null"
                          },
                          "match_id": {
                            "type": "null"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "league"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "match_id": {
                            "type": "null"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "match"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "match_id": {
                            "type": "string",
                            "format": "uuid"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      }
                    ]
                  },
                  "actor_user_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "consumers": {
                    "type": "array",
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "pending"
                              ]
                            },
                            "propagated_at": {
                              "type": "null"
                            },
                            "reason": {
                              "type": "null"
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "applied"
                              ]
                            },
                            "propagated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "reason": {
                              "type": "null"
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "failed"
                              ]
                            },
                            "propagated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "reason": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "message": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1000
                                },
                                "retryable": {
                                  "type": "boolean"
                                },
                                "recovery_action": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 500
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "code",
                                "message",
                                "retryable",
                                "recovery_action"
                              ]
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "not_applicable"
                              ]
                            },
                            "propagated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "reason": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "message": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1000
                                },
                                "retryable": {
                                  "type": "boolean"
                                },
                                "recovery_action": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 500
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "code",
                                "message",
                                "retryable",
                                "recovery_action"
                              ]
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        }
                      ]
                    }
                  },
                  "server_timestamp": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "correlation_id": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 200
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "accepted"
                    ]
                  },
                  "reason": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 120
                          },
                          "message": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 1000
                          },
                          "retryable": {
                            "type": "boolean"
                          },
                          "recovery_action": {
                            "oneOf": [
                              {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 500
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "code",
                          "message",
                          "retryable",
                          "recovery_action"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "schema_version",
                  "receipt_id",
                  "entity",
                  "scope",
                  "actor_user_id",
                  "consumers",
                  "server_timestamp",
                  "correlation_id",
                  "status",
                  "reason"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "schema_version": {
                    "type": "number",
                    "enum": [
                      1
                    ]
                  },
                  "receipt_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "entity": {
                    "type": "object",
                    "properties": {
                      "entity_type": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "entity_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "entity_version": {
                        "oneOf": [
                          {
                            "type": "integer",
                            "minimum": 0
                          },
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          }
                        ]
                      }
                    },
                    "required": [
                      "entity_type",
                      "entity_id",
                      "entity_version"
                    ]
                  },
                  "scope": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "tenant"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "null"
                          },
                          "match_id": {
                            "type": "null"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "league"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "match_id": {
                            "type": "null"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "match"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "match_id": {
                            "type": "string",
                            "format": "uuid"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      }
                    ]
                  },
                  "actor_user_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "consumers": {
                    "type": "array",
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "pending"
                              ]
                            },
                            "propagated_at": {
                              "type": "null"
                            },
                            "reason": {
                              "type": "null"
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "applied"
                              ]
                            },
                            "propagated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "reason": {
                              "type": "null"
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "failed"
                              ]
                            },
                            "propagated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "reason": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "message": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1000
                                },
                                "retryable": {
                                  "type": "boolean"
                                },
                                "recovery_action": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 500
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "code",
                                "message",
                                "retryable",
                                "recovery_action"
                              ]
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "not_applicable"
                              ]
                            },
                            "propagated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "reason": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "message": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1000
                                },
                                "retryable": {
                                  "type": "boolean"
                                },
                                "recovery_action": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 500
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "code",
                                "message",
                                "retryable",
                                "recovery_action"
                              ]
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        }
                      ]
                    }
                  },
                  "server_timestamp": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "correlation_id": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 200
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "rejected"
                    ]
                  },
                  "reason": {
                    "type": "object",
                    "properties": {
                      "code": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "message": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 1000
                      },
                      "retryable": {
                        "type": "boolean"
                      },
                      "recovery_action": {
                        "oneOf": [
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 500
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "code",
                      "message",
                      "retryable",
                      "recovery_action"
                    ]
                  }
                },
                "required": [
                  "schema_version",
                  "receipt_id",
                  "entity",
                  "scope",
                  "actor_user_id",
                  "consumers",
                  "server_timestamp",
                  "correlation_id",
                  "status",
                  "reason"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "schema_version": {
                    "type": "number",
                    "enum": [
                      1
                    ]
                  },
                  "receipt_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "entity": {
                    "type": "object",
                    "properties": {
                      "entity_type": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "entity_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "entity_version": {
                        "oneOf": [
                          {
                            "type": "integer",
                            "minimum": 0
                          },
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          }
                        ]
                      }
                    },
                    "required": [
                      "entity_type",
                      "entity_id",
                      "entity_version"
                    ]
                  },
                  "scope": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "tenant"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "null"
                          },
                          "match_id": {
                            "type": "null"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "league"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "match_id": {
                            "type": "null"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "match"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "match_id": {
                            "type": "string",
                            "format": "uuid"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      }
                    ]
                  },
                  "actor_user_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "consumers": {
                    "type": "array",
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "pending"
                              ]
                            },
                            "propagated_at": {
                              "type": "null"
                            },
                            "reason": {
                              "type": "null"
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "applied"
                              ]
                            },
                            "propagated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "reason": {
                              "type": "null"
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "failed"
                              ]
                            },
                            "propagated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "reason": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "message": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1000
                                },
                                "retryable": {
                                  "type": "boolean"
                                },
                                "recovery_action": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 500
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "code",
                                "message",
                                "retryable",
                                "recovery_action"
                              ]
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "not_applicable"
                              ]
                            },
                            "propagated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "reason": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "message": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1000
                                },
                                "retryable": {
                                  "type": "boolean"
                                },
                                "recovery_action": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 500
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "code",
                                "message",
                                "retryable",
                                "recovery_action"
                              ]
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        }
                      ]
                    }
                  },
                  "server_timestamp": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "correlation_id": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 200
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "superseded"
                    ]
                  },
                  "reason": {
                    "type": "object",
                    "properties": {
                      "code": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "message": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 1000
                      },
                      "retryable": {
                        "type": "boolean"
                      },
                      "recovery_action": {
                        "oneOf": [
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 500
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "code",
                      "message",
                      "retryable",
                      "recovery_action"
                    ]
                  }
                },
                "required": [
                  "schema_version",
                  "receipt_id",
                  "entity",
                  "scope",
                  "actor_user_id",
                  "consumers",
                  "server_timestamp",
                  "correlation_id",
                  "status",
                  "reason"
                ]
              }
            ]
          }
        },
        "required": [
          "id",
          "receipt_version",
          "phase",
          "status",
          "media_id",
          "binding_kind",
          "target_id",
          "rights_policy_version",
          "preflight_receipt_id",
          "expires_at",
          "occurred_at"
        ]
      },
      "ConsumerMediaWithdrawRequest": {
        "type": "object",
        "properties": {
          "idempotency_key": {
            "type": "string",
            "minLength": 8,
            "maxLength": 200
          },
          "reason": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1000
          }
        },
        "required": [
          "idempotency_key",
          "reason"
        ]
      },
      "MediaTagRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "media_id": {
            "type": "string",
            "format": "uuid"
          },
          "subject_kind": {
            "type": "string",
            "enum": [
              "player",
              "team",
              "match"
            ]
          },
          "subject_id": {
            "type": "string",
            "minLength": 1
          },
          "consent_status": {
            "type": "string",
            "enum": [
              "pending",
              "granted",
              "denied",
              "revoked"
            ]
          },
          "consent_evidence_ref": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "consent_evidence_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "tagged_by": {
            "type": "string",
            "format": "uuid"
          },
          "removed_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "removed_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "removal_reason": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "updated_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "tenant_id",
          "media_id",
          "subject_kind",
          "subject_id",
          "consent_status",
          "consent_evidence_ref",
          "tagged_by",
          "removed_at",
          "removed_by",
          "removal_reason",
          "created_at",
          "updated_at",
          "created_by",
          "updated_by"
        ]
      },
      "MeMediaTagConsentRow": {
        "type": "object",
        "properties": {
          "tag_id": {
            "type": "string",
            "format": "uuid"
          },
          "media_id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "type": "string",
            "enum": [
              "image",
              "video",
              "document"
            ]
          },
          "content_kind": {
            "type": "string",
            "enum": [
              "image",
              "video",
              "document"
            ]
          },
          "asset_url": {
            "type": "string",
            "format": "uri"
          },
          "thumbnail_url": {
            "oneOf": [
              {
                "type": "string",
                "format": "uri"
              },
              {
                "type": "null"
              }
            ]
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "caption": {
            "oneOf": [
              {
                "type": "string",
                "maxLength": 1000
              },
              {
                "type": "null"
              }
            ]
          },
          "captured_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "consent_status": {
            "type": "string",
            "enum": [
              "pending",
              "granted",
              "denied",
              "revoked"
            ]
          },
          "is_publicly_available": {
            "type": "boolean"
          },
          "can_publish": {
            "type": "boolean"
          },
          "tagged_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "tag_id",
          "media_id",
          "kind",
          "content_kind",
          "asset_url",
          "thumbnail_url",
          "title",
          "caption",
          "captured_at",
          "consent_status",
          "is_publicly_available",
          "can_publish",
          "tagged_at",
          "updated_at"
        ]
      },
      "MeMediaTagConsentList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "tag_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "media_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "image",
                    "video",
                    "document"
                  ]
                },
                "content_kind": {
                  "type": "string",
                  "enum": [
                    "image",
                    "video",
                    "document"
                  ]
                },
                "asset_url": {
                  "type": "string",
                  "format": "uri"
                },
                "thumbnail_url": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uri"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "title": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "caption": {
                  "oneOf": [
                    {
                      "type": "string",
                      "maxLength": 1000
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "captured_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "consent_status": {
                  "type": "string",
                  "enum": [
                    "pending",
                    "granted",
                    "denied",
                    "revoked"
                  ]
                },
                "is_publicly_available": {
                  "type": "boolean"
                },
                "can_publish": {
                  "type": "boolean"
                },
                "tagged_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "tag_id",
                "media_id",
                "kind",
                "content_kind",
                "asset_url",
                "thumbnail_url",
                "title",
                "caption",
                "captured_at",
                "consent_status",
                "is_publicly_available",
                "can_publish",
                "tagged_at",
                "updated_at"
              ]
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "MeMediaTagConsentUpdateRequest": {
        "type": "object",
        "properties": {
          "granted": {
            "type": "boolean"
          }
        },
        "required": [
          "granted"
        ]
      },
      "MediaTagAddRequest": {
        "type": "object",
        "properties": {
          "subject_kind": {
            "type": "string",
            "enum": [
              "player",
              "team",
              "match"
            ]
          },
          "subject_id": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "subject_kind",
          "subject_id"
        ]
      },
      "MediaTagRemoveRequest": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "reason"
        ]
      },
      "MediaModerationDecideRequest": {
        "type": "object",
        "properties": {
          "decision": {
            "type": "string",
            "enum": [
              "approved",
              "rejected",
              "taken_down"
            ]
          },
          "reason": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "public_title": {
            "oneOf": [
              {
                "type": "string",
                "maxLength": 200
              },
              {
                "type": "null"
              }
            ]
          },
          "public_caption": {
            "oneOf": [
              {
                "type": "string",
                "maxLength": 1000
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "decision",
          "reason"
        ]
      },
      "FeedPostRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "type": "string",
            "enum": [
              "match.result",
              "match.mvp",
              "standings.update",
              "fantasy.top",
              "media.published",
              "sponsor.campaign"
            ]
          },
          "source_event_id": {
            "type": "string",
            "minLength": 1
          },
          "subject_match_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "subject_team_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "subject_player_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "body": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2000
          },
          "target_href": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "hidden"
            ]
          },
          "published_at": {
            "type": "string",
            "format": "date-time"
          },
          "hidden_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "hidden_reason": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "updated_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "tenant_id",
          "kind",
          "source_event_id",
          "subject_match_id",
          "subject_team_id",
          "subject_player_id",
          "body",
          "status",
          "published_at",
          "hidden_at",
          "hidden_reason",
          "created_at",
          "updated_at",
          "created_by",
          "updated_by"
        ]
      },
      "FeedPostList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "tenant_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "match.result",
                    "match.mvp",
                    "standings.update",
                    "fantasy.top",
                    "media.published",
                    "sponsor.campaign"
                  ]
                },
                "source_event_id": {
                  "type": "string",
                  "minLength": 1
                },
                "subject_match_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "subject_team_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "subject_player_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "body": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 2000
                },
                "target_href": {
                  "oneOf": [
                    {
                      "type": "string",
                      "minLength": 1
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "active",
                    "hidden"
                  ]
                },
                "published_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "hidden_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "hidden_reason": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "created_by": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "updated_by": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "tenant_id",
                "kind",
                "source_event_id",
                "subject_match_id",
                "subject_team_id",
                "subject_player_id",
                "body",
                "status",
                "published_at",
                "hidden_at",
                "hidden_reason",
                "created_at",
                "updated_at",
                "created_by",
                "updated_by"
              ]
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "FeedGenerateRequest": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "match.result",
              "match.mvp",
              "standings.update",
              "fantasy.top",
              "media.published",
              "sponsor.campaign"
            ]
          },
          "source_id": {
            "type": "string",
            "minLength": 1
          },
          "subject_match_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "subject_team_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "subject_player_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "body": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2000
          }
        },
        "required": [
          "kind",
          "source_id",
          "subject_match_id",
          "subject_team_id",
          "subject_player_id",
          "body"
        ]
      },
      "FeedHideRequest": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "reason"
        ]
      },
      "FeedSocialSelfResponse": {
        "type": "object",
        "properties": {
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "mode": {
            "type": "string",
            "enum": [
              "followed_first",
              "public_fallback"
            ]
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "tenant_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "post": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "match.result",
                        "match.mvp",
                        "standings.update",
                        "fantasy.top",
                        "media.published",
                        "sponsor.campaign"
                      ]
                    },
                    "body": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 2000
                    },
                    "published_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "match_id": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "team_id": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "player_id": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "target_href": {
                      "oneOf": [
                        {
                          "type": "string",
                          "minLength": 1
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "kind",
                    "body",
                    "published_at",
                    "match_id",
                    "team_id",
                    "player_id",
                    "target_href"
                  ]
                },
                "reaction_counts": {
                  "type": "object",
                  "properties": {
                    "tenant_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "like": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "celebrate": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "support": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "tenant_id",
                    "like",
                    "celebrate",
                    "support"
                  ]
                },
                "viewer_reactions": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "like",
                      "celebrate",
                      "support"
                    ]
                  }
                },
                "followed_subject": {
                  "type": "boolean"
                }
              },
              "required": [
                "tenant_id",
                "post",
                "reaction_counts",
                "viewer_reactions",
                "followed_subject"
              ]
            }
          }
        },
        "required": [
          "tenant_id",
          "mode",
          "items"
        ]
      },
      "FeedSocialPreferenceRequest": {
        "type": "object",
        "properties": {
          "personalization_enabled": {
            "type": "boolean"
          },
          "interactions_enabled": {
            "type": "boolean"
          }
        },
        "required": [
          "personalization_enabled",
          "interactions_enabled"
        ]
      },
      "FeedSocialCapabilitiesResponse": {
        "type": "object",
        "properties": {
          "state": {
            "type": "string",
            "enum": [
              "available",
              "disabled"
            ]
          },
          "personalization_enabled": {
            "type": "boolean"
          },
          "interactions_enabled": {
            "type": "boolean"
          },
          "follow": {
            "type": "object",
            "properties": {
              "state": {
                "type": "string",
                "enum": [
                  "available",
                  "disabled"
                ]
              },
              "reason": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "code": {
                        "type": "string",
                        "enum": [
                          "feed_social_module_disabled",
                          "feed_social_consent_required",
                          "feed_social_preference_disabled",
                          "feed_social_account_not_eligible"
                        ]
                      },
                      "message": {
                        "type": "string",
                        "minLength": 1
                      },
                      "recovery_action": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "code",
                      "message",
                      "recovery_action"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "state",
              "reason"
            ]
          }
        },
        "required": [
          "state",
          "personalization_enabled",
          "interactions_enabled",
          "follow"
        ]
      },
      "FeedFollowRequest": {
        "type": "object",
        "properties": {
          "followed": {
            "type": "boolean"
          }
        },
        "required": [
          "followed"
        ]
      },
      "FeedFollowResponse": {
        "type": "object",
        "properties": {
          "followed": {
            "type": "boolean"
          }
        },
        "required": [
          "followed"
        ]
      },
      "FeedFollowSelfListResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "subject_kind": {
                  "type": "string",
                  "enum": [
                    "team",
                    "player",
                    "tournament"
                  ]
                },
                "subject_id": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "required": [
                "subject_kind",
                "subject_id"
              ]
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "FeedReactionRequest": {
        "type": "object",
        "properties": {
          "active": {
            "type": "boolean"
          }
        },
        "required": [
          "active"
        ]
      },
      "FeedReactionResponse": {
        "type": "object",
        "properties": {
          "active": {
            "type": "boolean"
          },
          "counts": {
            "type": "object",
            "properties": {
              "tenant_id": {
                "type": "string",
                "format": "uuid"
              },
              "like": {
                "type": "integer",
                "minimum": 0
              },
              "celebrate": {
                "type": "integer",
                "minimum": 0
              },
              "support": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "tenant_id",
              "like",
              "celebrate",
              "support"
            ]
          }
        },
        "required": [
          "active",
          "counts"
        ]
      },
      "PublicFeedPostRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "type": "string",
            "enum": [
              "match.result",
              "match.mvp",
              "standings.update",
              "fantasy.top",
              "media.published",
              "sponsor.campaign"
            ]
          },
          "body": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2000
          },
          "published_at": {
            "type": "string",
            "format": "date-time"
          },
          "match_id": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "team_id": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "player_id": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "target_href": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "reaction_counts": {
            "type": "object",
            "properties": {
              "like": {
                "type": "integer",
                "minimum": 0
              },
              "celebrate": {
                "type": "integer",
                "minimum": 0
              },
              "support": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "like",
              "celebrate",
              "support"
            ]
          },
          "media": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "asset_count": {
                    "type": "integer",
                    "exclusiveMinimum": 0
                  },
                  "previews": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "media_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "asset_url": {
                          "type": "string",
                          "format": "uri"
                        },
                        "thumbnail_url": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uri"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "caption": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "media_id",
                        "asset_url",
                        "thumbnail_url",
                        "caption"
                      ]
                    },
                    "minItems": 1,
                    "maxItems": 3
                  },
                  "author_label": {
                    "oneOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "asset_count",
                  "previews",
                  "author_label"
                ]
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "kind",
          "body",
          "published_at",
          "match_id",
          "team_id",
          "player_id",
          "target_href"
        ]
      },
      "PublicFeedPostList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "match.result",
                    "match.mvp",
                    "standings.update",
                    "fantasy.top",
                    "media.published",
                    "sponsor.campaign"
                  ]
                },
                "body": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 2000
                },
                "published_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "match_id": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "team_id": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "player_id": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "target_href": {
                  "oneOf": [
                    {
                      "type": "string",
                      "minLength": 1
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "reaction_counts": {
                  "type": "object",
                  "properties": {
                    "like": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "celebrate": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "support": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "like",
                    "celebrate",
                    "support"
                  ]
                },
                "media": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "asset_count": {
                          "type": "integer",
                          "exclusiveMinimum": 0
                        },
                        "previews": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "media_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "asset_url": {
                                "type": "string",
                                "format": "uri"
                              },
                              "thumbnail_url": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "format": "uri"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "caption": {
                                "oneOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "media_id",
                              "asset_url",
                              "thumbnail_url",
                              "caption"
                            ]
                          },
                          "minItems": 1,
                          "maxItems": 3
                        },
                        "author_label": {
                          "oneOf": [
                            {
                              "type": "string",
                              "minLength": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "asset_count",
                        "previews",
                        "author_label"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "kind",
                "body",
                "published_at",
                "match_id",
                "team_id",
                "player_id",
                "target_href"
              ]
            },
            "maxItems": 100
          },
          "next_cursor": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 400
              },
              {
                "type": "null"
              }
            ]
          },
          "sponsor": {
            "type": "object",
            "properties": {
              "campaign_id": {
                "type": "string",
                "format": "uuid"
              },
              "sponsor_name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              "title": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              "creative_url": {
                "type": "string",
                "format": "uri",
                "pattern": "^https?:\\/\\/"
              },
              "slot": {
                "type": "string",
                "enum": [
                  "feed_card",
                  "standings_banner",
                  "live_overlay",
                  "mvp_card",
                  "top8_card"
                ]
              },
              "advertiser_name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              "paid_for_by": {
                "oneOf": [
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "content_category": {
                "type": "string",
                "enum": [
                  "general",
                  "food_beverage",
                  "sport_equipment",
                  "local_services",
                  "gambling",
                  "alcohol",
                  "betting",
                  "other"
                ]
              },
              "click_token": {
                "type": "string",
                "minLength": 16,
                "maxLength": 512
              }
            },
            "required": [
              "campaign_id",
              "sponsor_name",
              "title",
              "creative_url",
              "slot",
              "advertiser_name",
              "paid_for_by",
              "content_category",
              "click_token"
            ]
          }
        },
        "required": [
          "items",
          "next_cursor"
        ]
      },
      "NewsArticleRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "slug": {
            "type": "string",
            "minLength": 2,
            "maxLength": 64,
            "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "body": {
            "type": "string",
            "minLength": 1,
            "maxLength": 20000
          },
          "category": {
            "type": "string",
            "enum": [
              "regolamento",
              "giudice_sportivo",
              "generale"
            ]
          },
          "category_id": {
            "type": "string",
            "format": "uuid"
          },
          "cover_media_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "published",
              "archived"
            ]
          },
          "is_pinned": {
            "type": "boolean"
          },
          "show_in_feed": {
            "type": "boolean"
          },
          "published_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "archived_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "original_publication": {
            "type": "object",
            "properties": {
              "published_on": {
                "type": "string",
                "format": "date"
              },
              "precision": {
                "type": "string",
                "enum": [
                  "day"
                ]
              },
              "source": {
                "type": "object",
                "properties": {
                  "system": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64
                  },
                  "url": {
                    "type": "string",
                    "format": "uri",
                    "pattern": "^https?:\\/\\/"
                  }
                },
                "required": [
                  "system",
                  "id",
                  "url"
                ]
              },
              "derived_published_at_rule": {
                "type": "string",
                "enum": [
                  "europe_rome_midday"
                ]
              },
              "imported_at": {
                "type": "string",
                "format": "date-time"
              },
              "content": {
                "type": "object",
                "properties": {
                  "media_hosting": {
                    "type": "string",
                    "enum": [
                      "external_source"
                    ]
                  },
                  "cover_image": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "url": {
                            "type": "string",
                            "format": "uri",
                            "pattern": "^https?:\\/\\/"
                          },
                          "caption": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 300
                          }
                        },
                        "required": [
                          "url"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "images": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "url": {
                          "type": "string",
                          "format": "uri",
                          "pattern": "^https?:\\/\\/"
                        },
                        "caption": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 300
                        }
                      },
                      "required": [
                        "url"
                      ]
                    },
                    "maxItems": 20
                  },
                  "videos": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "provider": {
                          "type": "string",
                          "enum": [
                            "youtube",
                            "facebook"
                          ]
                        },
                        "url": {
                          "type": "string",
                          "format": "uri",
                          "pattern": "^https?:\\/\\/"
                        },
                        "video_id": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 64,
                          "pattern": "^[A-Za-z0-9_-]+$"
                        },
                        "title": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        }
                      },
                      "required": [
                        "provider",
                        "url"
                      ]
                    },
                    "maxItems": 20
                  },
                  "links": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "url": {
                          "type": "string",
                          "format": "uri",
                          "pattern": "^https?:\\/\\/"
                        },
                        "label": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        }
                      },
                      "required": [
                        "url"
                      ]
                    },
                    "maxItems": 100
                  }
                },
                "required": [
                  "media_hosting",
                  "cover_image",
                  "images",
                  "videos",
                  "links"
                ]
              }
            },
            "required": [
              "published_on",
              "precision",
              "source",
              "derived_published_at_rule",
              "imported_at"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "updated_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "tenant_id",
          "slug",
          "title",
          "body",
          "category",
          "cover_media_id",
          "status",
          "is_pinned",
          "show_in_feed",
          "published_at",
          "archived_at",
          "created_at",
          "updated_at",
          "created_by",
          "updated_by"
        ]
      },
      "NewsArticleList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "tenant_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "slug": {
                  "type": "string",
                  "minLength": 2,
                  "maxLength": 64,
                  "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
                },
                "title": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "body": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 20000
                },
                "category": {
                  "type": "string",
                  "enum": [
                    "regolamento",
                    "giudice_sportivo",
                    "generale"
                  ]
                },
                "category_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "cover_media_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "draft",
                    "published",
                    "archived"
                  ]
                },
                "is_pinned": {
                  "type": "boolean"
                },
                "show_in_feed": {
                  "type": "boolean"
                },
                "published_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "archived_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "original_publication": {
                  "type": "object",
                  "properties": {
                    "published_on": {
                      "type": "string",
                      "format": "date"
                    },
                    "precision": {
                      "type": "string",
                      "enum": [
                        "day"
                      ]
                    },
                    "source": {
                      "type": "object",
                      "properties": {
                        "system": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 120
                        },
                        "id": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 64
                        },
                        "url": {
                          "type": "string",
                          "format": "uri",
                          "pattern": "^https?:\\/\\/"
                        }
                      },
                      "required": [
                        "system",
                        "id",
                        "url"
                      ]
                    },
                    "derived_published_at_rule": {
                      "type": "string",
                      "enum": [
                        "europe_rome_midday"
                      ]
                    },
                    "imported_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "content": {
                      "type": "object",
                      "properties": {
                        "media_hosting": {
                          "type": "string",
                          "enum": [
                            "external_source"
                          ]
                        },
                        "cover_image": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "url": {
                                  "type": "string",
                                  "format": "uri",
                                  "pattern": "^https?:\\/\\/"
                                },
                                "caption": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 300
                                }
                              },
                              "required": [
                                "url"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "images": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "url": {
                                "type": "string",
                                "format": "uri",
                                "pattern": "^https?:\\/\\/"
                              },
                              "caption": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 300
                              }
                            },
                            "required": [
                              "url"
                            ]
                          },
                          "maxItems": 20
                        },
                        "videos": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "provider": {
                                "type": "string",
                                "enum": [
                                  "youtube",
                                  "facebook"
                                ]
                              },
                              "url": {
                                "type": "string",
                                "format": "uri",
                                "pattern": "^https?:\\/\\/"
                              },
                              "video_id": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 64,
                                "pattern": "^[A-Za-z0-9_-]+$"
                              },
                              "title": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 200
                              }
                            },
                            "required": [
                              "provider",
                              "url"
                            ]
                          },
                          "maxItems": 20
                        },
                        "links": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "url": {
                                "type": "string",
                                "format": "uri",
                                "pattern": "^https?:\\/\\/"
                              },
                              "label": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 200
                              }
                            },
                            "required": [
                              "url"
                            ]
                          },
                          "maxItems": 100
                        }
                      },
                      "required": [
                        "media_hosting",
                        "cover_image",
                        "images",
                        "videos",
                        "links"
                      ]
                    }
                  },
                  "required": [
                    "published_on",
                    "precision",
                    "source",
                    "derived_published_at_rule",
                    "imported_at"
                  ]
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "created_by": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "updated_by": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "tenant_id",
                "slug",
                "title",
                "body",
                "category",
                "cover_media_id",
                "status",
                "is_pinned",
                "show_in_feed",
                "published_at",
                "archived_at",
                "created_at",
                "updated_at",
                "created_by",
                "updated_by"
              ]
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "NewsArticleCreateRequest": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string",
            "minLength": 2,
            "maxLength": 64,
            "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "body": {
            "type": "string",
            "minLength": 1,
            "maxLength": 20000
          },
          "category": {
            "type": "string",
            "enum": [
              "regolamento",
              "giudice_sportivo",
              "generale"
            ]
          },
          "category_id": {
            "type": "string",
            "format": "uuid"
          },
          "cover_media_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "is_pinned": {
            "type": "boolean"
          }
        },
        "required": [
          "slug",
          "title",
          "body",
          "category"
        ]
      },
      "NewsArticleUpdateRequest": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string",
            "minLength": 2,
            "maxLength": 64,
            "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "body": {
            "type": "string",
            "minLength": 1,
            "maxLength": 20000
          },
          "category": {
            "type": "string",
            "enum": [
              "regolamento",
              "giudice_sportivo",
              "generale"
            ]
          },
          "category_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "cover_media_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "is_pinned": {
            "type": "boolean"
          }
        },
        "required": []
      },
      "NewsArticlePublishRequest": {
        "type": "object",
        "properties": {
          "send_notification": {
            "type": "boolean"
          },
          "show_in_feed": {
            "type": "boolean"
          },
          "notification_template_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "original_published_on": {
            "type": "string",
            "format": "date"
          },
          "original_source": {
            "type": "object",
            "properties": {
              "system": {
                "type": "string",
                "minLength": 1,
                "maxLength": 120
              },
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 64
              },
              "url": {
                "type": "string",
                "format": "uri",
                "pattern": "^https?:\\/\\/"
              }
            },
            "required": [
              "system",
              "id",
              "url"
            ]
          },
          "original_content": {
            "type": "object",
            "properties": {
              "media_hosting": {
                "type": "string",
                "enum": [
                  "external_source"
                ]
              },
              "cover_image": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "url": {
                        "type": "string",
                        "format": "uri",
                        "pattern": "^https?:\\/\\/"
                      },
                      "caption": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 300
                      }
                    },
                    "required": [
                      "url"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "images": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string",
                      "format": "uri",
                      "pattern": "^https?:\\/\\/"
                    },
                    "caption": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 300
                    }
                  },
                  "required": [
                    "url"
                  ]
                },
                "maxItems": 20
              },
              "videos": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "provider": {
                      "type": "string",
                      "enum": [
                        "youtube",
                        "facebook"
                      ]
                    },
                    "url": {
                      "type": "string",
                      "format": "uri",
                      "pattern": "^https?:\\/\\/"
                    },
                    "video_id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64,
                      "pattern": "^[A-Za-z0-9_-]+$"
                    },
                    "title": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    }
                  },
                  "required": [
                    "provider",
                    "url"
                  ]
                },
                "maxItems": 20
              },
              "links": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string",
                      "format": "uri",
                      "pattern": "^https?:\\/\\/"
                    },
                    "label": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    }
                  },
                  "required": [
                    "url"
                  ]
                },
                "maxItems": 100
              }
            },
            "required": [
              "media_hosting",
              "cover_image",
              "images",
              "videos",
              "links"
            ]
          }
        },
        "required": []
      },
      "NewsArticlePublishResponse": {
        "type": "object",
        "properties": {
          "article": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "tenant_id": {
                "type": "string",
                "format": "uuid"
              },
              "slug": {
                "type": "string",
                "minLength": 2,
                "maxLength": 64,
                "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
              },
              "title": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              "body": {
                "type": "string",
                "minLength": 1,
                "maxLength": 20000
              },
              "category": {
                "type": "string",
                "enum": [
                  "regolamento",
                  "giudice_sportivo",
                  "generale"
                ]
              },
              "category_id": {
                "type": "string",
                "format": "uuid"
              },
              "cover_media_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "draft",
                  "published",
                  "archived"
                ]
              },
              "is_pinned": {
                "type": "boolean"
              },
              "show_in_feed": {
                "type": "boolean"
              },
              "published_at": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "archived_at": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "original_publication": {
                "type": "object",
                "properties": {
                  "published_on": {
                    "type": "string",
                    "format": "date"
                  },
                  "precision": {
                    "type": "string",
                    "enum": [
                      "day"
                    ]
                  },
                  "source": {
                    "type": "object",
                    "properties": {
                      "system": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "id": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64
                      },
                      "url": {
                        "type": "string",
                        "format": "uri",
                        "pattern": "^https?:\\/\\/"
                      }
                    },
                    "required": [
                      "system",
                      "id",
                      "url"
                    ]
                  },
                  "derived_published_at_rule": {
                    "type": "string",
                    "enum": [
                      "europe_rome_midday"
                    ]
                  },
                  "imported_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "content": {
                    "type": "object",
                    "properties": {
                      "media_hosting": {
                        "type": "string",
                        "enum": [
                          "external_source"
                        ]
                      },
                      "cover_image": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "url": {
                                "type": "string",
                                "format": "uri",
                                "pattern": "^https?:\\/\\/"
                              },
                              "caption": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 300
                              }
                            },
                            "required": [
                              "url"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "images": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "url": {
                              "type": "string",
                              "format": "uri",
                              "pattern": "^https?:\\/\\/"
                            },
                            "caption": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 300
                            }
                          },
                          "required": [
                            "url"
                          ]
                        },
                        "maxItems": 20
                      },
                      "videos": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "provider": {
                              "type": "string",
                              "enum": [
                                "youtube",
                                "facebook"
                              ]
                            },
                            "url": {
                              "type": "string",
                              "format": "uri",
                              "pattern": "^https?:\\/\\/"
                            },
                            "video_id": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 64,
                              "pattern": "^[A-Za-z0-9_-]+$"
                            },
                            "title": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 200
                            }
                          },
                          "required": [
                            "provider",
                            "url"
                          ]
                        },
                        "maxItems": 20
                      },
                      "links": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "url": {
                              "type": "string",
                              "format": "uri",
                              "pattern": "^https?:\\/\\/"
                            },
                            "label": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 200
                            }
                          },
                          "required": [
                            "url"
                          ]
                        },
                        "maxItems": 100
                      }
                    },
                    "required": [
                      "media_hosting",
                      "cover_image",
                      "images",
                      "videos",
                      "links"
                    ]
                  }
                },
                "required": [
                  "published_on",
                  "precision",
                  "source",
                  "derived_published_at_rule",
                  "imported_at"
                ]
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "created_by": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "updated_by": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "id",
              "tenant_id",
              "slug",
              "title",
              "body",
              "category",
              "cover_media_id",
              "status",
              "is_pinned",
              "show_in_feed",
              "published_at",
              "archived_at",
              "created_at",
              "updated_at",
              "created_by",
              "updated_by"
            ]
          },
          "notification_message_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "article",
          "notification_message_id"
        ]
      },
      "PublicNewsArticleRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "slug": {
            "type": "string"
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "body": {
            "type": "string",
            "minLength": 1,
            "maxLength": 20000
          },
          "category": {
            "type": "string",
            "enum": [
              "regolamento",
              "giudice_sportivo",
              "generale"
            ]
          },
          "category_id": {
            "type": "string",
            "format": "uuid"
          },
          "cover_media_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "is_pinned": {
            "type": "boolean"
          },
          "published_at": {
            "type": "string",
            "format": "date-time"
          },
          "original_publication": {
            "type": "object",
            "properties": {
              "published_on": {
                "type": "string",
                "format": "date"
              },
              "precision": {
                "type": "string",
                "enum": [
                  "day"
                ]
              },
              "source": {
                "type": "object",
                "properties": {
                  "system": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64
                  },
                  "url": {
                    "type": "string",
                    "format": "uri",
                    "pattern": "^https?:\\/\\/"
                  }
                },
                "required": [
                  "system",
                  "id",
                  "url"
                ]
              },
              "derived_published_at_rule": {
                "type": "string",
                "enum": [
                  "europe_rome_midday"
                ]
              },
              "content": {
                "type": "object",
                "properties": {
                  "media_hosting": {
                    "type": "string",
                    "enum": [
                      "external_source"
                    ]
                  },
                  "cover_image": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "url": {
                            "type": "string",
                            "format": "uri",
                            "pattern": "^https?:\\/\\/"
                          },
                          "caption": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 300
                          }
                        },
                        "required": [
                          "url"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "images": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "url": {
                          "type": "string",
                          "format": "uri",
                          "pattern": "^https?:\\/\\/"
                        },
                        "caption": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 300
                        }
                      },
                      "required": [
                        "url"
                      ]
                    },
                    "maxItems": 20
                  },
                  "videos": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "provider": {
                          "type": "string",
                          "enum": [
                            "youtube",
                            "facebook"
                          ]
                        },
                        "url": {
                          "type": "string",
                          "format": "uri",
                          "pattern": "^https?:\\/\\/"
                        },
                        "video_id": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 64,
                          "pattern": "^[A-Za-z0-9_-]+$"
                        },
                        "title": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        }
                      },
                      "required": [
                        "provider",
                        "url"
                      ]
                    },
                    "maxItems": 20
                  },
                  "links": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "url": {
                          "type": "string",
                          "format": "uri",
                          "pattern": "^https?:\\/\\/"
                        },
                        "label": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        }
                      },
                      "required": [
                        "url"
                      ]
                    },
                    "maxItems": 100
                  }
                },
                "required": [
                  "media_hosting",
                  "cover_image",
                  "images",
                  "videos",
                  "links"
                ]
              }
            },
            "required": [
              "published_on",
              "precision",
              "source",
              "derived_published_at_rule"
            ]
          }
        },
        "required": [
          "id",
          "slug",
          "title",
          "body",
          "category",
          "cover_media_id",
          "is_pinned",
          "published_at"
        ]
      },
      "PublicNewsItem": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "article",
              "feed"
            ]
          },
          "article": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "slug": {
                    "type": "string"
                  },
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "body": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 20000
                  },
                  "category": {
                    "type": "string",
                    "enum": [
                      "regolamento",
                      "giudice_sportivo",
                      "generale"
                    ]
                  },
                  "category_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "cover_media_id": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "is_pinned": {
                    "type": "boolean"
                  },
                  "published_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "original_publication": {
                    "type": "object",
                    "properties": {
                      "published_on": {
                        "type": "string",
                        "format": "date"
                      },
                      "precision": {
                        "type": "string",
                        "enum": [
                          "day"
                        ]
                      },
                      "source": {
                        "type": "object",
                        "properties": {
                          "system": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 120
                          },
                          "id": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 64
                          },
                          "url": {
                            "type": "string",
                            "format": "uri",
                            "pattern": "^https?:\\/\\/"
                          }
                        },
                        "required": [
                          "system",
                          "id",
                          "url"
                        ]
                      },
                      "derived_published_at_rule": {
                        "type": "string",
                        "enum": [
                          "europe_rome_midday"
                        ]
                      },
                      "content": {
                        "type": "object",
                        "properties": {
                          "media_hosting": {
                            "type": "string",
                            "enum": [
                              "external_source"
                            ]
                          },
                          "cover_image": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "url": {
                                    "type": "string",
                                    "format": "uri",
                                    "pattern": "^https?:\\/\\/"
                                  },
                                  "caption": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 300
                                  }
                                },
                                "required": [
                                  "url"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "images": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "url": {
                                  "type": "string",
                                  "format": "uri",
                                  "pattern": "^https?:\\/\\/"
                                },
                                "caption": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 300
                                }
                              },
                              "required": [
                                "url"
                              ]
                            },
                            "maxItems": 20
                          },
                          "videos": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "provider": {
                                  "type": "string",
                                  "enum": [
                                    "youtube",
                                    "facebook"
                                  ]
                                },
                                "url": {
                                  "type": "string",
                                  "format": "uri",
                                  "pattern": "^https?:\\/\\/"
                                },
                                "video_id": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 64,
                                  "pattern": "^[A-Za-z0-9_-]+$"
                                },
                                "title": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 200
                                }
                              },
                              "required": [
                                "provider",
                                "url"
                              ]
                            },
                            "maxItems": 20
                          },
                          "links": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "url": {
                                  "type": "string",
                                  "format": "uri",
                                  "pattern": "^https?:\\/\\/"
                                },
                                "label": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 200
                                }
                              },
                              "required": [
                                "url"
                              ]
                            },
                            "maxItems": 100
                          }
                        },
                        "required": [
                          "media_hosting",
                          "cover_image",
                          "images",
                          "videos",
                          "links"
                        ]
                      }
                    },
                    "required": [
                      "published_on",
                      "precision",
                      "source",
                      "derived_published_at_rule"
                    ]
                  }
                },
                "required": [
                  "id",
                  "slug",
                  "title",
                  "body",
                  "category",
                  "cover_media_id",
                  "is_pinned",
                  "published_at"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "feed": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "match.result",
                      "match.mvp",
                      "standings.update",
                      "fantasy.top",
                      "media.published",
                      "sponsor.campaign"
                    ]
                  },
                  "body": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2000
                  },
                  "published_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "match_id": {
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "team_id": {
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "player_id": {
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "target_href": {
                    "oneOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "reaction_counts": {
                    "type": "object",
                    "properties": {
                      "like": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "celebrate": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "support": {
                        "type": "integer",
                        "minimum": 0
                      }
                    },
                    "required": [
                      "like",
                      "celebrate",
                      "support"
                    ]
                  },
                  "media": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "asset_count": {
                            "type": "integer",
                            "exclusiveMinimum": 0
                          },
                          "previews": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "media_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "asset_url": {
                                  "type": "string",
                                  "format": "uri"
                                },
                                "thumbnail_url": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "format": "uri"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "caption": {
                                  "oneOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "media_id",
                                "asset_url",
                                "thumbnail_url",
                                "caption"
                              ]
                            },
                            "minItems": 1,
                            "maxItems": 3
                          },
                          "author_label": {
                            "oneOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "asset_count",
                          "previews",
                          "author_label"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "id",
                  "kind",
                  "body",
                  "published_at",
                  "match_id",
                  "team_id",
                  "player_id",
                  "target_href"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "pinned": {
            "type": "boolean"
          },
          "published_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "type",
          "article",
          "feed",
          "pinned",
          "published_at"
        ]
      },
      "PublicNewsList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "enum": [
                    "article",
                    "feed"
                  ]
                },
                "article": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "slug": {
                          "type": "string"
                        },
                        "title": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        "body": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 20000
                        },
                        "category": {
                          "type": "string",
                          "enum": [
                            "regolamento",
                            "giudice_sportivo",
                            "generale"
                          ]
                        },
                        "category_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "cover_media_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "is_pinned": {
                          "type": "boolean"
                        },
                        "published_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "original_publication": {
                          "type": "object",
                          "properties": {
                            "published_on": {
                              "type": "string",
                              "format": "date"
                            },
                            "precision": {
                              "type": "string",
                              "enum": [
                                "day"
                              ]
                            },
                            "source": {
                              "type": "object",
                              "properties": {
                                "system": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "id": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 64
                                },
                                "url": {
                                  "type": "string",
                                  "format": "uri",
                                  "pattern": "^https?:\\/\\/"
                                }
                              },
                              "required": [
                                "system",
                                "id",
                                "url"
                              ]
                            },
                            "derived_published_at_rule": {
                              "type": "string",
                              "enum": [
                                "europe_rome_midday"
                              ]
                            },
                            "content": {
                              "type": "object",
                              "properties": {
                                "media_hosting": {
                                  "type": "string",
                                  "enum": [
                                    "external_source"
                                  ]
                                },
                                "cover_image": {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "url": {
                                          "type": "string",
                                          "format": "uri",
                                          "pattern": "^https?:\\/\\/"
                                        },
                                        "caption": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 300
                                        }
                                      },
                                      "required": [
                                        "url"
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "images": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "url": {
                                        "type": "string",
                                        "format": "uri",
                                        "pattern": "^https?:\\/\\/"
                                      },
                                      "caption": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 300
                                      }
                                    },
                                    "required": [
                                      "url"
                                    ]
                                  },
                                  "maxItems": 20
                                },
                                "videos": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "provider": {
                                        "type": "string",
                                        "enum": [
                                          "youtube",
                                          "facebook"
                                        ]
                                      },
                                      "url": {
                                        "type": "string",
                                        "format": "uri",
                                        "pattern": "^https?:\\/\\/"
                                      },
                                      "video_id": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 64,
                                        "pattern": "^[A-Za-z0-9_-]+$"
                                      },
                                      "title": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 200
                                      }
                                    },
                                    "required": [
                                      "provider",
                                      "url"
                                    ]
                                  },
                                  "maxItems": 20
                                },
                                "links": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "url": {
                                        "type": "string",
                                        "format": "uri",
                                        "pattern": "^https?:\\/\\/"
                                      },
                                      "label": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 200
                                      }
                                    },
                                    "required": [
                                      "url"
                                    ]
                                  },
                                  "maxItems": 100
                                }
                              },
                              "required": [
                                "media_hosting",
                                "cover_image",
                                "images",
                                "videos",
                                "links"
                              ]
                            }
                          },
                          "required": [
                            "published_on",
                            "precision",
                            "source",
                            "derived_published_at_rule"
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "slug",
                        "title",
                        "body",
                        "category",
                        "cover_media_id",
                        "is_pinned",
                        "published_at"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "feed": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "kind": {
                          "type": "string",
                          "enum": [
                            "match.result",
                            "match.mvp",
                            "standings.update",
                            "fantasy.top",
                            "media.published",
                            "sponsor.campaign"
                          ]
                        },
                        "body": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 2000
                        },
                        "published_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "match_id": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "team_id": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "player_id": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "target_href": {
                          "oneOf": [
                            {
                              "type": "string",
                              "minLength": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "reaction_counts": {
                          "type": "object",
                          "properties": {
                            "like": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "celebrate": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "support": {
                              "type": "integer",
                              "minimum": 0
                            }
                          },
                          "required": [
                            "like",
                            "celebrate",
                            "support"
                          ]
                        },
                        "media": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "asset_count": {
                                  "type": "integer",
                                  "exclusiveMinimum": 0
                                },
                                "previews": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "media_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "asset_url": {
                                        "type": "string",
                                        "format": "uri"
                                      },
                                      "thumbnail_url": {
                                        "oneOf": [
                                          {
                                            "type": "string",
                                            "format": "uri"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "caption": {
                                        "oneOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "media_id",
                                      "asset_url",
                                      "thumbnail_url",
                                      "caption"
                                    ]
                                  },
                                  "minItems": 1,
                                  "maxItems": 3
                                },
                                "author_label": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "asset_count",
                                "previews",
                                "author_label"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "kind",
                        "body",
                        "published_at",
                        "match_id",
                        "team_id",
                        "player_id",
                        "target_href"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "pinned": {
                  "type": "boolean"
                },
                "published_at": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "type",
                "article",
                "feed",
                "pinned",
                "published_at"
              ]
            }
          },
          "next_cursor": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "items"
        ]
      },
      "ContentPage": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "slug": {
            "type": "string",
            "minLength": 2,
            "maxLength": 64,
            "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "kind": {
            "type": "string",
            "enum": [
              "page"
            ]
          },
          "organization_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "published",
              "archived"
            ]
          },
          "sections": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "heading"
                      ]
                    },
                    "text": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 240
                    },
                    "level": {
                      "oneOf": [
                        {
                          "type": "number",
                          "enum": [
                            2
                          ]
                        },
                        {
                          "type": "number",
                          "enum": [
                            3
                          ]
                        },
                        {
                          "type": "number",
                          "enum": [
                            4
                          ]
                        }
                      ]
                    }
                  },
                  "required": [
                    "type",
                    "text",
                    "level"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "paragraph"
                      ]
                    },
                    "text": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 10000
                    }
                  },
                  "required": [
                    "type",
                    "text"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "list"
                      ]
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500
                      },
                      "minItems": 1,
                      "maxItems": 100
                    }
                  },
                  "required": [
                    "type",
                    "items"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "link_group"
                      ]
                    },
                    "links": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "label": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          },
                          "url": {
                            "type": "string",
                            "format": "uri",
                            "pattern": "^https?:\\/\\/"
                          }
                        },
                        "required": [
                          "label",
                          "url"
                        ]
                      },
                      "minItems": 1,
                      "maxItems": 100
                    }
                  },
                  "required": [
                    "type",
                    "links"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "contact"
                      ]
                    },
                    "name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "email": {
                      "type": "string",
                      "format": "email"
                    },
                    "phone": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 80
                    },
                    "address": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 500
                    }
                  },
                  "required": [
                    "type",
                    "name"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "image"
                      ]
                    },
                    "url": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 2048
                    },
                    "alt": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 300
                    },
                    "caption": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 300
                    }
                  },
                  "required": [
                    "type",
                    "url",
                    "alt"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "archive_image"
                      ]
                    },
                    "media_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "alt": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 300
                    },
                    "caption": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 300
                    }
                  },
                  "required": [
                    "type",
                    "media_id",
                    "alt"
                  ]
                }
              ]
            },
            "maxItems": 200
          },
          "parent_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "in_footer": {
            "type": "boolean"
          },
          "is_link": {
            "type": "boolean"
          },
          "link_url": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 2048
              },
              {
                "type": "null"
              }
            ]
          },
          "new_tab": {
            "type": "boolean"
          },
          "sort_order": {
            "type": "integer"
          },
          "published_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "seo_title": {
            "oneOf": [
              {
                "type": "string",
                "maxLength": 70
              },
              {
                "type": "null"
              }
            ]
          },
          "seo_description": {
            "oneOf": [
              {
                "type": "string",
                "maxLength": 300
              },
              {
                "type": "null"
              }
            ]
          },
          "cover_media_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "cover_alt": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 300
              },
              {
                "type": "null"
              }
            ]
          },
          "revision": {
            "type": "integer",
            "minimum": 1
          },
          "revisions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "revision": {
                  "type": "integer",
                  "minimum": 1
                },
                "saved_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "saved_by": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "title": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "sections": {
                  "type": "array",
                  "items": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "heading"
                            ]
                          },
                          "text": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 240
                          },
                          "level": {
                            "oneOf": [
                              {
                                "type": "number",
                                "enum": [
                                  2
                                ]
                              },
                              {
                                "type": "number",
                                "enum": [
                                  3
                                ]
                              },
                              {
                                "type": "number",
                                "enum": [
                                  4
                                ]
                              }
                            ]
                          }
                        },
                        "required": [
                          "type",
                          "text",
                          "level"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "paragraph"
                            ]
                          },
                          "text": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 10000
                          }
                        },
                        "required": [
                          "type",
                          "text"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "list"
                            ]
                          },
                          "items": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 500
                            },
                            "minItems": 1,
                            "maxItems": 100
                          }
                        },
                        "required": [
                          "type",
                          "items"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "link_group"
                            ]
                          },
                          "links": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "label": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 200
                                },
                                "url": {
                                  "type": "string",
                                  "format": "uri",
                                  "pattern": "^https?:\\/\\/"
                                }
                              },
                              "required": [
                                "label",
                                "url"
                              ]
                            },
                            "minItems": 1,
                            "maxItems": 100
                          }
                        },
                        "required": [
                          "type",
                          "links"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "contact"
                            ]
                          },
                          "name": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          },
                          "email": {
                            "type": "string",
                            "format": "email"
                          },
                          "phone": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 80
                          },
                          "address": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 500
                          }
                        },
                        "required": [
                          "type",
                          "name"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "image"
                            ]
                          },
                          "url": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 2048
                          },
                          "alt": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 300
                          },
                          "caption": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 300
                          }
                        },
                        "required": [
                          "type",
                          "url",
                          "alt"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "archive_image"
                            ]
                          },
                          "media_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "alt": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 300
                          },
                          "caption": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 300
                          }
                        },
                        "required": [
                          "type",
                          "media_id",
                          "alt"
                        ]
                      }
                    ]
                  },
                  "maxItems": 200
                },
                "seo_title": {
                  "oneOf": [
                    {
                      "type": "string",
                      "maxLength": 70
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "seo_description": {
                  "oneOf": [
                    {
                      "type": "string",
                      "maxLength": 300
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "cover_media_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "cover_alt": {
                  "oneOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 300
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "revision",
                "saved_at",
                "saved_by",
                "title",
                "sections"
              ]
            },
            "maxItems": 10
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "updated_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "tenant_id",
          "slug",
          "title",
          "kind",
          "organization_id",
          "status",
          "sections",
          "sort_order",
          "published_at",
          "created_at",
          "updated_at",
          "created_by",
          "updated_by"
        ]
      },
      "PublicContentPage": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "slug": {
            "type": "string",
            "minLength": 2,
            "maxLength": 64,
            "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "kind": {
            "type": "string",
            "enum": [
              "page"
            ]
          },
          "organization_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "published",
              "archived"
            ]
          },
          "parent_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "in_footer": {
            "type": "boolean"
          },
          "is_link": {
            "type": "boolean"
          },
          "link_url": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 2048
              },
              {
                "type": "null"
              }
            ]
          },
          "new_tab": {
            "type": "boolean"
          },
          "sort_order": {
            "type": "integer"
          },
          "published_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "seo_title": {
            "oneOf": [
              {
                "type": "string",
                "maxLength": 70
              },
              {
                "type": "null"
              }
            ]
          },
          "seo_description": {
            "oneOf": [
              {
                "type": "string",
                "maxLength": 300
              },
              {
                "type": "null"
              }
            ]
          },
          "revision": {
            "type": "integer",
            "minimum": 1
          },
          "sections": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "heading"
                      ]
                    },
                    "text": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 240
                    },
                    "level": {
                      "oneOf": [
                        {
                          "type": "number",
                          "enum": [
                            2
                          ]
                        },
                        {
                          "type": "number",
                          "enum": [
                            3
                          ]
                        },
                        {
                          "type": "number",
                          "enum": [
                            4
                          ]
                        }
                      ]
                    }
                  },
                  "required": [
                    "type",
                    "text",
                    "level"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "paragraph"
                      ]
                    },
                    "text": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 10000
                    }
                  },
                  "required": [
                    "type",
                    "text"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "list"
                      ]
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500
                      },
                      "minItems": 1,
                      "maxItems": 100
                    }
                  },
                  "required": [
                    "type",
                    "items"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "link_group"
                      ]
                    },
                    "links": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "label": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          },
                          "url": {
                            "type": "string",
                            "format": "uri",
                            "pattern": "^https?:\\/\\/"
                          }
                        },
                        "required": [
                          "label",
                          "url"
                        ]
                      },
                      "minItems": 1,
                      "maxItems": 100
                    }
                  },
                  "required": [
                    "type",
                    "links"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "contact"
                      ]
                    },
                    "name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "email": {
                      "type": "string",
                      "format": "email"
                    },
                    "phone": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 80
                    },
                    "address": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 500
                    }
                  },
                  "required": [
                    "type",
                    "name"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "image"
                      ]
                    },
                    "url": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 2048
                    },
                    "alt": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 300
                    },
                    "caption": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 300
                    }
                  },
                  "required": [
                    "type",
                    "url",
                    "alt"
                  ]
                }
              ]
            },
            "maxItems": 200
          },
          "cover": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "format": "uri"
                  },
                  "alt": {
                    "type": "string"
                  }
                },
                "required": [
                  "url",
                  "alt"
                ]
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "slug",
          "title",
          "kind",
          "organization_id",
          "status",
          "sort_order",
          "published_at",
          "sections"
        ]
      },
      "ContentPageList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "tenant_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "slug": {
                  "type": "string",
                  "minLength": 2,
                  "maxLength": 64,
                  "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
                },
                "title": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "page"
                  ]
                },
                "organization_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "draft",
                    "published",
                    "archived"
                  ]
                },
                "sections": {
                  "type": "array",
                  "items": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "heading"
                            ]
                          },
                          "text": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 240
                          },
                          "level": {
                            "oneOf": [
                              {
                                "type": "number",
                                "enum": [
                                  2
                                ]
                              },
                              {
                                "type": "number",
                                "enum": [
                                  3
                                ]
                              },
                              {
                                "type": "number",
                                "enum": [
                                  4
                                ]
                              }
                            ]
                          }
                        },
                        "required": [
                          "type",
                          "text",
                          "level"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "paragraph"
                            ]
                          },
                          "text": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 10000
                          }
                        },
                        "required": [
                          "type",
                          "text"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "list"
                            ]
                          },
                          "items": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 500
                            },
                            "minItems": 1,
                            "maxItems": 100
                          }
                        },
                        "required": [
                          "type",
                          "items"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "link_group"
                            ]
                          },
                          "links": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "label": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 200
                                },
                                "url": {
                                  "type": "string",
                                  "format": "uri",
                                  "pattern": "^https?:\\/\\/"
                                }
                              },
                              "required": [
                                "label",
                                "url"
                              ]
                            },
                            "minItems": 1,
                            "maxItems": 100
                          }
                        },
                        "required": [
                          "type",
                          "links"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "contact"
                            ]
                          },
                          "name": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          },
                          "email": {
                            "type": "string",
                            "format": "email"
                          },
                          "phone": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 80
                          },
                          "address": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 500
                          }
                        },
                        "required": [
                          "type",
                          "name"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "image"
                            ]
                          },
                          "url": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 2048
                          },
                          "alt": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 300
                          },
                          "caption": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 300
                          }
                        },
                        "required": [
                          "type",
                          "url",
                          "alt"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "archive_image"
                            ]
                          },
                          "media_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "alt": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 300
                          },
                          "caption": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 300
                          }
                        },
                        "required": [
                          "type",
                          "media_id",
                          "alt"
                        ]
                      }
                    ]
                  },
                  "maxItems": 200
                },
                "parent_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "in_footer": {
                  "type": "boolean"
                },
                "is_link": {
                  "type": "boolean"
                },
                "link_url": {
                  "oneOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 2048
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "new_tab": {
                  "type": "boolean"
                },
                "sort_order": {
                  "type": "integer"
                },
                "published_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "seo_title": {
                  "oneOf": [
                    {
                      "type": "string",
                      "maxLength": 70
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "seo_description": {
                  "oneOf": [
                    {
                      "type": "string",
                      "maxLength": 300
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "cover_media_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "cover_alt": {
                  "oneOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 300
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "revision": {
                  "type": "integer",
                  "minimum": 1
                },
                "revisions": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "revision": {
                        "type": "integer",
                        "minimum": 1
                      },
                      "saved_at": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "saved_by": {
                        "oneOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "title": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 200
                      },
                      "sections": {
                        "type": "array",
                        "items": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "heading"
                                  ]
                                },
                                "text": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 240
                                },
                                "level": {
                                  "oneOf": [
                                    {
                                      "type": "number",
                                      "enum": [
                                        2
                                      ]
                                    },
                                    {
                                      "type": "number",
                                      "enum": [
                                        3
                                      ]
                                    },
                                    {
                                      "type": "number",
                                      "enum": [
                                        4
                                      ]
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "type",
                                "text",
                                "level"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "paragraph"
                                  ]
                                },
                                "text": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 10000
                                }
                              },
                              "required": [
                                "type",
                                "text"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "list"
                                  ]
                                },
                                "items": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 500
                                  },
                                  "minItems": 1,
                                  "maxItems": 100
                                }
                              },
                              "required": [
                                "type",
                                "items"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "link_group"
                                  ]
                                },
                                "links": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "label": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 200
                                      },
                                      "url": {
                                        "type": "string",
                                        "format": "uri",
                                        "pattern": "^https?:\\/\\/"
                                      }
                                    },
                                    "required": [
                                      "label",
                                      "url"
                                    ]
                                  },
                                  "minItems": 1,
                                  "maxItems": 100
                                }
                              },
                              "required": [
                                "type",
                                "links"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "contact"
                                  ]
                                },
                                "name": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 200
                                },
                                "email": {
                                  "type": "string",
                                  "format": "email"
                                },
                                "phone": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 80
                                },
                                "address": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 500
                                }
                              },
                              "required": [
                                "type",
                                "name"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "image"
                                  ]
                                },
                                "url": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 2048
                                },
                                "alt": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 300
                                },
                                "caption": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 300
                                }
                              },
                              "required": [
                                "type",
                                "url",
                                "alt"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "archive_image"
                                  ]
                                },
                                "media_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "alt": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 300
                                },
                                "caption": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 300
                                }
                              },
                              "required": [
                                "type",
                                "media_id",
                                "alt"
                              ]
                            }
                          ]
                        },
                        "maxItems": 200
                      },
                      "seo_title": {
                        "oneOf": [
                          {
                            "type": "string",
                            "maxLength": 70
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "seo_description": {
                        "oneOf": [
                          {
                            "type": "string",
                            "maxLength": 300
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "cover_media_id": {
                        "oneOf": [
                          {
                            "type": "string",
                            "format": "uuid"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "cover_alt": {
                        "oneOf": [
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 300
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "revision",
                      "saved_at",
                      "saved_by",
                      "title",
                      "sections"
                    ]
                  },
                  "maxItems": 10
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "created_by": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "updated_by": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "tenant_id",
                "slug",
                "title",
                "kind",
                "organization_id",
                "status",
                "sections",
                "sort_order",
                "published_at",
                "created_at",
                "updated_at",
                "created_by",
                "updated_by"
              ]
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "PublicContentPageList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "slug": {
                  "type": "string",
                  "minLength": 2,
                  "maxLength": 64,
                  "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
                },
                "title": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "page"
                  ]
                },
                "organization_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "draft",
                    "published",
                    "archived"
                  ]
                },
                "parent_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "in_footer": {
                  "type": "boolean"
                },
                "is_link": {
                  "type": "boolean"
                },
                "link_url": {
                  "oneOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 2048
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "new_tab": {
                  "type": "boolean"
                },
                "sort_order": {
                  "type": "integer"
                },
                "published_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "seo_title": {
                  "oneOf": [
                    {
                      "type": "string",
                      "maxLength": 70
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "seo_description": {
                  "oneOf": [
                    {
                      "type": "string",
                      "maxLength": 300
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "revision": {
                  "type": "integer",
                  "minimum": 1
                },
                "sections": {
                  "type": "array",
                  "items": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "heading"
                            ]
                          },
                          "text": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 240
                          },
                          "level": {
                            "oneOf": [
                              {
                                "type": "number",
                                "enum": [
                                  2
                                ]
                              },
                              {
                                "type": "number",
                                "enum": [
                                  3
                                ]
                              },
                              {
                                "type": "number",
                                "enum": [
                                  4
                                ]
                              }
                            ]
                          }
                        },
                        "required": [
                          "type",
                          "text",
                          "level"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "paragraph"
                            ]
                          },
                          "text": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 10000
                          }
                        },
                        "required": [
                          "type",
                          "text"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "list"
                            ]
                          },
                          "items": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 500
                            },
                            "minItems": 1,
                            "maxItems": 100
                          }
                        },
                        "required": [
                          "type",
                          "items"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "link_group"
                            ]
                          },
                          "links": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "label": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 200
                                },
                                "url": {
                                  "type": "string",
                                  "format": "uri",
                                  "pattern": "^https?:\\/\\/"
                                }
                              },
                              "required": [
                                "label",
                                "url"
                              ]
                            },
                            "minItems": 1,
                            "maxItems": 100
                          }
                        },
                        "required": [
                          "type",
                          "links"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "contact"
                            ]
                          },
                          "name": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          },
                          "email": {
                            "type": "string",
                            "format": "email"
                          },
                          "phone": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 80
                          },
                          "address": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 500
                          }
                        },
                        "required": [
                          "type",
                          "name"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "image"
                            ]
                          },
                          "url": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 2048
                          },
                          "alt": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 300
                          },
                          "caption": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 300
                          }
                        },
                        "required": [
                          "type",
                          "url",
                          "alt"
                        ]
                      }
                    ]
                  },
                  "maxItems": 200
                },
                "cover": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "url": {
                          "type": "string",
                          "format": "uri"
                        },
                        "alt": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "url",
                        "alt"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "slug",
                "title",
                "kind",
                "organization_id",
                "status",
                "sort_order",
                "published_at",
                "sections"
              ]
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "ContentPageCreateRequest": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string",
            "minLength": 2,
            "maxLength": 64,
            "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "kind": {
            "type": "string",
            "enum": [
              "page"
            ]
          },
          "organization_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "sections": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "heading"
                      ]
                    },
                    "text": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 240
                    },
                    "level": {
                      "oneOf": [
                        {
                          "type": "number",
                          "enum": [
                            2
                          ]
                        },
                        {
                          "type": "number",
                          "enum": [
                            3
                          ]
                        },
                        {
                          "type": "number",
                          "enum": [
                            4
                          ]
                        }
                      ]
                    }
                  },
                  "required": [
                    "type",
                    "text",
                    "level"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "paragraph"
                      ]
                    },
                    "text": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 10000
                    }
                  },
                  "required": [
                    "type",
                    "text"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "list"
                      ]
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500
                      },
                      "minItems": 1,
                      "maxItems": 100
                    }
                  },
                  "required": [
                    "type",
                    "items"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "link_group"
                      ]
                    },
                    "links": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "label": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          },
                          "url": {
                            "type": "string",
                            "format": "uri",
                            "pattern": "^https?:\\/\\/"
                          }
                        },
                        "required": [
                          "label",
                          "url"
                        ]
                      },
                      "minItems": 1,
                      "maxItems": 100
                    }
                  },
                  "required": [
                    "type",
                    "links"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "contact"
                      ]
                    },
                    "name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "email": {
                      "type": "string",
                      "format": "email"
                    },
                    "phone": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 80
                    },
                    "address": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 500
                    }
                  },
                  "required": [
                    "type",
                    "name"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "image"
                      ]
                    },
                    "url": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 2048
                    },
                    "alt": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 300
                    },
                    "caption": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 300
                    }
                  },
                  "required": [
                    "type",
                    "url",
                    "alt"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "archive_image"
                      ]
                    },
                    "media_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "alt": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 300
                    },
                    "caption": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 300
                    }
                  },
                  "required": [
                    "type",
                    "media_id",
                    "alt"
                  ]
                }
              ]
            },
            "maxItems": 200
          },
          "parent_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "in_footer": {
            "type": "boolean"
          },
          "is_link": {
            "type": "boolean"
          },
          "link_url": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 2048
              },
              {
                "type": "null"
              }
            ]
          },
          "new_tab": {
            "type": "boolean"
          },
          "sort_order": {
            "type": "integer"
          },
          "seo_title": {
            "oneOf": [
              {
                "type": "string",
                "maxLength": 70
              },
              {
                "type": "null"
              }
            ]
          },
          "seo_description": {
            "oneOf": [
              {
                "type": "string",
                "maxLength": 300
              },
              {
                "type": "null"
              }
            ]
          },
          "cover_media_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "cover_alt": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 300
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "slug",
          "title",
          "kind",
          "organization_id",
          "sections",
          "sort_order"
        ]
      },
      "ContentPagePublishRequest": {
        "type": "object",
        "properties": {
          "acknowledge_personal_data": {
            "type": "boolean"
          }
        },
        "required": []
      },
      "ContentPageUpdateRequest": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string",
            "minLength": 2,
            "maxLength": 64,
            "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "kind": {
            "type": "string",
            "enum": [
              "page"
            ]
          },
          "organization_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "sections": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "heading"
                      ]
                    },
                    "text": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 240
                    },
                    "level": {
                      "oneOf": [
                        {
                          "type": "number",
                          "enum": [
                            2
                          ]
                        },
                        {
                          "type": "number",
                          "enum": [
                            3
                          ]
                        },
                        {
                          "type": "number",
                          "enum": [
                            4
                          ]
                        }
                      ]
                    }
                  },
                  "required": [
                    "type",
                    "text",
                    "level"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "paragraph"
                      ]
                    },
                    "text": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 10000
                    }
                  },
                  "required": [
                    "type",
                    "text"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "list"
                      ]
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500
                      },
                      "minItems": 1,
                      "maxItems": 100
                    }
                  },
                  "required": [
                    "type",
                    "items"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "link_group"
                      ]
                    },
                    "links": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "label": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          },
                          "url": {
                            "type": "string",
                            "format": "uri",
                            "pattern": "^https?:\\/\\/"
                          }
                        },
                        "required": [
                          "label",
                          "url"
                        ]
                      },
                      "minItems": 1,
                      "maxItems": 100
                    }
                  },
                  "required": [
                    "type",
                    "links"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "contact"
                      ]
                    },
                    "name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "email": {
                      "type": "string",
                      "format": "email"
                    },
                    "phone": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 80
                    },
                    "address": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 500
                    }
                  },
                  "required": [
                    "type",
                    "name"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "image"
                      ]
                    },
                    "url": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 2048
                    },
                    "alt": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 300
                    },
                    "caption": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 300
                    }
                  },
                  "required": [
                    "type",
                    "url",
                    "alt"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "archive_image"
                      ]
                    },
                    "media_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "alt": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 300
                    },
                    "caption": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 300
                    }
                  },
                  "required": [
                    "type",
                    "media_id",
                    "alt"
                  ]
                }
              ]
            },
            "maxItems": 200
          },
          "parent_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "in_footer": {
            "type": "boolean"
          },
          "is_link": {
            "type": "boolean"
          },
          "link_url": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 2048
              },
              {
                "type": "null"
              }
            ]
          },
          "new_tab": {
            "type": "boolean"
          },
          "sort_order": {
            "type": "integer"
          },
          "seo_title": {
            "oneOf": [
              {
                "type": "string",
                "maxLength": 70
              },
              {
                "type": "null"
              }
            ]
          },
          "seo_description": {
            "oneOf": [
              {
                "type": "string",
                "maxLength": 300
              },
              {
                "type": "null"
              }
            ]
          },
          "cover_media_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "cover_alt": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 300
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": []
      },
      "NewsCategory": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "slug": {
            "type": "string",
            "minLength": 2,
            "maxLength": 64,
            "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
          },
          "label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "sort_order": {
            "type": "integer"
          },
          "active": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "updated_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "tenant_id",
          "slug",
          "label",
          "sort_order",
          "active",
          "created_at",
          "updated_at",
          "created_by",
          "updated_by"
        ]
      },
      "NewsCategoryList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "tenant_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "slug": {
                  "type": "string",
                  "minLength": 2,
                  "maxLength": 64,
                  "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
                },
                "label": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120
                },
                "sort_order": {
                  "type": "integer"
                },
                "active": {
                  "type": "boolean"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "created_by": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "updated_by": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "tenant_id",
                "slug",
                "label",
                "sort_order",
                "active",
                "created_at",
                "updated_at",
                "created_by",
                "updated_by"
              ]
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "NewsCategoryCreateRequest": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string",
            "minLength": 2,
            "maxLength": 64,
            "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
          },
          "label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "sort_order": {
            "type": "integer"
          },
          "active": {
            "type": "boolean"
          }
        },
        "required": [
          "slug",
          "label",
          "sort_order"
        ]
      },
      "NewsCategoryUpdateRequest": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string",
            "minLength": 2,
            "maxLength": 64,
            "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
          },
          "label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "sort_order": {
            "type": "integer"
          },
          "active": {
            "type": "boolean"
          }
        },
        "required": []
      },
      "PublicNewsCategory": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "slug": {
            "type": "string",
            "minLength": 2,
            "maxLength": 64,
            "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
          },
          "label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "sort_order": {
            "type": "integer"
          }
        },
        "required": [
          "id",
          "slug",
          "label",
          "sort_order"
        ]
      },
      "PublicNewsCategoryList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "slug": {
                  "type": "string",
                  "minLength": 2,
                  "maxLength": 64,
                  "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
                },
                "label": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120
                },
                "sort_order": {
                  "type": "integer"
                }
              },
              "required": [
                "id",
                "slug",
                "label",
                "sort_order"
              ]
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "CheckinSessionRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "match_id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "enum": [
              "scheduled",
              "open",
              "closed"
            ]
          },
          "qr_token": {
            "type": "string",
            "minLength": 24,
            "maxLength": 128
          },
          "opened_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "closed_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "expires_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "rotated_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "updated_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "tenant_id",
          "match_id",
          "status",
          "qr_token",
          "opened_at",
          "closed_at",
          "expires_at",
          "rotated_at",
          "created_at",
          "updated_at",
          "created_by",
          "updated_by"
        ]
      },
      "CheckinSessionList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "tenant_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "match_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "scheduled",
                    "open",
                    "closed"
                  ]
                },
                "qr_token": {
                  "type": "string",
                  "minLength": 24,
                  "maxLength": 128
                },
                "opened_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "closed_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "expires_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "rotated_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "created_by": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "updated_by": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "tenant_id",
                "match_id",
                "status",
                "qr_token",
                "opened_at",
                "closed_at",
                "expires_at",
                "rotated_at",
                "created_at",
                "updated_at",
                "created_by",
                "updated_by"
              ]
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "PublicCheckinSessionRow": {
        "type": "object",
        "properties": {
          "match_id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "enum": [
              "scheduled",
              "open",
              "closed"
            ]
          },
          "qr_token": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 24,
                "maxLength": 128
              },
              {
                "type": "null"
              }
            ]
          },
          "qr_text": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "expires_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "match_id",
          "status",
          "qr_token",
          "qr_text",
          "expires_at"
        ]
      },
      "AdminCheckinSessionOpenRequest": {
        "type": "object",
        "properties": {
          "match_id": {
            "type": "string",
            "format": "uuid"
          },
          "expires_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "match_id"
        ]
      },
      "MeCheckinRequest": {
        "type": "object",
        "properties": {
          "qr_token": {
            "type": "string",
            "minLength": 24,
            "maxLength": 128
          }
        },
        "required": [
          "qr_token"
        ]
      },
      "MeCheckinResponse": {
        "type": "object",
        "properties": {
          "checkin": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "session_id": {
                "type": "string",
                "format": "uuid"
              },
              "match_id": {
                "type": "string",
                "format": "uuid"
              },
              "checked_in_at": {
                "type": "string",
                "format": "date-time"
              },
              "geolocation_consent_granted": {
                "type": "boolean"
              },
              "badge_awarded": {
                "type": "boolean"
              },
              "fan_mvp_player_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "id",
              "session_id",
              "match_id",
              "checked_in_at",
              "geolocation_consent_granted",
              "badge_awarded"
            ]
          },
          "badge": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "badge_code": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 160
                  },
                  "description": {
                    "oneOf": [
                      {
                        "type": "string",
                        "maxLength": 500
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "earned_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "source_match_id": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "id",
                  "badge_code",
                  "label",
                  "earned_at",
                  "source_match_id"
                ]
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "checkin",
          "badge"
        ]
      },
      "MeCheckinList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "session_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "match_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "checked_in_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "geolocation_consent_granted": {
                  "type": "boolean"
                },
                "badge_awarded": {
                  "type": "boolean"
                },
                "fan_mvp_player_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "session_id",
                "match_id",
                "checked_in_at",
                "geolocation_consent_granted",
                "badge_awarded"
              ]
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "FanBadgeList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "badge_code": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 80
                },
                "label": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 160
                },
                "description": {
                  "oneOf": [
                    {
                      "type": "string",
                      "maxLength": 500
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "earned_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "source_match_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "badge_code",
                "label",
                "earned_at",
                "source_match_id"
              ]
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "FanBadgeBoardResponse": {
        "type": "object",
        "properties": {
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "state": {
            "type": "string",
            "enum": [
              "ready",
              "catalog_not_published",
              "module_disabled"
            ]
          },
          "catalog_version": {
            "oneOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "tenant_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "definition_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "badge_code": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 80
                },
                "label": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 160
                },
                "description": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 500
                },
                "rule_type": {
                  "type": "string",
                  "enum": [
                    "checkin_count",
                    "manual"
                  ]
                },
                "threshold": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "version": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "state": {
                  "type": "string",
                  "enum": [
                    "locked",
                    "unlocked"
                  ]
                },
                "current": {
                  "type": "integer",
                  "minimum": 0
                },
                "progress_percent": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 100
                },
                "earned_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "source_match_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "tenant_id",
                "definition_id",
                "badge_code",
                "label",
                "description",
                "rule_type",
                "threshold",
                "version",
                "state",
                "current",
                "progress_percent",
                "earned_at",
                "source_match_id"
              ]
            }
          }
        },
        "required": [
          "tenant_id",
          "state",
          "catalog_version",
          "items"
        ]
      },
      "AdminBadgeDefinitionRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "type": "string",
            "pattern": "^[a-z0-9][a-z0-9._-]{0,79}$"
          },
          "label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "description": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          },
          "rule_type": {
            "type": "string",
            "enum": [
              "checkin_count",
              "manual"
            ]
          },
          "threshold": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "enabled": {
            "type": "boolean"
          },
          "version": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "published_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "updated_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "tenant_id",
          "code",
          "label",
          "description",
          "rule_type",
          "threshold",
          "enabled",
          "version",
          "published_at",
          "created_at",
          "updated_at",
          "created_by",
          "updated_by"
        ]
      },
      "AdminBadgeDefinitionList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "tenant_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "code": {
                  "type": "string",
                  "pattern": "^[a-z0-9][a-z0-9._-]{0,79}$"
                },
                "label": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 160
                },
                "description": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 500
                },
                "rule_type": {
                  "type": "string",
                  "enum": [
                    "checkin_count",
                    "manual"
                  ]
                },
                "threshold": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "enabled": {
                  "type": "boolean"
                },
                "version": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "published_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "created_by": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "updated_by": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "tenant_id",
                "code",
                "label",
                "description",
                "rule_type",
                "threshold",
                "enabled",
                "version",
                "published_at",
                "created_at",
                "updated_at",
                "created_by",
                "updated_by"
              ]
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "AdminBadgeDefinitionSaveRequest": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "pattern": "^[a-z0-9][a-z0-9._-]{0,79}$"
          },
          "label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "description": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          },
          "rule_type": {
            "type": "string",
            "enum": [
              "checkin_count",
              "manual"
            ]
          },
          "threshold": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "enabled": {
            "type": "boolean"
          },
          "version": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "code",
          "label",
          "description",
          "rule_type",
          "threshold",
          "enabled",
          "version"
        ]
      },
      "AdminBadgeCatalogPublishRequest": {
        "type": "object",
        "properties": {
          "version": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "version"
        ]
      },
      "MeFanMvpVoteRequest": {
        "type": "object",
        "properties": {
          "player_id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "player_id"
        ]
      },
      "FanMvpVoteSelfResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "session_id": {
            "type": "string",
            "format": "uuid"
          },
          "match_id": {
            "type": "string",
            "format": "uuid"
          },
          "player_id": {
            "type": "string",
            "format": "uuid"
          },
          "voted_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "session_id",
          "match_id",
          "player_id",
          "voted_at"
        ]
      },
      "CampaignRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "sponsor_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "creative_url": {
            "type": "string",
            "format": "uri",
            "pattern": "^https?:\\/\\/"
          },
          "eligible_slots": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "feed_card",
                "standings_banner",
                "live_overlay",
                "mvp_card",
                "top8_card"
              ]
            },
            "minItems": 1
          },
          "starts_at": {
            "type": "string",
            "format": "date-time"
          },
          "ends_at": {
            "type": "string",
            "format": "date-time"
          },
          "impression_cap": {
            "type": "integer",
            "minimum": 0
          },
          "impressions_served": {
            "type": "integer",
            "minimum": 0
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "pending_review",
              "active",
              "paused",
              "completed",
              "archived"
            ]
          },
          "paused_reason": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "advertiser_name": {
            "type": "string",
            "maxLength": 200,
            "default": ""
          },
          "paid_for_by": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "content_category": {
            "type": "string",
            "enum": [
              "general",
              "food_beverage",
              "sport_equipment",
              "local_services",
              "gambling",
              "alcohol",
              "betting",
              "other"
            ],
            "default": "general"
          },
          "audience_suitability": {
            "type": "string",
            "enum": [
              "all_ages",
              "adults_only"
            ],
            "default": "all_ages"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "updated_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "tenant_id",
          "sponsor_name",
          "title",
          "creative_url",
          "eligible_slots",
          "starts_at",
          "ends_at",
          "impression_cap",
          "impressions_served",
          "status",
          "paused_reason",
          "created_at",
          "updated_at",
          "created_by",
          "updated_by"
        ]
      },
      "CampaignList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "tenant_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "sponsor_name": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "title": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "creative_url": {
                  "type": "string",
                  "format": "uri",
                  "pattern": "^https?:\\/\\/"
                },
                "eligible_slots": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "feed_card",
                      "standings_banner",
                      "live_overlay",
                      "mvp_card",
                      "top8_card"
                    ]
                  },
                  "minItems": 1
                },
                "starts_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "ends_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "impression_cap": {
                  "type": "integer",
                  "minimum": 0
                },
                "impressions_served": {
                  "type": "integer",
                  "minimum": 0
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "draft",
                    "pending_review",
                    "active",
                    "paused",
                    "completed",
                    "archived"
                  ]
                },
                "paused_reason": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "advertiser_name": {
                  "type": "string",
                  "maxLength": 200,
                  "default": ""
                },
                "paid_for_by": {
                  "oneOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "content_category": {
                  "type": "string",
                  "enum": [
                    "general",
                    "food_beverage",
                    "sport_equipment",
                    "local_services",
                    "gambling",
                    "alcohol",
                    "betting",
                    "other"
                  ],
                  "default": "general"
                },
                "audience_suitability": {
                  "type": "string",
                  "enum": [
                    "all_ages",
                    "adults_only"
                  ],
                  "default": "all_ages"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "created_by": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "updated_by": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "tenant_id",
                "sponsor_name",
                "title",
                "creative_url",
                "eligible_slots",
                "starts_at",
                "ends_at",
                "impression_cap",
                "impressions_served",
                "status",
                "paused_reason",
                "created_at",
                "updated_at",
                "created_by",
                "updated_by"
              ]
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "CampaignCreateRequest": {
        "type": "object",
        "properties": {
          "sponsor_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "creative_url": {
            "type": "string",
            "format": "uri",
            "pattern": "^https?:\\/\\/"
          },
          "eligible_slots": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "feed_card",
                "standings_banner",
                "live_overlay",
                "mvp_card",
                "top8_card"
              ]
            },
            "minItems": 1
          },
          "starts_at": {
            "type": "string",
            "format": "date-time"
          },
          "ends_at": {
            "type": "string",
            "format": "date-time"
          },
          "impression_cap": {
            "type": "integer",
            "minimum": 0
          },
          "advertiser_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "paid_for_by": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              {
                "type": "null"
              }
            ]
          },
          "content_category": {
            "type": "string",
            "enum": [
              "general",
              "food_beverage",
              "sport_equipment",
              "local_services",
              "gambling",
              "alcohol",
              "betting",
              "other"
            ],
            "default": "general"
          },
          "audience_suitability": {
            "type": "string",
            "enum": [
              "all_ages",
              "adults_only"
            ],
            "default": "all_ages"
          }
        },
        "required": [
          "sponsor_name",
          "title",
          "creative_url",
          "eligible_slots",
          "starts_at",
          "ends_at",
          "impression_cap"
        ]
      },
      "CampaignStatusRequest": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "pending_review",
              "active",
              "paused",
              "completed",
              "archived"
            ]
          },
          "paused_reason": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "status"
        ]
      },
      "SponsorImpressionRequest": {
        "type": "object",
        "properties": {
          "slot": {
            "type": "string",
            "enum": [
              "feed_card",
              "standings_banner",
              "live_overlay",
              "mvp_card",
              "top8_card"
            ]
          }
        },
        "required": [
          "slot"
        ],
        "additionalProperties": false
      },
      "SponsorClickRequest": {
        "type": "object",
        "properties": {
          "slot": {
            "type": "string",
            "enum": [
              "feed_card",
              "standings_banner",
              "live_overlay",
              "mvp_card",
              "top8_card"
            ]
          },
          "click_token": {
            "type": "string",
            "minLength": 16,
            "maxLength": 512
          }
        },
        "required": [
          "slot",
          "click_token"
        ],
        "additionalProperties": false
      },
      "PublicSponsor": {
        "type": "object",
        "properties": {
          "campaign_id": {
            "type": "string",
            "format": "uuid"
          },
          "sponsor_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "creative_url": {
            "type": "string",
            "format": "uri",
            "pattern": "^https?:\\/\\/"
          },
          "slot": {
            "type": "string",
            "enum": [
              "feed_card",
              "standings_banner",
              "live_overlay",
              "mvp_card",
              "top8_card"
            ]
          },
          "advertiser_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "paid_for_by": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              {
                "type": "null"
              }
            ]
          },
          "content_category": {
            "type": "string",
            "enum": [
              "general",
              "food_beverage",
              "sport_equipment",
              "local_services",
              "gambling",
              "alcohol",
              "betting",
              "other"
            ]
          },
          "click_token": {
            "type": "string",
            "minLength": 16,
            "maxLength": 512
          }
        },
        "required": [
          "campaign_id",
          "sponsor_name",
          "title",
          "creative_url",
          "slot",
          "advertiser_name",
          "paid_for_by",
          "content_category",
          "click_token"
        ]
      },
      "SponsorAnalyticsResponse": {
        "type": "object",
        "properties": {
          "buckets": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "campaign_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "slot": {
                  "type": "string",
                  "enum": [
                    "feed_card",
                    "standings_banner",
                    "live_overlay",
                    "mvp_card",
                    "top8_card"
                  ]
                },
                "date_bucket": {
                  "type": "string",
                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                },
                "impressions": {
                  "type": "integer",
                  "minimum": 0
                },
                "clicks": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "required": [
                "campaign_id",
                "slot",
                "impressions",
                "clicks"
              ]
            }
          }
        },
        "required": [
          "buckets"
        ]
      },
      "AdminEntitlementRow": {
        "type": "object",
        "properties": {
          "module": {
            "type": "string",
            "enum": [
              "sport_core",
              "live_reporting",
              "fantasy",
              "media_feed",
              "sponsor_inventory",
              "api_widgets",
              "white_label",
              "certification"
            ]
          },
          "state": {
            "type": "string",
            "enum": [
              "active",
              "inactive",
              "expired",
              "not_activated"
            ]
          },
          "active": {
            "type": "boolean"
          },
          "activated_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "expires_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "limits": {
            "type": "object",
            "properties": {
              "max_seats": {
                "type": "integer",
                "minimum": 0
              },
              "max_api_keys": {
                "type": "integer",
                "minimum": 0
              },
              "max_widgets": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [],
            "additionalProperties": false
          }
        },
        "required": [
          "module",
          "state",
          "active",
          "activated_at",
          "expires_at",
          "limits"
        ]
      },
      "AdminModuleActivationRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "module": {
            "type": "string",
            "enum": [
              "sport_core",
              "live_reporting",
              "fantasy",
              "media_feed",
              "sponsor_inventory",
              "api_widgets",
              "white_label",
              "certification"
            ]
          },
          "transition": {
            "type": "string",
            "enum": [
              "activated",
              "deactivated"
            ]
          },
          "occurred_at": {
            "type": "string",
            "format": "date-time"
          },
          "actor": {
            "type": "string"
          },
          "by_system": {
            "type": "boolean"
          },
          "expires_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "resulting_active": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "module",
          "transition",
          "occurred_at",
          "actor",
          "by_system",
          "expires_at",
          "resulting_active"
        ]
      },
      "AdminEntitlementListResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "module": {
                  "type": "string",
                  "enum": [
                    "sport_core",
                    "live_reporting",
                    "fantasy",
                    "media_feed",
                    "sponsor_inventory",
                    "api_widgets",
                    "white_label",
                    "certification"
                  ]
                },
                "state": {
                  "type": "string",
                  "enum": [
                    "active",
                    "inactive",
                    "expired",
                    "not_activated"
                  ]
                },
                "active": {
                  "type": "boolean"
                },
                "activated_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "expires_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "limits": {
                  "type": "object",
                  "properties": {
                    "max_seats": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "max_api_keys": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "max_widgets": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [],
                  "additionalProperties": false
                }
              },
              "required": [
                "module",
                "state",
                "active",
                "activated_at",
                "expires_at",
                "limits"
              ]
            }
          },
          "activations": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "module": {
                  "type": "string",
                  "enum": [
                    "sport_core",
                    "live_reporting",
                    "fantasy",
                    "media_feed",
                    "sponsor_inventory",
                    "api_widgets",
                    "white_label",
                    "certification"
                  ]
                },
                "transition": {
                  "type": "string",
                  "enum": [
                    "activated",
                    "deactivated"
                  ]
                },
                "occurred_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "actor": {
                  "type": "string"
                },
                "by_system": {
                  "type": "boolean"
                },
                "expires_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "resulting_active": {
                  "type": "boolean"
                }
              },
              "required": [
                "id",
                "module",
                "transition",
                "occurred_at",
                "actor",
                "by_system",
                "expires_at",
                "resulting_active"
              ]
            }
          }
        },
        "required": [
          "items",
          "activations"
        ]
      },
      "AdminEntitlementActivateRequest": {
        "type": "object",
        "properties": {
          "expires_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": []
      },
      "AdminTenantRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "slug": {
            "type": "string",
            "minLength": 2,
            "maxLength": 64,
            "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
          },
          "display_name": {
            "type": "string",
            "minLength": 1
          },
          "plan_id": {
            "type": "string",
            "format": "uuid"
          },
          "is_active": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "slug",
          "display_name",
          "plan_id",
          "is_active",
          "created_at",
          "updated_at"
        ]
      },
      "AdminPlanRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tier": {
            "type": "string",
            "enum": [
              "starter",
              "pro",
              "enterprise",
              "lc8_internal"
            ]
          },
          "modules": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "sport_core",
                "live_reporting",
                "fantasy",
                "media_feed",
                "sponsor_inventory",
                "api_widgets",
                "white_label",
                "certification"
              ]
            }
          },
          "description": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "id",
          "tier",
          "modules",
          "description"
        ]
      },
      "AdminTenantListResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "slug": {
                  "type": "string",
                  "minLength": 2,
                  "maxLength": 64,
                  "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
                },
                "display_name": {
                  "type": "string",
                  "minLength": 1
                },
                "plan_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "is_active": {
                  "type": "boolean"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "id",
                "slug",
                "display_name",
                "plan_id",
                "is_active",
                "created_at",
                "updated_at"
              ]
            }
          },
          "plans": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "tier": {
                  "type": "string",
                  "enum": [
                    "starter",
                    "pro",
                    "enterprise",
                    "lc8_internal"
                  ]
                },
                "modules": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "sport_core",
                      "live_reporting",
                      "fantasy",
                      "media_feed",
                      "sponsor_inventory",
                      "api_widgets",
                      "white_label",
                      "certification"
                    ]
                  }
                },
                "description": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "required": [
                "id",
                "tier",
                "modules",
                "description"
              ]
            }
          }
        },
        "required": [
          "items",
          "plans"
        ]
      },
      "AdminTenantCreateRequest": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string",
            "minLength": 2,
            "maxLength": 64,
            "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
          },
          "display_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "plan_id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "slug",
          "display_name",
          "plan_id"
        ]
      },
      "AdminTenantProvisionModuleResult": {
        "type": "object",
        "properties": {
          "module": {
            "type": "string",
            "enum": [
              "sport_core",
              "live_reporting",
              "fantasy",
              "media_feed",
              "sponsor_inventory",
              "api_widgets",
              "white_label",
              "certification"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "activated",
              "already_active",
              "failed"
            ]
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "module",
          "status"
        ]
      },
      "AdminTenantProvisionSeedResult": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "created",
              "already_present",
              "failed"
            ]
          },
          "created": {
            "type": "integer",
            "minimum": 0
          },
          "expected": {
            "type": "integer",
            "minimum": 0
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "status",
          "created",
          "expected"
        ]
      },
      "AdminTenantProvisionResponse": {
        "type": "object",
        "properties": {
          "tenant": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "slug": {
                "type": "string",
                "minLength": 2,
                "maxLength": 64,
                "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
              },
              "display_name": {
                "type": "string",
                "minLength": 1
              },
              "plan_id": {
                "type": "string",
                "format": "uuid"
              },
              "is_active": {
                "type": "boolean"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              }
            },
            "required": [
              "id",
              "slug",
              "display_name",
              "plan_id",
              "is_active",
              "created_at",
              "updated_at"
            ]
          },
          "plan": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "tier": {
                "type": "string",
                "enum": [
                  "starter",
                  "pro",
                  "enterprise",
                  "lc8_internal"
                ]
              },
              "modules": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "sport_core",
                    "live_reporting",
                    "fantasy",
                    "media_feed",
                    "sponsor_inventory",
                    "api_widgets",
                    "white_label",
                    "certification"
                  ]
                }
              },
              "description": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "id",
              "tier",
              "modules",
              "description"
            ]
          },
          "module_results": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "module": {
                  "type": "string",
                  "enum": [
                    "sport_core",
                    "live_reporting",
                    "fantasy",
                    "media_feed",
                    "sponsor_inventory",
                    "api_widgets",
                    "white_label",
                    "certification"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "activated",
                    "already_active",
                    "failed"
                  ]
                },
                "message": {
                  "type": "string"
                }
              },
              "required": [
                "module",
                "status"
              ]
            }
          },
          "provisioning_state": {
            "type": "string",
            "enum": [
              "ready",
              "partial"
            ]
          },
          "notification_templates_created": {
            "type": "integer",
            "minimum": 0
          },
          "policy_versions_created": {
            "type": "integer",
            "minimum": 0
          },
          "notification_templates": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "created",
                  "already_present",
                  "failed"
                ]
              },
              "created": {
                "type": "integer",
                "minimum": 0
              },
              "expected": {
                "type": "integer",
                "minimum": 0
              },
              "message": {
                "type": "string"
              }
            },
            "required": [
              "status",
              "created",
              "expected"
            ]
          },
          "policy_versions": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "created",
                  "already_present",
                  "failed"
                ]
              },
              "created": {
                "type": "integer",
                "minimum": 0
              },
              "expected": {
                "type": "integer",
                "minimum": 0
              },
              "message": {
                "type": "string"
              }
            },
            "required": [
              "status",
              "created",
              "expected"
            ]
          }
        },
        "required": [
          "tenant",
          "plan",
          "module_results",
          "provisioning_state",
          "notification_templates_created",
          "policy_versions_created",
          "notification_templates",
          "policy_versions"
        ]
      },
      "NotificationPreferenceRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "user_id": {
            "type": "string",
            "format": "uuid"
          },
          "channel": {
            "type": "string",
            "enum": [
              "push",
              "email",
              "inapp"
            ]
          },
          "category": {
            "type": "string",
            "enum": [
              "transactional",
              "match_alert",
              "fantasy",
              "official_communication",
              "marketing"
            ]
          },
          "enabled": {
            "type": "boolean"
          },
          "last_changed_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "updated_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "tenant_id",
          "user_id",
          "channel",
          "category",
          "enabled",
          "last_changed_at",
          "created_at",
          "updated_at",
          "created_by",
          "updated_by"
        ]
      },
      "NotificationPreferenceList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "tenant_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "user_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "channel": {
                  "type": "string",
                  "enum": [
                    "push",
                    "email",
                    "inapp"
                  ]
                },
                "category": {
                  "type": "string",
                  "enum": [
                    "transactional",
                    "match_alert",
                    "fantasy",
                    "official_communication",
                    "marketing"
                  ]
                },
                "enabled": {
                  "type": "boolean"
                },
                "last_changed_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "created_by": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "updated_by": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "tenant_id",
                "user_id",
                "channel",
                "category",
                "enabled",
                "last_changed_at",
                "created_at",
                "updated_at",
                "created_by",
                "updated_by"
              ]
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "NotificationPreferenceUpdate": {
        "type": "object",
        "properties": {
          "channel": {
            "type": "string",
            "enum": [
              "push",
              "email",
              "inapp"
            ]
          },
          "category": {
            "type": "string",
            "enum": [
              "transactional",
              "match_alert",
              "fantasy",
              "official_communication",
              "marketing"
            ]
          },
          "enabled": {
            "type": "boolean"
          }
        },
        "required": [
          "channel",
          "category",
          "enabled"
        ]
      },
      "PushDeviceRegisterRequest": {
        "type": "object",
        "properties": {
          "platform": {
            "type": "string",
            "enum": [
              "ios",
              "android",
              "web"
            ]
          },
          "token": {
            "type": "string",
            "minLength": 8,
            "maxLength": 512
          },
          "device_label": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 120
              },
              {
                "type": "null"
              }
            ]
          },
          "app_version": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 80
              },
              {
                "type": "null"
              }
            ]
          },
          "replaces_device_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "platform",
          "token"
        ]
      },
      "PushDeviceSelfListResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "platform": {
                  "type": "string",
                  "enum": [
                    "ios",
                    "android",
                    "web"
                  ]
                },
                "token_hint": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 24
                },
                "device_label": {
                  "oneOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 120
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "app_version": {
                  "oneOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 80
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "consent_verified_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "last_seen_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "revoked_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "platform",
                "token_hint",
                "device_label",
                "app_version",
                "consent_verified_at",
                "last_seen_at",
                "revoked_at"
              ]
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "PushDeviceSelfResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "platform": {
            "type": "string",
            "enum": [
              "ios",
              "android",
              "web"
            ]
          },
          "token_hint": {
            "type": "string",
            "minLength": 1,
            "maxLength": 24
          },
          "device_label": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 120
              },
              {
                "type": "null"
              }
            ]
          },
          "app_version": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 80
              },
              {
                "type": "null"
              }
            ]
          },
          "consent_verified_at": {
            "type": "string",
            "format": "date-time"
          },
          "last_seen_at": {
            "type": "string",
            "format": "date-time"
          },
          "revoked_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "platform",
          "token_hint",
          "device_label",
          "app_version",
          "consent_verified_at",
          "last_seen_at",
          "revoked_at"
        ]
      },
      "NotificationMessageRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "channel": {
            "type": "string",
            "enum": [
              "push",
              "email",
              "inapp"
            ]
          },
          "category": {
            "type": "string",
            "enum": [
              "transactional",
              "match_alert",
              "fantasy",
              "official_communication",
              "marketing"
            ]
          },
          "preview_safe": {
            "type": "string",
            "minLength": 1,
            "maxLength": 180
          },
          "title_safe": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 80
              },
              {
                "type": "null"
              }
            ]
          },
          "body_safe": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 600
              },
              {
                "type": "null"
              }
            ]
          },
          "target_href": {
            "oneOf": [
              {
                "type": "string",
                "maxLength": 300
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "sending",
              "delivered",
              "failed",
              "dead_letter",
              "suppressed"
            ]
          },
          "scheduled_for": {
            "type": "string",
            "format": "date-time"
          },
          "read_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "dismissed_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "channel",
          "category",
          "preview_safe",
          "status",
          "scheduled_for"
        ]
      },
      "NotificationMessageList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "channel": {
                  "type": "string",
                  "enum": [
                    "push",
                    "email",
                    "inapp"
                  ]
                },
                "category": {
                  "type": "string",
                  "enum": [
                    "transactional",
                    "match_alert",
                    "fantasy",
                    "official_communication",
                    "marketing"
                  ]
                },
                "preview_safe": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 180
                },
                "title_safe": {
                  "oneOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 80
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "body_safe": {
                  "oneOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 600
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "target_href": {
                  "oneOf": [
                    {
                      "type": "string",
                      "maxLength": 300
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "queued",
                    "sending",
                    "delivered",
                    "failed",
                    "dead_letter",
                    "suppressed"
                  ]
                },
                "scheduled_for": {
                  "type": "string",
                  "format": "date-time"
                },
                "read_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "dismissed_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "channel",
                "category",
                "preview_safe",
                "status",
                "scheduled_for"
              ]
            },
            "maxItems": 100
          },
          "next_cursor": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 400
              },
              {
                "type": "null"
              }
            ]
          },
          "unread_count": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "items",
          "next_cursor",
          "unread_count"
        ]
      },
      "NotificationDismissReceipt": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "accepted"
            ]
          },
          "notification_id": {
            "type": "string",
            "format": "uuid"
          },
          "dismissed_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "status",
          "notification_id",
          "dismissed_at"
        ]
      },
      "NotificationDismissReadResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "accepted"
            ]
          },
          "dismissed_count": {
            "type": "integer",
            "minimum": 0
          },
          "dismissed_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "status",
          "dismissed_count",
          "dismissed_at"
        ]
      },
      "NotificationMarkAllReadResponse": {
        "type": "object",
        "properties": {
          "updated_count": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "updated_count"
        ]
      },
      "SystemNotificationTemplateSpecRow": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "category": {
            "type": "string",
            "enum": [
              "transactional",
              "match_alert",
              "fantasy",
              "official_communication",
              "marketing"
            ]
          },
          "variables": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 60
            },
            "maxItems": 20
          }
        },
        "required": [
          "code",
          "category",
          "variables"
        ]
      },
      "SystemNotificationTemplateSpecList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120
                },
                "category": {
                  "type": "string",
                  "enum": [
                    "transactional",
                    "match_alert",
                    "fantasy",
                    "official_communication",
                    "marketing"
                  ]
                },
                "variables": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 60
                  },
                  "maxItems": 20
                }
              },
              "required": [
                "code",
                "category",
                "variables"
              ]
            },
            "maxItems": 100
          }
        },
        "required": [
          "items"
        ]
      },
      "NotificationCampaignEnqueueRequest": {
        "type": "object",
        "properties": {
          "template_id": {
            "type": "string",
            "format": "uuid"
          },
          "channel": {
            "type": "string",
            "enum": [
              "push",
              "email",
              "inapp"
            ]
          },
          "category": {
            "type": "string",
            "enum": [
              "transactional",
              "match_alert",
              "fantasy",
              "official_communication",
              "marketing"
            ]
          },
          "allowed_roles": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "platform_admin",
                "tenant_admin",
                "org_admin",
                "org_operator",
                "manager",
                "assistant",
                "scorer",
                "team_captain",
                "team_coach",
                "team_staff",
                "team_member",
                "coach",
                "staff",
                "referee",
                "evaluator",
                "fantasy_manager",
                "media_editor",
                "sponsor_manager",
                "dpo",
                "support",
                "external_organizer",
                "public_user",
                "tournament_admin",
                "group_admin",
                "medical_officer",
                "hostess",
                "journalist",
                "photographer",
                "club_admin"
              ]
            }
          },
          "scheduled_for": {
            "type": "string",
            "format": "date-time"
          },
          "idempotency_namespace": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "dry_run": {
            "type": "boolean",
            "default": false
          },
          "tenant_wide_confirmation": {
            "type": "object",
            "properties": {
              "confirmed": {
                "type": "boolean",
                "enum": [
                  true
                ]
              },
              "phrase": {
                "type": "string",
                "enum": [
                  "CONFERMO INVIO A TUTTO IL TENANT"
                ]
              },
              "dry_run_receipt": {
                "type": "string",
                "minLength": 32,
                "maxLength": 4000
              }
            },
            "required": [
              "confirmed",
              "phrase",
              "dry_run_receipt"
            ]
          }
        },
        "required": [
          "template_id",
          "channel",
          "category",
          "allowed_roles",
          "scheduled_for",
          "idempotency_namespace"
        ]
      },
      "NotificationCampaignEnqueueResponse": {
        "type": "object",
        "properties": {
          "mode": {
            "type": "string",
            "enum": [
              "dry_run",
              "send"
            ]
          },
          "recipient_count": {
            "type": "integer",
            "minimum": 0
          },
          "enqueued_count": {
            "type": "integer",
            "minimum": 0
          },
          "suppressed_count": {
            "type": "integer",
            "minimum": 0
          },
          "idempotency_namespace": {
            "type": "string"
          },
          "channel_configured": {
            "type": "boolean"
          },
          "channel_mode": {
            "type": "string",
            "enum": [
              "live",
              "degraded"
            ]
          },
          "dry_run_receipt": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "dry_run_expires_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "mode",
          "recipient_count",
          "enqueued_count",
          "suppressed_count",
          "idempotency_namespace",
          "channel_configured",
          "channel_mode",
          "dry_run_receipt",
          "dry_run_expires_at"
        ]
      },
      "NotificationTemplate": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "category": {
            "type": "string",
            "enum": [
              "transactional",
              "match_alert",
              "fantasy",
              "official_communication",
              "marketing"
            ]
          },
          "title_template": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "body_template": {
            "type": "string",
            "minLength": 1,
            "maxLength": 600
          },
          "is_active": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "updated_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "tenant_id",
          "code",
          "category",
          "title_template",
          "body_template",
          "is_active",
          "created_at",
          "updated_at",
          "created_by",
          "updated_by"
        ]
      },
      "NotificationTemplateCreateRequest": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "category": {
            "type": "string",
            "enum": [
              "transactional",
              "match_alert",
              "fantasy",
              "official_communication",
              "marketing"
            ]
          },
          "title_template": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "body_template": {
            "type": "string",
            "minLength": 1,
            "maxLength": 600
          },
          "is_active": {
            "type": "boolean",
            "default": true
          }
        },
        "required": [
          "code",
          "category",
          "title_template",
          "body_template"
        ]
      },
      "NotificationTemplateUpdateRequest": {
        "type": "object",
        "properties": {
          "category": {
            "type": "string",
            "enum": [
              "transactional",
              "match_alert",
              "fantasy",
              "official_communication",
              "marketing"
            ]
          },
          "title_template": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "body_template": {
            "type": "string",
            "minLength": 1,
            "maxLength": 600
          },
          "is_active": {
            "type": "boolean"
          }
        },
        "required": []
      },
      "OperationalNoticeFanoutRequest": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "fixture_change",
              "sanction",
              "deadline",
              "eligibility_blocker",
              "report_deadline"
            ]
          },
          "template_id": {
            "type": "string",
            "format": "uuid"
          },
          "channel": {
            "type": "string",
            "enum": [
              "push",
              "email",
              "inapp"
            ]
          },
          "allowed_roles": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "platform_admin",
                "tenant_admin",
                "org_admin",
                "org_operator",
                "manager",
                "assistant",
                "scorer",
                "team_captain",
                "team_coach",
                "team_staff",
                "team_member",
                "coach",
                "staff",
                "referee",
                "evaluator",
                "fantasy_manager",
                "media_editor",
                "sponsor_manager",
                "dpo",
                "support",
                "external_organizer",
                "public_user",
                "tournament_admin",
                "group_admin",
                "medical_officer",
                "hostess",
                "journalist",
                "photographer",
                "club_admin"
              ]
            }
          },
          "scheduled_for": {
            "type": "string",
            "format": "date-time"
          },
          "idempotency_namespace": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "dry_run": {
            "type": "boolean",
            "default": false
          },
          "tenant_wide_confirmation": {
            "type": "object",
            "properties": {
              "confirmed": {
                "type": "boolean",
                "enum": [
                  true
                ]
              },
              "phrase": {
                "type": "string",
                "enum": [
                  "CONFERMO INVIO A TUTTO IL TENANT"
                ]
              },
              "dry_run_receipt": {
                "type": "string",
                "minLength": 32,
                "maxLength": 4000
              }
            },
            "required": [
              "confirmed",
              "phrase",
              "dry_run_receipt"
            ]
          }
        },
        "required": [
          "kind",
          "template_id",
          "channel",
          "allowed_roles",
          "scheduled_for",
          "idempotency_namespace"
        ]
      },
      "OperationalNoticeFanoutResponse": {
        "type": "object",
        "properties": {
          "mode": {
            "type": "string",
            "enum": [
              "dry_run",
              "send"
            ]
          },
          "recipient_count": {
            "type": "integer",
            "minimum": 0
          },
          "kind": {
            "type": "string",
            "enum": [
              "fixture_change",
              "sanction",
              "deadline",
              "eligibility_blocker",
              "report_deadline"
            ]
          },
          "category": {
            "type": "string",
            "enum": [
              "transactional",
              "match_alert",
              "fantasy",
              "official_communication",
              "marketing"
            ]
          },
          "enqueued_count": {
            "type": "integer",
            "minimum": 0
          },
          "suppressed_count": {
            "type": "integer",
            "minimum": 0
          },
          "idempotency_namespace": {
            "type": "string"
          },
          "channel_configured": {
            "type": "boolean"
          },
          "channel_mode": {
            "type": "string",
            "enum": [
              "live",
              "degraded"
            ]
          },
          "dry_run_receipt": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "dry_run_expires_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "mode",
          "recipient_count",
          "kind",
          "category",
          "enqueued_count",
          "suppressed_count",
          "idempotency_namespace",
          "channel_configured",
          "channel_mode",
          "dry_run_receipt",
          "dry_run_expires_at"
        ]
      },
      "NotificationChannelHealth": {
        "type": "object",
        "properties": {
          "inapp": {
            "type": "object",
            "properties": {
              "configured": {
                "type": "boolean"
              },
              "mode": {
                "type": "string",
                "enum": [
                  "live"
                ]
              }
            },
            "required": [
              "configured",
              "mode"
            ]
          },
          "email": {
            "type": "object",
            "properties": {
              "configured": {
                "type": "boolean"
              },
              "mode": {
                "type": "string",
                "enum": [
                  "live",
                  "degraded"
                ]
              }
            },
            "required": [
              "configured",
              "mode"
            ]
          },
          "push": {
            "type": "object",
            "properties": {
              "configured": {
                "type": "boolean"
              },
              "mode": {
                "type": "string",
                "enum": [
                  "live",
                  "degraded"
                ]
              }
            },
            "required": [
              "configured",
              "mode"
            ]
          }
        },
        "required": [
          "inapp",
          "email",
          "push"
        ]
      },
      "CorrectionSubmitRequest": {
        "type": "object",
        "properties": {
          "match_id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "type": "string",
            "enum": [
              "match_event",
              "match_score"
            ]
          },
          "requester_role": {
            "type": "string",
            "enum": [
              "team_captain",
              "team_member",
              "referee",
              "evaluator"
            ]
          },
          "reason": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2000
          },
          "target_event_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "statistical_addition": {
            "type": "object",
            "properties": {
              "event_type": {
                "type": "string",
                "enum": [
                  "assist",
                  "penalty_saved"
                ]
              },
              "player_id": {
                "type": "string",
                "format": "uuid"
              },
              "side": {
                "type": "string",
                "enum": [
                  "home",
                  "away"
                ]
              },
              "minute": {
                "type": "integer",
                "minimum": 0,
                "maximum": 180
              },
              "period": {
                "type": "integer",
                "minimum": 1,
                "maximum": 4
              }
            },
            "required": [
              "event_type",
              "player_id",
              "side",
              "minute",
              "period"
            ]
          },
          "proposed_changes": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4000
          },
          "idempotency_key": {
            "type": "string",
            "minLength": 8,
            "maxLength": 200
          }
        },
        "required": [
          "match_id",
          "reason",
          "target_event_ids",
          "proposed_changes"
        ]
      },
      "CorrectionSubmitResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "correction_id": {
            "type": "string",
            "format": "uuid"
          },
          "match_id": {
            "type": "string",
            "format": "uuid"
          },
          "reason": {
            "type": "string",
            "minLength": 1,
            "maxLength": 280
          },
          "receipt_id": {
            "type": "string",
            "format": "uuid"
          },
          "idempotency_key": {
            "type": "string",
            "minLength": 8,
            "maxLength": 200
          },
          "status": {
            "type": "string",
            "enum": [
              "submitted",
              "triaged",
              "accepted",
              "applied",
              "rejected"
            ]
          },
          "submitted_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "correction_id",
          "match_id",
          "reason",
          "receipt_id",
          "idempotency_key",
          "status",
          "submitted_at"
        ]
      },
      "MyCorrectionRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "match_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "reason": {
            "type": "string",
            "minLength": 1,
            "maxLength": 280
          },
          "receipt_id": {
            "type": "string",
            "format": "uuid"
          },
          "idempotency_key": {
            "type": "string",
            "minLength": 8,
            "maxLength": 200
          },
          "kind": {
            "type": "string",
            "enum": [
              "player_sport_data",
              "match_event",
              "match_score",
              "roster_entry"
            ]
          },
          "summary": {
            "type": "string",
            "minLength": 1
          },
          "status": {
            "type": "string",
            "enum": [
              "submitted",
              "triaged",
              "accepted",
              "applied",
              "rejected"
            ]
          },
          "requested_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "match_id",
          "reason",
          "receipt_id",
          "idempotency_key",
          "kind",
          "summary",
          "status",
          "requested_at"
        ]
      },
      "MyCorrectionList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "match_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "reason": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 280
                },
                "receipt_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "idempotency_key": {
                  "type": "string",
                  "minLength": 8,
                  "maxLength": 200
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "player_sport_data",
                    "match_event",
                    "match_score",
                    "roster_entry"
                  ]
                },
                "summary": {
                  "type": "string",
                  "minLength": 1
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "submitted",
                    "triaged",
                    "accepted",
                    "applied",
                    "rejected"
                  ]
                },
                "requested_at": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "id",
                "match_id",
                "reason",
                "receipt_id",
                "idempotency_key",
                "kind",
                "summary",
                "status",
                "requested_at"
              ]
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "CorrectionDecideRequest": {
        "type": "object",
        "properties": {
          "decision": {
            "type": "string",
            "enum": [
              "approved",
              "rejected"
            ]
          },
          "decision_reason": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "amendment": {
            "type": "object",
            "properties": {
              "prior_version_id": {
                "type": "string",
                "format": "uuid"
              },
              "new_score_home": {
                "type": "integer",
                "minimum": 0,
                "maximum": 99
              },
              "new_score_away": {
                "type": "integer",
                "minimum": 0,
                "maximum": 99
              },
              "new_event_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "operator_notes": {
                "oneOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "prior_version_id",
              "new_score_home",
              "new_score_away",
              "new_event_ids",
              "operator_notes"
            ]
          }
        },
        "required": [
          "decision",
          "decision_reason"
        ]
      },
      "CorrectionDecideResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "enum": [
              "approved",
              "rejected"
            ]
          },
          "resulting_report_version_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "decided_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "status",
          "resulting_report_version_id",
          "decided_at"
        ]
      },
      "CorrectionTriageRequest": {
        "type": "object",
        "properties": {
          "decision": {
            "type": "string",
            "enum": [
              "triaged",
              "rejected"
            ]
          },
          "decision_reason": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "decision",
          "decision_reason"
        ]
      },
      "CorrectionTriageResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "enum": [
              "triaged",
              "rejected"
            ]
          },
          "triaged_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "decided_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "status",
          "triaged_at",
          "decided_at"
        ]
      },
      "CorrectionApplyResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "enum": [
              "applied"
            ]
          },
          "applied_at": {
            "type": "string",
            "format": "date-time"
          },
          "resulting_report_version_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "status",
          "applied_at",
          "resulting_report_version_id"
        ]
      },
      "CertifyReportRequest": {
        "type": "object",
        "properties": {
          "report_version_id": {
            "type": "string",
            "format": "uuid"
          },
          "idempotency_key": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          }
        },
        "required": [
          "report_version_id",
          "idempotency_key"
        ]
      },
      "CertificationRequestRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "match_id": {
            "type": "string",
            "format": "uuid"
          },
          "report_version_id": {
            "type": "string",
            "format": "uuid"
          },
          "idempotency_key": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "status": {
            "type": "string",
            "enum": [
              "requested",
              "processing",
              "completed",
              "failed",
              "dead_letter",
              "superseded"
            ]
          },
          "requested_by": {
            "type": "string",
            "format": "uuid"
          },
          "requested_at": {
            "type": "string",
            "format": "date-time"
          },
          "attempt_count": {
            "type": "integer",
            "minimum": 0
          },
          "last_attempt_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "next_attempt_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_error": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "updated_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "tenant_id",
          "match_id",
          "report_version_id",
          "idempotency_key",
          "status",
          "requested_by",
          "requested_at",
          "attempt_count",
          "last_attempt_at",
          "next_attempt_at",
          "last_error",
          "created_at",
          "updated_at",
          "created_by",
          "updated_by"
        ]
      },
      "CertificationRecordRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "request_id": {
            "type": "string",
            "format": "uuid"
          },
          "match_id": {
            "type": "string",
            "format": "uuid"
          },
          "report_version_id": {
            "type": "string",
            "format": "uuid"
          },
          "payload_hash": {
            "type": "string",
            "minLength": 64,
            "maxLength": 64
          },
          "payload": {
            "type": "object",
            "properties": {
              "version": {
                "type": "number",
                "enum": [
                  1
                ]
              },
              "tenant_id": {
                "type": "string",
                "format": "uuid"
              },
              "organization_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "match_id": {
                "type": "string",
                "format": "uuid"
              },
              "played_on": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              },
              "home_team_id": {
                "type": "string",
                "format": "uuid"
              },
              "away_team_id": {
                "type": "string",
                "format": "uuid"
              },
              "score_home": {
                "type": "integer",
                "minimum": 0
              },
              "score_away": {
                "type": "integer",
                "minimum": 0
              },
              "report_version_id": {
                "type": "string",
                "format": "uuid"
              },
              "report_version_number": {
                "type": "integer",
                "minimum": 1
              },
              "is_amendment": {
                "type": "boolean"
              }
            },
            "required": [
              "version",
              "tenant_id",
              "organization_id",
              "match_id",
              "played_on",
              "home_team_id",
              "away_team_id",
              "score_home",
              "score_away",
              "report_version_id",
              "report_version_number",
              "is_amendment"
            ]
          },
          "adapter": {
            "type": "string",
            "minLength": 1
          },
          "adapter_receipt": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "issued_at": {
            "type": "string",
            "format": "date-time"
          },
          "superseded_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "superseded_by_record_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "superseded"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "updated_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "tenant_id",
          "request_id",
          "match_id",
          "report_version_id",
          "payload_hash",
          "payload",
          "adapter",
          "adapter_receipt",
          "issued_at",
          "superseded_at",
          "superseded_by_record_id",
          "status",
          "created_at",
          "updated_at",
          "created_by",
          "updated_by"
        ]
      },
      "ReportAmendmentRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "match_id": {
            "type": "string",
            "format": "uuid"
          },
          "prior_version_id": {
            "type": "string",
            "format": "uuid"
          },
          "prior_version_number": {
            "type": "integer",
            "minimum": 1
          },
          "new_version_id": {
            "type": "string",
            "format": "uuid"
          },
          "new_version_number": {
            "type": "integer",
            "minimum": 2
          },
          "reason": {
            "type": "string",
            "enum": [
              "correction_approved",
              "admin_rectification",
              "data_quality"
            ]
          },
          "correction_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "operator_notes": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at_iso": {
            "type": "string",
            "format": "date-time"
          },
          "created_by_actor": {
            "type": "string",
            "format": "uuid"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "updated_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "tenant_id",
          "match_id",
          "prior_version_id",
          "prior_version_number",
          "new_version_id",
          "new_version_number",
          "reason",
          "correction_id",
          "operator_notes",
          "created_at_iso",
          "created_by_actor",
          "created_at",
          "updated_at",
          "created_by",
          "updated_by"
        ]
      },
      "PublicCertificationResponse": {
        "type": "object",
        "properties": {
          "version": {
            "type": "number",
            "enum": [
              1
            ]
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "organization_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "match_id": {
            "type": "string",
            "format": "uuid"
          },
          "played_on": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "home_team_id": {
            "type": "string",
            "format": "uuid"
          },
          "away_team_id": {
            "type": "string",
            "format": "uuid"
          },
          "score_home": {
            "type": "integer",
            "minimum": 0
          },
          "score_away": {
            "type": "integer",
            "minimum": 0
          },
          "report_version_id": {
            "type": "string",
            "format": "uuid"
          },
          "report_version_number": {
            "type": "integer",
            "minimum": 1
          },
          "is_amendment": {
            "type": "boolean"
          }
        },
        "required": [
          "version",
          "tenant_id",
          "organization_id",
          "match_id",
          "played_on",
          "home_team_id",
          "away_team_id",
          "score_home",
          "score_away",
          "report_version_id",
          "report_version_number",
          "is_amendment"
        ]
      },
      "MeSessionResponse": {
        "type": "object",
        "properties": {
          "tenant": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "slug": {
                "type": "string"
              },
              "display_name": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "slug",
              "display_name"
            ]
          },
          "organization_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "actor": {
            "type": "object",
            "properties": {
              "user_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "by_system": {
                "type": "boolean"
              }
            },
            "required": [
              "user_id",
              "by_system"
            ]
          },
          "impersonation": {
            "type": "object",
            "properties": {
              "active": {
                "type": "boolean"
              },
              "impersonator_user_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "reason": {
                "oneOf": [
                  {
                    "type": "string",
                    "enum": [
                      "[redacted]"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "active",
              "impersonator_user_id",
              "reason"
            ]
          },
          "capabilities": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "source": {
                    "type": "string",
                    "enum": [
                      "server_derived"
                    ]
                  },
                  "user": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "tenant_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "suspended": {
                        "type": "boolean"
                      },
                      "restricted": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "id",
                      "tenant_id",
                      "suspended",
                      "restricted"
                    ]
                  },
                  "tenant": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "active": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "id",
                      "active"
                    ]
                  },
                  "organization_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "roles": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "platform_admin",
                        "tenant_admin",
                        "org_admin",
                        "org_operator",
                        "manager",
                        "assistant",
                        "scorer",
                        "team_captain",
                        "team_coach",
                        "team_staff",
                        "team_member",
                        "coach",
                        "staff",
                        "referee",
                        "evaluator",
                        "fantasy_manager",
                        "media_editor",
                        "sponsor_manager",
                        "dpo",
                        "support",
                        "external_organizer",
                        "public_user",
                        "tournament_admin",
                        "group_admin",
                        "medical_officer",
                        "hostess",
                        "journalist",
                        "photographer",
                        "club_admin"
                      ]
                    }
                  },
                  "permissions": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "tenant.read",
                        "tenant.administer",
                        "organization.read",
                        "organization.administer",
                        "tournament.read",
                        "tournament.manage",
                        "tournament.bracket.manage",
                        "tournament.import_historical",
                        "team.read",
                        "team.manage",
                        "roster.manage",
                        "team.availability.manage",
                        "team.callup.manage",
                        "team.communication.ack",
                        "player.read.public",
                        "player.read.private",
                        "player.claim.decide",
                        "player.medical.manage",
                        "historical_registry.read",
                        "historical_registry.manage",
                        "archive_public.read",
                        "archive_public.manage",
                        "discipline.manage",
                        "match.read.public",
                        "match.state.manage",
                        "match.assignment.manage",
                        "match.lineup.submit",
                        "match.lineup.submit.official",
                        "match.event.append",
                        "match.event.correct",
                        "match.report.submit",
                        "match.report.approve",
                        "match.report.read.official",
                        "rating.draft",
                        "rating.finalize",
                        "mvp.propose",
                        "mvp.decide",
                        "fantasy.team.manage",
                        "fantasy.market.execute",
                        "fantasy.score.read",
                        "fantasy.score.recompute",
                        "privacy.request.submit",
                        "privacy.request.handle",
                        "consent.manage_self",
                        "audit.read",
                        "api_key.manage",
                        "widget.manage",
                        "white_label.manage",
                        "feature_flag.toggle",
                        "media.publish",
                        "media.moderate",
                        "media.tag.review",
                        "media.rights.review",
                        "feed.manage",
                        "news.manage",
                        "content.page.manage",
                        "checkin.manage",
                        "sponsor.manage",
                        "sponsor.read.aggregate",
                        "notification.send",
                        "notification.operational.send",
                        "notification.preference.manage_self",
                        "certification.manage",
                        "correction.request.self",
                        "correction.decide",
                        "support.manage",
                        "facilities.manage",
                        "fines.read",
                        "fines.manage",
                        "accounting.read",
                        "accounting.manage",
                        "communique.manage",
                        "documents.manage",
                        "player.documents.manage",
                        "player.link.manage",
                        "exports.run",
                        "match.reminder.send",
                        "news.manage.others",
                        "audit.read.identity",
                        "site_config.manage",
                        "navigation.manage",
                        "home_layout.manage",
                        "gallery.manage",
                        "video.manage",
                        "gold_book.manage",
                        "phonebook.manage",
                        "analytics.read",
                        "legacy_url.manage"
                      ]
                    }
                  },
                  "organization_role_assignments": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "organization_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "role": {
                          "type": "string",
                          "enum": [
                            "platform_admin",
                            "tenant_admin",
                            "org_admin",
                            "org_operator",
                            "manager",
                            "assistant",
                            "scorer",
                            "team_captain",
                            "team_coach",
                            "team_staff",
                            "team_member",
                            "coach",
                            "staff",
                            "referee",
                            "evaluator",
                            "fantasy_manager",
                            "media_editor",
                            "sponsor_manager",
                            "dpo",
                            "support",
                            "external_organizer",
                            "public_user",
                            "tournament_admin",
                            "group_admin",
                            "medical_officer",
                            "hostess",
                            "journalist",
                            "photographer",
                            "club_admin"
                          ]
                        }
                      },
                      "required": [
                        "organization_id",
                        "role"
                      ]
                    }
                  },
                  "tenant_roles": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "platform_admin",
                        "tenant_admin",
                        "org_admin",
                        "org_operator",
                        "manager",
                        "assistant",
                        "scorer",
                        "team_captain",
                        "team_coach",
                        "team_staff",
                        "team_member",
                        "coach",
                        "staff",
                        "referee",
                        "evaluator",
                        "fantasy_manager",
                        "media_editor",
                        "sponsor_manager",
                        "dpo",
                        "support",
                        "external_organizer",
                        "public_user",
                        "tournament_admin",
                        "group_admin",
                        "medical_officer",
                        "hostess",
                        "journalist",
                        "photographer",
                        "club_admin"
                      ]
                    }
                  },
                  "team_role_assignments": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "team_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "role": {
                          "type": "string",
                          "enum": [
                            "platform_admin",
                            "tenant_admin",
                            "org_admin",
                            "org_operator",
                            "manager",
                            "assistant",
                            "scorer",
                            "team_captain",
                            "team_coach",
                            "team_staff",
                            "team_member",
                            "coach",
                            "staff",
                            "referee",
                            "evaluator",
                            "fantasy_manager",
                            "media_editor",
                            "sponsor_manager",
                            "dpo",
                            "support",
                            "external_organizer",
                            "public_user",
                            "tournament_admin",
                            "group_admin",
                            "medical_officer",
                            "hostess",
                            "journalist",
                            "photographer",
                            "club_admin"
                          ]
                        }
                      },
                      "required": [
                        "team_id",
                        "role"
                      ]
                    }
                  },
                  "team_organization_assignments": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "team_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "organization_id": {
                          "type": "string",
                          "format": "uuid"
                        }
                      },
                      "required": [
                        "team_id",
                        "organization_id"
                      ]
                    }
                  },
                  "resource_role_assignments": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "organization_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "tournament_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "phase_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "role": {
                          "type": "string",
                          "enum": [
                            "platform_admin",
                            "tenant_admin",
                            "org_admin",
                            "org_operator",
                            "manager",
                            "assistant",
                            "scorer",
                            "team_captain",
                            "team_coach",
                            "team_staff",
                            "team_member",
                            "coach",
                            "staff",
                            "referee",
                            "evaluator",
                            "fantasy_manager",
                            "media_editor",
                            "sponsor_manager",
                            "dpo",
                            "support",
                            "external_organizer",
                            "public_user",
                            "tournament_admin",
                            "group_admin",
                            "medical_officer",
                            "hostess",
                            "journalist",
                            "photographer",
                            "club_admin"
                          ]
                        }
                      },
                      "required": [
                        "organization_id",
                        "tournament_id",
                        "phase_id",
                        "role"
                      ]
                    }
                  },
                  "team_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "match_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "match_assignments": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "match_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "role": {
                          "type": "string",
                          "enum": [
                            "referee",
                            "assistant_referee",
                            "scorer",
                            "evaluator",
                            "media_operator"
                          ]
                        }
                      },
                      "required": [
                        "match_id",
                        "role"
                      ]
                    }
                  },
                  "owned_fantasy_team_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "match_assignment_roles": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "match_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "roles": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "referee",
                              "assistant_referee",
                              "scorer",
                              "evaluator",
                              "media_operator"
                            ]
                          },
                          "minItems": 1
                        }
                      },
                      "required": [
                        "match_id",
                        "roles"
                      ]
                    }
                  },
                  "approved_player_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "entitlements": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "sport_core",
                        "live_reporting",
                        "fantasy",
                        "media_feed",
                        "sponsor_inventory",
                        "api_widgets",
                        "white_label",
                        "certification"
                      ]
                    }
                  },
                  "record_state": {
                    "type": "object",
                    "properties": {
                      "account": {
                        "type": "string",
                        "enum": [
                          "active",
                          "suspended"
                        ]
                      },
                      "tenant": {
                        "type": "string",
                        "enum": [
                          "active",
                          "inactive"
                        ]
                      },
                      "restricted": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "account",
                      "tenant",
                      "restricted"
                    ]
                  },
                  "operational": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "source",
                  "user",
                  "tenant",
                  "organization_ids",
                  "roles",
                  "permissions",
                  "organization_role_assignments",
                  "tenant_roles",
                  "team_role_assignments",
                  "team_organization_assignments",
                  "team_ids",
                  "match_ids",
                  "match_assignments",
                  "owned_fantasy_team_ids",
                  "approved_player_ids",
                  "entitlements",
                  "record_state",
                  "operational"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "request_id": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "tenant",
          "organization_id",
          "actor",
          "impersonation",
          "capabilities",
          "request_id"
        ]
      },
      "MeConsoleTaskCounts": {
        "type": "object",
        "properties": {
          "approvals_pending": {
            "type": "integer",
            "minimum": 0
          },
          "reports_pending": {
            "type": "integer",
            "minimum": 0
          },
          "ratings_pending": {
            "type": "integer",
            "minimum": 0
          },
          "privacy_requests_open": {
            "type": "integer",
            "minimum": 0
          },
          "player_claims_pending": {
            "type": "integer",
            "minimum": 0
          },
          "fantasy_market_pending": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [],
        "additionalProperties": false
      },
      "MeConsoleTaskCountsResponse": {
        "type": "object",
        "properties": {
          "generated_at": {
            "type": "string",
            "format": "date-time"
          },
          "counts": {
            "type": "object",
            "properties": {
              "approvals_pending": {
                "type": "integer",
                "minimum": 0
              },
              "reports_pending": {
                "type": "integer",
                "minimum": 0
              },
              "ratings_pending": {
                "type": "integer",
                "minimum": 0
              },
              "privacy_requests_open": {
                "type": "integer",
                "minimum": 0
              },
              "player_claims_pending": {
                "type": "integer",
                "minimum": 0
              },
              "fantasy_market_pending": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [],
            "additionalProperties": false
          }
        },
        "required": [
          "generated_at",
          "counts"
        ]
      },
      "MobileWebManagedRole": {
        "type": "string",
        "enum": [
          "platform_admin",
          "tenant_admin",
          "org_admin",
          "org_operator",
          "media_editor",
          "sponsor_manager",
          "dpo",
          "support",
          "external_organizer"
        ]
      },
      "MeMobileConsoleHandoffRequest": {
        "type": "object",
        "properties": {
          "role": {
            "type": "string",
            "enum": [
              "platform_admin",
              "tenant_admin",
              "org_admin",
              "org_operator",
              "media_editor",
              "sponsor_manager",
              "dpo",
              "support",
              "external_organizer"
            ]
          }
        },
        "required": [
          "role"
        ]
      },
      "MobileConsoleHandoffMintResponse": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{32,128}$"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "code",
          "expires_at"
        ]
      },
      "MobileConsoleHandoffRedeemRequest": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{32,128}$"
          }
        },
        "required": [
          "code"
        ]
      },
      "MobileConsoleHandoffRedeemResponse": {
        "type": "object",
        "properties": {
          "bearer_token": {
            "type": "string",
            "minLength": 32
          },
          "target_path": {
            "type": "string",
            "pattern": "^\\/admin(?:\\/[a-z0-9-]+)*$"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "bearer_token",
          "target_path",
          "expires_at"
        ]
      },
      "AdminImpersonationStartRequest": {
        "type": "object",
        "properties": {
          "impersonated_user_id": {
            "type": "string",
            "format": "uuid"
          },
          "reason": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1000
          }
        },
        "required": [
          "impersonated_user_id",
          "reason"
        ]
      },
      "AdminImpersonationStartResponse": {
        "type": "object",
        "properties": {
          "bearer_token": {
            "type": "string",
            "minLength": 1
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "impersonated_user": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "display_name": {
                "type": "string",
                "minLength": 1
              },
              "email": {
                "type": "string",
                "format": "email"
              }
            },
            "required": [
              "id",
              "display_name",
              "email"
            ]
          },
          "operator_user_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "bearer_token",
          "expires_at",
          "impersonated_user",
          "operator_user_id"
        ]
      },
      "AdminImpersonationStopResponse": {
        "type": "object",
        "properties": {
          "stopped": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "operator_user_id": {
            "type": "string",
            "format": "uuid"
          },
          "impersonated_user_id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "stopped",
          "operator_user_id",
          "impersonated_user_id"
        ]
      },
      "AdminDashboardCountersRow": {
        "type": "object",
        "properties": {
          "matches_today": {
            "type": "integer",
            "minimum": 0
          },
          "approvals_pending": {
            "type": "integer",
            "minimum": 0
          },
          "reports_pending": {
            "type": "integer",
            "minimum": 0
          },
          "ratings_pending": {
            "type": "integer",
            "minimum": 0
          },
          "privacy_requests_open": {
            "type": "integer",
            "minimum": 0
          },
          "audit_events_24h": {
            "type": "integer",
            "minimum": 0
          },
          "fantasy_market_pending": {
            "type": "integer",
            "minimum": 0
          },
          "player_claims_pending": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "matches_today",
          "approvals_pending",
          "reports_pending",
          "ratings_pending",
          "privacy_requests_open",
          "audit_events_24h",
          "fantasy_market_pending",
          "player_claims_pending"
        ]
      },
      "AdminDashboardResponse": {
        "type": "object",
        "properties": {
          "generated_at": {
            "type": "string",
            "format": "date-time"
          },
          "counters": {
            "type": "object",
            "properties": {
              "matches_today": {
                "type": "integer",
                "minimum": 0
              },
              "approvals_pending": {
                "type": "integer",
                "minimum": 0
              },
              "reports_pending": {
                "type": "integer",
                "minimum": 0
              },
              "ratings_pending": {
                "type": "integer",
                "minimum": 0
              },
              "privacy_requests_open": {
                "type": "integer",
                "minimum": 0
              },
              "audit_events_24h": {
                "type": "integer",
                "minimum": 0
              },
              "fantasy_market_pending": {
                "type": "integer",
                "minimum": 0
              },
              "player_claims_pending": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "matches_today",
              "approvals_pending",
              "reports_pending",
              "ratings_pending",
              "privacy_requests_open",
              "audit_events_24h",
              "fantasy_market_pending",
              "player_claims_pending"
            ]
          }
        },
        "required": [
          "generated_at",
          "counters"
        ]
      },
      "AdminApprovalQueueRow": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "report_submission",
              "rating_submission",
              "correction_request",
              "player_claim",
              "fantasy_market_order"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "subject_id": {
            "type": "string",
            "minLength": 1
          },
          "summary": {
            "type": "string",
            "minLength": 1
          },
          "submitted_at": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "kind",
          "id",
          "subject_id",
          "summary",
          "submitted_at",
          "status"
        ]
      },
      "AdminApprovalQueueList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "report_submission",
                    "rating_submission",
                    "correction_request",
                    "player_claim",
                    "fantasy_market_order"
                  ]
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "subject_id": {
                  "type": "string",
                  "minLength": 1
                },
                "summary": {
                  "type": "string",
                  "minLength": 1
                },
                "submitted_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "status": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "required": [
                "kind",
                "id",
                "subject_id",
                "summary",
                "submitted_at",
                "status"
              ]
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "AdminFeatureFlagToggleRequest": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "enum": [
              "live_reporting.enabled",
              "fantasy_market.enabled",
              "public_widgets.enabled"
            ]
          },
          "on": {
            "type": "boolean"
          },
          "reason": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          }
        },
        "required": [
          "key",
          "on",
          "reason"
        ]
      },
      "AdminSystemHealthFlag": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "enum": [
              "live_reporting.enabled",
              "fantasy_market.enabled",
              "public_widgets.enabled"
            ]
          },
          "on": {
            "type": "boolean"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "key",
          "on",
          "updated_at"
        ]
      },
      "AdminSystemHealthResponse": {
        "type": "object",
        "properties": {
          "generated_at": {
            "type": "string",
            "format": "date-time"
          },
          "fantasy_active": {
            "type": "boolean"
          },
          "audit_writable": {
            "type": "boolean"
          },
          "row_counts": {
            "type": "object",
            "additionalProperties": true
          },
          "flags": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string",
                  "enum": [
                    "live_reporting.enabled",
                    "fantasy_market.enabled",
                    "public_widgets.enabled"
                  ]
                },
                "on": {
                  "type": "boolean"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "key",
                "on",
                "updated_at"
              ]
            },
            "default": []
          }
        },
        "required": [
          "generated_at",
          "fantasy_active",
          "audit_writable",
          "row_counts"
        ]
      },
      "AdminAuditEntry": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "occurred_at": {
            "type": "string",
            "format": "date-time"
          },
          "actor": {
            "type": "string",
            "minLength": 1
          },
          "action": {
            "type": "string",
            "minLength": 1
          },
          "subject_type": {
            "type": "string",
            "minLength": 1
          },
          "subject_id": {
            "type": "string",
            "minLength": 1
          },
          "via_impersonation": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "occurred_at",
          "actor",
          "action",
          "subject_type",
          "subject_id",
          "via_impersonation"
        ]
      },
      "AdminAuditList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "occurred_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "actor": {
                  "type": "string",
                  "minLength": 1
                },
                "action": {
                  "type": "string",
                  "minLength": 1
                },
                "subject_type": {
                  "type": "string",
                  "minLength": 1
                },
                "subject_id": {
                  "type": "string",
                  "minLength": 1
                },
                "via_impersonation": {
                  "type": "boolean"
                }
              },
              "required": [
                "id",
                "occurred_at",
                "actor",
                "action",
                "subject_type",
                "subject_id",
                "via_impersonation"
              ]
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "AdminRatingRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "match_pseudo": {
            "type": "string",
            "minLength": 1
          },
          "player_label": {
            "type": "string",
            "minLength": 1
          },
          "evaluator_pseudo": {
            "type": "string",
            "minLength": 1
          },
          "value": {
            "type": "number"
          },
          "status": {
            "type": "string",
            "minLength": 1
          },
          "submitted_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "match_pseudo",
          "player_label",
          "evaluator_pseudo",
          "value",
          "status",
          "submitted_at"
        ]
      },
      "AdminRatingsList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "match_pseudo": {
                  "type": "string",
                  "minLength": 1
                },
                "player_label": {
                  "type": "string",
                  "minLength": 1
                },
                "evaluator_pseudo": {
                  "type": "string",
                  "minLength": 1
                },
                "value": {
                  "type": "number"
                },
                "status": {
                  "type": "string",
                  "minLength": 1
                },
                "submitted_at": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "id",
                "match_pseudo",
                "player_label",
                "evaluator_pseudo",
                "value",
                "status",
                "submitted_at"
              ]
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "AdminRatingDecideRequest": {
        "type": "object",
        "properties": {
          "decision": {
            "type": "string",
            "enum": [
              "approved",
              "rejected",
              "corrected"
            ]
          },
          "reason": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "decision",
          "reason"
        ]
      },
      "AdminRatingDecideResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "enum": [
              "approved",
              "rejected",
              "corrected"
            ]
          },
          "decided_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "status",
          "decided_at"
        ]
      },
      "AdminPrivacyRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "type": "string",
            "minLength": 1
          },
          "status": {
            "type": "string",
            "minLength": 1
          },
          "requested_at": {
            "type": "string",
            "format": "date-time"
          },
          "subject_label": {
            "type": "string",
            "minLength": 1
          },
          "dpo_only": {
            "type": "boolean"
          },
          "access_termination": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "sessions_revoked": {
                    "type": "boolean"
                  },
                  "identity_disabled": {
                    "type": "boolean"
                  },
                  "identity_disable_queued": {
                    "type": "boolean"
                  },
                  "degraded": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "sessions_revoked",
                  "identity_disabled",
                  "degraded"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "identity_disable": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "queued",
                      "processing",
                      "succeeded",
                      "degraded"
                    ]
                  },
                  "attempts": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "next_attempt_at": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "date-time"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "last_error": {
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "updated_at": {
                    "type": "string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "status",
                  "attempts",
                  "next_attempt_at",
                  "last_error",
                  "updated_at"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "export_delivery_requested_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "kind",
          "status",
          "requested_at",
          "subject_label",
          "dpo_only",
          "access_termination"
        ]
      },
      "AdminIdentityDisableJobState": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "processing",
              "succeeded",
              "degraded"
            ]
          },
          "attempts": {
            "type": "integer",
            "minimum": 0
          },
          "next_attempt_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_error": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "status",
          "attempts",
          "next_attempt_at",
          "last_error",
          "updated_at"
        ]
      },
      "AdminPrivacyList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "kind": {
                  "type": "string",
                  "minLength": 1
                },
                "status": {
                  "type": "string",
                  "minLength": 1
                },
                "requested_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "subject_label": {
                  "type": "string",
                  "minLength": 1
                },
                "dpo_only": {
                  "type": "boolean"
                },
                "access_termination": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "sessions_revoked": {
                          "type": "boolean"
                        },
                        "identity_disabled": {
                          "type": "boolean"
                        },
                        "identity_disable_queued": {
                          "type": "boolean"
                        },
                        "degraded": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "sessions_revoked",
                        "identity_disabled",
                        "degraded"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "identity_disable": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "enum": [
                            "queued",
                            "processing",
                            "succeeded",
                            "degraded"
                          ]
                        },
                        "attempts": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "next_attempt_at": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "date-time"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "last_error": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "updated_at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "status",
                        "attempts",
                        "next_attempt_at",
                        "last_error",
                        "updated_at"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "export_delivery_requested_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "kind",
                "status",
                "requested_at",
                "subject_label",
                "dpo_only",
                "access_termination"
              ]
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "AdminPrivacyExportDownloadLink": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string",
            "format": "uuid"
          },
          "artifact_ref": {
            "type": "string",
            "minLength": 1
          },
          "handoff_token": {
            "type": "string",
            "minLength": 32,
            "maxLength": 256
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "one_time": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "sha256": {
            "type": "string",
            "minLength": 64,
            "maxLength": 64
          },
          "byte_size": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "request_id",
          "artifact_ref",
          "handoff_token",
          "expires_at",
          "one_time",
          "sha256",
          "byte_size"
        ]
      },
      "AdminPrivacyExportDownloadConsumeRequest": {
        "type": "object",
        "properties": {
          "handoff_token": {
            "type": "string",
            "minLength": 32,
            "maxLength": 256
          }
        },
        "required": [
          "handoff_token"
        ]
      },
      "AdminPrivacyExportBundle": {
        "type": "object",
        "properties": {
          "manifest": {
            "type": "object",
            "properties": {
              "schema": {
                "type": "string",
                "enum": [
                  "lc8.privacy.export.v1"
                ]
              },
              "generated_at": {
                "type": "string",
                "format": "date-time"
              },
              "tenant_id": {
                "type": "string",
                "format": "uuid"
              },
              "subject_user_id": {
                "type": "string",
                "format": "uuid"
              },
              "request_id": {
                "type": "string",
                "format": "uuid"
              },
              "categories": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "table": {
                      "type": "string",
                      "minLength": 1
                    },
                    "row_count": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "purpose": {
                      "type": "string",
                      "minLength": 1
                    },
                    "lawful_basis": {
                      "type": "string",
                      "minLength": 1
                    },
                    "retention": {
                      "type": "string",
                      "minLength": 1
                    },
                    "source": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "table",
                    "row_count",
                    "purpose",
                    "lawful_basis",
                    "retention",
                    "source"
                  ]
                }
              }
            },
            "required": [
              "schema",
              "generated_at",
              "tenant_id",
              "subject_user_id",
              "request_id",
              "categories"
            ]
          },
          "data": {
            "type": "object",
            "additionalProperties": true
          }
        },
        "required": [
          "manifest",
          "data"
        ]
      },
      "AdminPrivacyRequestCompleteRequest": {
        "type": "object",
        "properties": {
          "export_artifact_ref": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 512
              },
              {
                "type": "null"
              }
            ]
          },
          "rectification_note": {
            "oneOf": [
              {
                "type": "string",
                "maxLength": 1000
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": []
      },
      "AdminPrivacyRequestRejectRequest": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string",
            "maxLength": 500
          }
        },
        "required": [
          "reason"
        ]
      },
      "AdminCorrectionRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "type": "string",
            "minLength": 1
          },
          "summary": {
            "type": "string",
            "minLength": 1
          },
          "match": {
            "type": "string",
            "minLength": 1
          },
          "match_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "target_event_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "statistical_addition": {
            "type": "object",
            "properties": {
              "event_type": {
                "type": "string",
                "enum": [
                  "assist",
                  "penalty_saved"
                ]
              },
              "player_id": {
                "type": "string",
                "format": "uuid"
              },
              "side": {
                "type": "string",
                "enum": [
                  "home",
                  "away"
                ]
              },
              "minute": {
                "type": "integer",
                "minimum": 0,
                "maximum": 180
              },
              "period": {
                "type": "integer",
                "minimum": 1,
                "maximum": 4
              }
            },
            "required": [
              "event_type",
              "player_id",
              "side",
              "minute",
              "period"
            ]
          },
          "requester_role": {
            "type": "string",
            "minLength": 1
          },
          "status": {
            "type": "string",
            "minLength": 1
          },
          "resulting_version_id": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "decided_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "decision_due_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "kind",
          "summary",
          "match",
          "match_id",
          "target_event_ids",
          "requester_role",
          "status",
          "resulting_version_id",
          "decided_at"
        ]
      },
      "AdminCorrectionsList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "kind": {
                  "type": "string",
                  "minLength": 1
                },
                "summary": {
                  "type": "string",
                  "minLength": 1
                },
                "match": {
                  "type": "string",
                  "minLength": 1
                },
                "match_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "target_event_ids": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "statistical_addition": {
                  "type": "object",
                  "properties": {
                    "event_type": {
                      "type": "string",
                      "enum": [
                        "assist",
                        "penalty_saved"
                      ]
                    },
                    "player_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "side": {
                      "type": "string",
                      "enum": [
                        "home",
                        "away"
                      ]
                    },
                    "minute": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 180
                    },
                    "period": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 4
                    }
                  },
                  "required": [
                    "event_type",
                    "player_id",
                    "side",
                    "minute",
                    "period"
                  ]
                },
                "requester_role": {
                  "type": "string",
                  "minLength": 1
                },
                "status": {
                  "type": "string",
                  "minLength": 1
                },
                "resulting_version_id": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "decided_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "decision_due_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "kind",
                "summary",
                "match",
                "match_id",
                "target_event_ids",
                "requester_role",
                "status",
                "resulting_version_id",
                "decided_at"
              ]
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "AdminApiKeyRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "prefix": {
            "type": "string",
            "minLength": 4,
            "maxLength": 16
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "read:public.standings",
                "read:public.matches",
                "read:public.teams",
                "read:public.players",
                "read:public.media",
                "read:public.legal",
                "read:public.theme",
                "read:public.fantasy",
                "write:public.support",
                "read:tenant.fantasy",
                "read:tenant.audit",
                "write:tenant.matches",
                "write:tenant.lineups",
                "write:tenant.media",
                "admin:tenant.privacy",
                "admin:tenant.white_label",
                "admin:tenant.api_keys"
              ]
            },
            "minItems": 1
          },
          "rate_limit_tier": {
            "type": "string",
            "enum": [
              "public_widget",
              "partner",
              "internal"
            ]
          },
          "entitled_modules": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "rotated",
              "revoked"
            ]
          },
          "issued_at": {
            "type": "string",
            "format": "date-time"
          },
          "last_used_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "expires_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "rotated_from_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "revoked_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "revoked_reason": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "tenant_id",
          "label",
          "prefix",
          "scopes",
          "rate_limit_tier",
          "entitled_modules",
          "status",
          "issued_at",
          "last_used_at",
          "expires_at",
          "rotated_from_id",
          "revoked_at",
          "revoked_reason"
        ]
      },
      "AdminApiKeyListResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "tenant_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "label": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120
                },
                "prefix": {
                  "type": "string",
                  "minLength": 4,
                  "maxLength": 16
                },
                "scopes": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "read:public.standings",
                      "read:public.matches",
                      "read:public.teams",
                      "read:public.players",
                      "read:public.media",
                      "read:public.legal",
                      "read:public.theme",
                      "read:public.fantasy",
                      "write:public.support",
                      "read:tenant.fantasy",
                      "read:tenant.audit",
                      "write:tenant.matches",
                      "write:tenant.lineups",
                      "write:tenant.media",
                      "admin:tenant.privacy",
                      "admin:tenant.white_label",
                      "admin:tenant.api_keys"
                    ]
                  },
                  "minItems": 1
                },
                "rate_limit_tier": {
                  "type": "string",
                  "enum": [
                    "public_widget",
                    "partner",
                    "internal"
                  ]
                },
                "entitled_modules": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "active",
                    "rotated",
                    "revoked"
                  ]
                },
                "issued_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "last_used_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "expires_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "rotated_from_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "revoked_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "revoked_reason": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "tenant_id",
                "label",
                "prefix",
                "scopes",
                "rate_limit_tier",
                "entitled_modules",
                "status",
                "issued_at",
                "last_used_at",
                "expires_at",
                "rotated_from_id",
                "revoked_at",
                "revoked_reason"
              ]
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "AdminApiKeyCreationResult": {
        "type": "object",
        "properties": {
          "key": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "tenant_id": {
                "type": "string",
                "format": "uuid"
              },
              "label": {
                "type": "string",
                "minLength": 1,
                "maxLength": 120
              },
              "prefix": {
                "type": "string",
                "minLength": 4,
                "maxLength": 16
              },
              "scopes": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "read:public.standings",
                    "read:public.matches",
                    "read:public.teams",
                    "read:public.players",
                    "read:public.media",
                    "read:public.legal",
                    "read:public.theme",
                    "read:public.fantasy",
                    "write:public.support",
                    "read:tenant.fantasy",
                    "read:tenant.audit",
                    "write:tenant.matches",
                    "write:tenant.lineups",
                    "write:tenant.media",
                    "admin:tenant.privacy",
                    "admin:tenant.white_label",
                    "admin:tenant.api_keys"
                  ]
                },
                "minItems": 1
              },
              "rate_limit_tier": {
                "type": "string",
                "enum": [
                  "public_widget",
                  "partner",
                  "internal"
                ]
              },
              "entitled_modules": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "status": {
                "type": "string",
                "enum": [
                  "active",
                  "rotated",
                  "revoked"
                ]
              },
              "issued_at": {
                "type": "string",
                "format": "date-time"
              },
              "last_used_at": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "expires_at": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "rotated_from_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "revoked_at": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "revoked_reason": {
                "oneOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "id",
              "tenant_id",
              "label",
              "prefix",
              "scopes",
              "rate_limit_tier",
              "entitled_modules",
              "status",
              "issued_at",
              "last_used_at",
              "expires_at",
              "rotated_from_id",
              "revoked_at",
              "revoked_reason"
            ]
          },
          "plaintext": {
            "type": "string",
            "minLength": 32
          }
        },
        "required": [
          "key",
          "plaintext"
        ]
      },
      "AdminFeedPostList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "tenant_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "match.result",
                    "match.mvp",
                    "standings.update",
                    "fantasy.top",
                    "media.published",
                    "sponsor.campaign"
                  ]
                },
                "source_event_id": {
                  "type": "string",
                  "minLength": 1
                },
                "subject_match_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "subject_team_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "subject_player_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "body": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 2000
                },
                "target_href": {
                  "oneOf": [
                    {
                      "type": "string",
                      "minLength": 1
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "active",
                    "hidden"
                  ]
                },
                "published_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "hidden_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "hidden_reason": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "created_by": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "updated_by": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "tenant_id",
                "kind",
                "source_event_id",
                "subject_match_id",
                "subject_team_id",
                "subject_player_id",
                "body",
                "status",
                "published_at",
                "hidden_at",
                "hidden_reason",
                "created_at",
                "updated_at",
                "created_by",
                "updated_by"
              ]
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "AdminNotificationTemplateList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "tenant_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "code": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 80
                },
                "category": {
                  "type": "string",
                  "enum": [
                    "transactional",
                    "match_alert",
                    "fantasy",
                    "official_communication",
                    "marketing"
                  ]
                },
                "title_template": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 80
                },
                "body_template": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 600
                },
                "is_active": {
                  "type": "boolean"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "created_by": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "updated_by": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "tenant_id",
                "code",
                "category",
                "title_template",
                "body_template",
                "is_active",
                "created_at",
                "updated_at",
                "created_by",
                "updated_by"
              ]
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "AdminNotificationQueueRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "user_pseudo": {
            "type": "string",
            "pattern": "^user:[0-9a-f]{10}$"
          },
          "channel": {
            "type": "string",
            "enum": [
              "push",
              "email",
              "inapp"
            ]
          },
          "category": {
            "type": "string",
            "enum": [
              "transactional",
              "match_alert",
              "fantasy",
              "official_communication",
              "marketing"
            ]
          },
          "template_id": {
            "type": "string",
            "format": "uuid"
          },
          "idempotency_namespace": {
            "type": "string",
            "minLength": 1,
            "maxLength": 180
          },
          "preview_safe": {
            "type": "string",
            "minLength": 1,
            "maxLength": 180
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "sending",
              "delivered",
              "failed",
              "dead_letter",
              "suppressed"
            ]
          },
          "provider_handoff_state": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "prepared",
                  "awaiting_receipt",
                  "unknown"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "receipt_state": {
            "type": "string",
            "enum": [
              "not_applicable",
              "pending",
              "confirmed",
              "partial",
              "unknown"
            ]
          },
          "scheduled_for": {
            "type": "string",
            "format": "date-time"
          },
          "attempt_count": {
            "type": "integer",
            "minimum": 0
          },
          "next_attempt_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_error": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "user_pseudo",
          "channel",
          "category",
          "template_id",
          "idempotency_namespace",
          "preview_safe",
          "status",
          "scheduled_for",
          "attempt_count",
          "next_attempt_at",
          "last_error"
        ]
      },
      "AdminNotificationQueueList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "user_pseudo": {
                  "type": "string",
                  "pattern": "^user:[0-9a-f]{10}$"
                },
                "channel": {
                  "type": "string",
                  "enum": [
                    "push",
                    "email",
                    "inapp"
                  ]
                },
                "category": {
                  "type": "string",
                  "enum": [
                    "transactional",
                    "match_alert",
                    "fantasy",
                    "official_communication",
                    "marketing"
                  ]
                },
                "template_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "idempotency_namespace": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 180
                },
                "preview_safe": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 180
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "queued",
                    "sending",
                    "delivered",
                    "failed",
                    "dead_letter",
                    "suppressed"
                  ]
                },
                "provider_handoff_state": {
                  "oneOf": [
                    {
                      "type": "string",
                      "enum": [
                        "prepared",
                        "awaiting_receipt",
                        "unknown"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "receipt_state": {
                  "type": "string",
                  "enum": [
                    "not_applicable",
                    "pending",
                    "confirmed",
                    "partial",
                    "unknown"
                  ]
                },
                "scheduled_for": {
                  "type": "string",
                  "format": "date-time"
                },
                "attempt_count": {
                  "type": "integer",
                  "minimum": 0
                },
                "next_attempt_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "last_error": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "user_pseudo",
                "channel",
                "category",
                "template_id",
                "idempotency_namespace",
                "preview_safe",
                "status",
                "scheduled_for",
                "attempt_count",
                "next_attempt_at",
                "last_error"
              ]
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "AdminNotificationRetryResponse": {
        "type": "object",
        "properties": {
          "message": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "user_pseudo": {
                "type": "string",
                "pattern": "^user:[0-9a-f]{10}$"
              },
              "channel": {
                "type": "string",
                "enum": [
                  "push",
                  "email",
                  "inapp"
                ]
              },
              "category": {
                "type": "string",
                "enum": [
                  "transactional",
                  "match_alert",
                  "fantasy",
                  "official_communication",
                  "marketing"
                ]
              },
              "template_id": {
                "type": "string",
                "format": "uuid"
              },
              "idempotency_namespace": {
                "type": "string",
                "minLength": 1,
                "maxLength": 180
              },
              "preview_safe": {
                "type": "string",
                "minLength": 1,
                "maxLength": 180
              },
              "status": {
                "type": "string",
                "enum": [
                  "queued",
                  "sending",
                  "delivered",
                  "failed",
                  "dead_letter",
                  "suppressed"
                ]
              },
              "provider_handoff_state": {
                "oneOf": [
                  {
                    "type": "string",
                    "enum": [
                      "prepared",
                      "awaiting_receipt",
                      "unknown"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "receipt_state": {
                "type": "string",
                "enum": [
                  "not_applicable",
                  "pending",
                  "confirmed",
                  "partial",
                  "unknown"
                ]
              },
              "scheduled_for": {
                "type": "string",
                "format": "date-time"
              },
              "attempt_count": {
                "type": "integer",
                "minimum": 0
              },
              "next_attempt_at": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "last_error": {
                "oneOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "id",
              "user_pseudo",
              "channel",
              "category",
              "template_id",
              "idempotency_namespace",
              "preview_safe",
              "status",
              "scheduled_for",
              "attempt_count",
              "next_attempt_at",
              "last_error"
            ]
          }
        },
        "required": [
          "message"
        ]
      },
      "AdminTournamentRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "season_id": {
            "type": "string",
            "format": "uuid"
          },
          "organization_id": {
            "type": "string",
            "format": "uuid"
          },
          "slug": {
            "type": "string",
            "minLength": 2,
            "maxLength": 64,
            "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
          },
          "label": {
            "type": "string",
            "minLength": 1
          },
          "format": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "league",
                  "league_with_playoffs",
                  "cup",
                  "group_then_knockout"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "group_count": {
            "oneOf": [
              {
                "type": "integer",
                "minimum": 1,
                "maximum": 32
              },
              {
                "type": "null"
              }
            ]
          },
          "public_kind": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "championship",
                  "tournament"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "competition_category": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "serie_a",
                  "serie_a2",
                  "serie_b",
                  "cup",
                  "playoff"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "starts_on": {
            "type": "string",
            "format": "date"
          },
          "ends_on": {
            "oneOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "ready",
              "scheduled",
              "in_progress",
              "completed",
              "playoffs",
              "archived"
            ],
            "default": "draft"
          },
          "regular_season_legs": {
            "oneOf": [
              {
                "type": "number",
                "enum": [
                  1
                ]
              },
              {
                "type": "number",
                "enum": [
                  2
                ]
              }
            ],
            "default": 1
          },
          "expected_team_count": {
            "oneOf": [
              {
                "type": "integer",
                "minimum": 2,
                "maximum": 64
              },
              {
                "type": "null"
              }
            ]
          },
          "knockout_config": {
            "type": "object",
            "properties": {
              "seeding_source": {
                "type": "string",
                "enum": [
                  "standings_top_n",
                  "manual",
                  "draw"
                ]
              },
              "qualified_count": {
                "type": "integer",
                "minimum": 2,
                "maximum": 64
              },
              "linked_source_tournament_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "round_defaults": {
                "type": "object",
                "properties": {
                  "legs": {
                    "oneOf": [
                      {
                        "type": "number",
                        "enum": [
                          1
                        ]
                      },
                      {
                        "type": "number",
                        "enum": [
                          2
                        ]
                      }
                    ]
                  },
                  "away_goals_rule": {
                    "type": "boolean"
                  },
                  "extra_time": {
                    "type": "boolean"
                  },
                  "penalties": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "legs",
                  "extra_time",
                  "penalties"
                ]
              }
            },
            "required": [
              "seeding_source",
              "round_defaults"
            ]
          },
          "standings_zones": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "promoted": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 32
                  },
                  "playoff": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 32
                  },
                  "relegated": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 32
                  },
                  "promoted_label": {
                    "oneOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 40
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "playoff_label": {
                    "oneOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 40
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "relegated_label": {
                    "oneOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 40
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "promoted",
                  "playoff",
                  "relegated"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "version": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "etag": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "id",
          "tenant_id",
          "season_id",
          "organization_id",
          "slug",
          "label",
          "format",
          "starts_on",
          "ends_on",
          "expected_team_count",
          "version",
          "etag"
        ]
      },
      "AdminTournamentList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "tenant_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "season_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "organization_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "slug": {
                  "type": "string",
                  "minLength": 2,
                  "maxLength": 64,
                  "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
                },
                "label": {
                  "type": "string",
                  "minLength": 1
                },
                "format": {
                  "oneOf": [
                    {
                      "type": "string",
                      "enum": [
                        "league",
                        "league_with_playoffs",
                        "cup",
                        "group_then_knockout"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "group_count": {
                  "oneOf": [
                    {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 32
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "public_kind": {
                  "oneOf": [
                    {
                      "type": "string",
                      "enum": [
                        "championship",
                        "tournament"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "competition_category": {
                  "oneOf": [
                    {
                      "type": "string",
                      "enum": [
                        "serie_a",
                        "serie_a2",
                        "serie_b",
                        "cup",
                        "playoff"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "starts_on": {
                  "type": "string",
                  "format": "date"
                },
                "ends_on": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "draft",
                    "ready",
                    "scheduled",
                    "in_progress",
                    "completed",
                    "playoffs",
                    "archived"
                  ],
                  "default": "draft"
                },
                "regular_season_legs": {
                  "oneOf": [
                    {
                      "type": "number",
                      "enum": [
                        1
                      ]
                    },
                    {
                      "type": "number",
                      "enum": [
                        2
                      ]
                    }
                  ],
                  "default": 1
                },
                "expected_team_count": {
                  "oneOf": [
                    {
                      "type": "integer",
                      "minimum": 2,
                      "maximum": 64
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "knockout_config": {
                  "type": "object",
                  "properties": {
                    "seeding_source": {
                      "type": "string",
                      "enum": [
                        "standings_top_n",
                        "manual",
                        "draw"
                      ]
                    },
                    "qualified_count": {
                      "type": "integer",
                      "minimum": 2,
                      "maximum": 64
                    },
                    "linked_source_tournament_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "round_defaults": {
                      "type": "object",
                      "properties": {
                        "legs": {
                          "oneOf": [
                            {
                              "type": "number",
                              "enum": [
                                1
                              ]
                            },
                            {
                              "type": "number",
                              "enum": [
                                2
                              ]
                            }
                          ]
                        },
                        "away_goals_rule": {
                          "type": "boolean"
                        },
                        "extra_time": {
                          "type": "boolean"
                        },
                        "penalties": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "legs",
                        "extra_time",
                        "penalties"
                      ]
                    }
                  },
                  "required": [
                    "seeding_source",
                    "round_defaults"
                  ]
                },
                "standings_zones": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "promoted": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 32
                        },
                        "playoff": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 32
                        },
                        "relegated": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 32
                        },
                        "promoted_label": {
                          "oneOf": [
                            {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 40
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "playoff_label": {
                          "oneOf": [
                            {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 40
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "relegated_label": {
                          "oneOf": [
                            {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 40
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "promoted",
                        "playoff",
                        "relegated"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "version": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "etag": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "required": [
                "id",
                "tenant_id",
                "season_id",
                "organization_id",
                "slug",
                "label",
                "format",
                "starts_on",
                "ends_on",
                "expected_team_count",
                "version",
                "etag"
              ]
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "offset": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "items",
          "total",
          "limit",
          "offset"
        ]
      },
      "AdminTeamRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "organization_id": {
            "type": "string",
            "format": "uuid"
          },
          "slug": {
            "type": "string",
            "minLength": 2,
            "maxLength": 64,
            "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
          },
          "display_name": {
            "type": "string",
            "minLength": 1
          },
          "short_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 8
          },
          "primary_color": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "secondary_color": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "logo_url": {
            "oneOf": [
              {
                "type": "string",
                "format": "uri"
              },
              {
                "type": "null"
              }
            ]
          },
          "is_active": {
            "type": "boolean"
          },
          "version": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "etag": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "id",
          "tenant_id",
          "organization_id",
          "slug",
          "display_name",
          "short_name",
          "primary_color",
          "secondary_color",
          "logo_url",
          "is_active",
          "version",
          "etag"
        ]
      },
      "AdminTeamList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "tenant_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "organization_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "slug": {
                  "type": "string",
                  "minLength": 2,
                  "maxLength": 64,
                  "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
                },
                "display_name": {
                  "type": "string",
                  "minLength": 1
                },
                "short_name": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 8
                },
                "primary_color": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "secondary_color": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "logo_url": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uri"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "is_active": {
                  "type": "boolean"
                },
                "version": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "etag": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "required": [
                "id",
                "tenant_id",
                "organization_id",
                "slug",
                "display_name",
                "short_name",
                "primary_color",
                "secondary_color",
                "logo_url",
                "is_active",
                "version",
                "etag"
              ]
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "offset": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "items",
          "total",
          "limit",
          "offset"
        ]
      },
      "AdminPlayerRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "organization_id": {
            "type": "string",
            "format": "uuid"
          },
          "slug": {
            "type": "string",
            "minLength": 2,
            "maxLength": 64,
            "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
          },
          "sport_name": {
            "type": "string",
            "minLength": 1
          },
          "role": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "GK",
                  "DEF",
                  "MID",
                  "FWD"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "shirt_number": {
            "oneOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "public_photo_url": {
            "oneOf": [
              {
                "type": "string",
                "format": "uri"
              },
              {
                "type": "null"
              }
            ]
          },
          "is_active": {
            "type": "boolean"
          },
          "is_minor": {
            "type": "boolean"
          },
          "account_pseudo": {
            "oneOf": [
              {
                "type": "string",
                "pattern": "^account:[0-9a-f]{10}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "version": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "etag": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "id",
          "tenant_id",
          "organization_id",
          "slug",
          "sport_name",
          "role",
          "shirt_number",
          "public_photo_url",
          "is_active",
          "is_minor",
          "account_pseudo",
          "version",
          "etag"
        ]
      },
      "AdminPlayerList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "tenant_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "organization_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "slug": {
                  "type": "string",
                  "minLength": 2,
                  "maxLength": 64,
                  "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
                },
                "sport_name": {
                  "type": "string",
                  "minLength": 1
                },
                "role": {
                  "oneOf": [
                    {
                      "type": "string",
                      "enum": [
                        "GK",
                        "DEF",
                        "MID",
                        "FWD"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "shirt_number": {
                  "oneOf": [
                    {
                      "type": "integer"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "public_photo_url": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uri"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "is_active": {
                  "type": "boolean"
                },
                "is_minor": {
                  "type": "boolean"
                },
                "account_pseudo": {
                  "oneOf": [
                    {
                      "type": "string",
                      "pattern": "^account:[0-9a-f]{10}$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "version": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "etag": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "required": [
                "id",
                "tenant_id",
                "organization_id",
                "slug",
                "sport_name",
                "role",
                "shirt_number",
                "public_photo_url",
                "is_active",
                "is_minor",
                "account_pseudo",
                "version",
                "etag"
              ]
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "offset": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "items",
          "total",
          "limit",
          "offset"
        ]
      },
      "AdminFixtureRow": {
        "type": "object",
        "properties": {
          "match_id": {
            "type": "string",
            "format": "uuid"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "tournament_id": {
            "type": "string",
            "format": "uuid"
          },
          "round_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "group_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "field_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "scheduled_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "schedule_precision": {
            "type": "string",
            "enum": [
              "exact",
              "date_only",
              "unknown"
            ]
          },
          "scheduled_on": {
            "oneOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ]
          },
          "state": {
            "type": "string",
            "enum": [
              "scheduled",
              "live",
              "ended",
              "report_draft",
              "report_submitted",
              "report_official",
              "corrected",
              "cancelled",
              "postponed"
            ]
          },
          "home_team_id": {
            "type": "string",
            "format": "uuid"
          },
          "away_team_id": {
            "type": "string",
            "format": "uuid"
          },
          "version": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "etag": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "match_id",
          "tenant_id",
          "tournament_id",
          "round_id",
          "group_id",
          "field_id",
          "scheduled_at",
          "schedule_precision",
          "scheduled_on",
          "state",
          "home_team_id",
          "away_team_id",
          "version",
          "etag"
        ]
      },
      "AdminFixtureList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "match_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "tenant_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "tournament_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "round_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "group_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "field_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "scheduled_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "schedule_precision": {
                  "type": "string",
                  "enum": [
                    "exact",
                    "date_only",
                    "unknown"
                  ]
                },
                "scheduled_on": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "state": {
                  "type": "string",
                  "enum": [
                    "scheduled",
                    "live",
                    "ended",
                    "report_draft",
                    "report_submitted",
                    "report_official",
                    "corrected",
                    "cancelled",
                    "postponed"
                  ]
                },
                "home_team_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "away_team_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "version": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "etag": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "required": [
                "match_id",
                "tenant_id",
                "tournament_id",
                "round_id",
                "group_id",
                "field_id",
                "scheduled_at",
                "schedule_precision",
                "scheduled_on",
                "state",
                "home_team_id",
                "away_team_id",
                "version",
                "etag"
              ]
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "AdminFantasyLeagueRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "tournament_id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "visibility": {
            "type": "string",
            "enum": [
              "public",
              "private"
            ]
          },
          "starts_on": {
            "type": "string",
            "format": "date"
          },
          "ends_on": {
            "type": "string",
            "format": "date"
          },
          "archived_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "tenant_id",
          "tournament_id",
          "name",
          "visibility",
          "starts_on",
          "ends_on"
        ]
      },
      "AdminFantasyLeagueList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "tenant_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "tournament_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "name": {
                  "type": "string",
                  "minLength": 1
                },
                "visibility": {
                  "type": "string",
                  "enum": [
                    "public",
                    "private"
                  ]
                },
                "starts_on": {
                  "type": "string",
                  "format": "date"
                },
                "ends_on": {
                  "type": "string",
                  "format": "date"
                },
                "archived_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "tenant_id",
                "tournament_id",
                "name",
                "visibility",
                "starts_on",
                "ends_on"
              ]
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "AdminFantasyMarketOrderRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "fantasy_team_id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "type": "string",
            "enum": [
              "buy",
              "sell",
              "swap",
              "trade"
            ]
          },
          "player_in_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "player_out_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "proposed_price": {
            "type": "integer",
            "minimum": 0
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "accepted",
              "rejected",
              "cancelled",
              "countered",
              "in_review",
              "expired"
            ]
          },
          "submitted_at": {
            "type": "string",
            "format": "date-time"
          },
          "decided_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "decision_reason": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "resulting_transaction_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "submitted_by_pseudo": {
            "type": "string",
            "pattern": "^user:[0-9a-f]{10}$"
          },
          "decided_by_pseudo": {
            "oneOf": [
              {
                "type": "string",
                "pattern": "^user:[0-9a-f]{10}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "idempotency_label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 12
          },
          "fantasy_team_label": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "player_in_label": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "player_out_label": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "counterparty_team_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "counterparty_team_label": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "players_out_labels": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "players_in_labels": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "credits_delta": {
            "type": "integer",
            "default": 0
          },
          "expires_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "review_mode": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "none",
                  "commissioner"
                ]
              },
              {
                "type": "null"
              }
            ],
            "default": null
          }
        },
        "required": [
          "id",
          "tenant_id",
          "fantasy_team_id",
          "kind",
          "player_in_id",
          "player_out_id",
          "proposed_price",
          "status",
          "submitted_at",
          "decided_at",
          "decision_reason",
          "resulting_transaction_id",
          "submitted_by_pseudo",
          "decided_by_pseudo",
          "idempotency_label",
          "fantasy_team_label",
          "player_in_label",
          "player_out_label"
        ]
      },
      "AdminFantasyMarketOrderList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "tenant_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "fantasy_team_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "buy",
                    "sell",
                    "swap",
                    "trade"
                  ]
                },
                "player_in_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "player_out_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "proposed_price": {
                  "type": "integer",
                  "minimum": 0
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "pending",
                    "accepted",
                    "rejected",
                    "cancelled",
                    "countered",
                    "in_review",
                    "expired"
                  ]
                },
                "submitted_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "decided_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "decision_reason": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "resulting_transaction_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "submitted_by_pseudo": {
                  "type": "string",
                  "pattern": "^user:[0-9a-f]{10}$"
                },
                "decided_by_pseudo": {
                  "oneOf": [
                    {
                      "type": "string",
                      "pattern": "^user:[0-9a-f]{10}$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "idempotency_label": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 12
                },
                "fantasy_team_label": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "player_in_label": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "player_out_label": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "counterparty_team_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "counterparty_team_label": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "players_out_labels": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "default": []
                },
                "players_in_labels": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "default": []
                },
                "credits_delta": {
                  "type": "integer",
                  "default": 0
                },
                "expires_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "review_mode": {
                  "oneOf": [
                    {
                      "type": "string",
                      "enum": [
                        "none",
                        "commissioner"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                }
              },
              "required": [
                "id",
                "tenant_id",
                "fantasy_team_id",
                "kind",
                "player_in_id",
                "player_out_id",
                "proposed_price",
                "status",
                "submitted_at",
                "decided_at",
                "decision_reason",
                "resulting_transaction_id",
                "submitted_by_pseudo",
                "decided_by_pseudo",
                "idempotency_label",
                "fantasy_team_label",
                "player_in_label",
                "player_out_label"
              ]
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "AdminFantasyLeaderboardRow": {
        "type": "object",
        "properties": {
          "fantasy_team_id": {
            "type": "string",
            "format": "uuid"
          },
          "fantasy_team_label": {
            "type": "string",
            "minLength": 1
          },
          "points": {
            "type": "number"
          },
          "status": {
            "type": "string",
            "enum": [
              "provisional",
              "final",
              "corrected"
            ]
          },
          "rule_version": {
            "type": "integer",
            "minimum": 1
          },
          "computed_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "fantasy_team_id",
          "fantasy_team_label",
          "points",
          "status",
          "rule_version",
          "computed_at"
        ]
      },
      "AdminFantasyLeaderboardResponse": {
        "type": "object",
        "properties": {
          "league_id": {
            "type": "string",
            "format": "uuid"
          },
          "active_rule_version": {
            "oneOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "aggregate_status": {
            "type": "string",
            "enum": [
              "empty",
              "provisional",
              "final"
            ]
          },
          "finalize_state": {
            "type": "string",
            "enum": [
              "empty",
              "provisional",
              "final",
              "recomputing",
              "superseded",
              "failed"
            ]
          },
          "current_score_count": {
            "type": "integer",
            "minimum": 0
          },
          "provisional_score_count": {
            "type": "integer",
            "minimum": 0
          },
          "final_score_count": {
            "type": "integer",
            "minimum": 0
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "fantasy_team_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "fantasy_team_label": {
                  "type": "string",
                  "minLength": 1
                },
                "points": {
                  "type": "number"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "provisional",
                    "final",
                    "corrected"
                  ]
                },
                "rule_version": {
                  "type": "integer",
                  "minimum": 1
                },
                "computed_at": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "fantasy_team_id",
                "fantasy_team_label",
                "points",
                "status",
                "rule_version",
                "computed_at"
              ]
            }
          }
        },
        "required": [
          "league_id",
          "active_rule_version",
          "aggregate_status",
          "finalize_state",
          "current_score_count",
          "provisional_score_count",
          "final_score_count",
          "items"
        ]
      },
      "AdminFantasyRuleSetRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "league_id": {
            "type": "string",
            "format": "uuid"
          },
          "version": {
            "type": "integer",
            "minimum": 1
          },
          "weights": {
            "type": "object",
            "additionalProperties": true
          },
          "captain_multiplier": {
            "type": "number",
            "minimum": 1,
            "maximum": 3
          },
          "rating_weight": {
            "type": "number",
            "minimum": 0,
            "maximum": 5
          },
          "performance_source": {
            "type": "string",
            "enum": [
              "evaluator_rating",
              "evaluator_vote",
              "automatic_participation"
            ]
          },
          "participation_baseline": {
            "type": "number",
            "minimum": 0,
            "maximum": 10
          },
          "mvp_bonus": {
            "type": "number",
            "minimum": 0,
            "maximum": 10
          },
          "auto_substitution_limit": {
            "oneOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "initial_budget": {
            "type": "integer",
            "minimum": 0
          },
          "available_formations": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "formation_string": {
                  "type": "string",
                  "pattern": "^1-\\d-\\d-\\d$"
                },
                "formation": {
                  "type": "object",
                  "properties": {
                    "GK": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "DEF": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "MID": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "FWD": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "GK",
                    "DEF",
                    "MID",
                    "FWD"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "formation_string",
                "formation"
              ],
              "additionalProperties": false
            },
            "minItems": 1
          },
          "lineup_lock_policy": {
            "type": "string",
            "enum": [
              "global_deadline",
              "progressive_lock"
            ]
          },
          "captain_mode": {
            "type": "string",
            "enum": [
              "double",
              "modifier"
            ]
          },
          "transfer_window": {
            "type": "object",
            "properties": {
              "closes_at": {
                "type": "string",
                "enum": [
                  "round_deadline"
                ]
              },
              "close_buffer_minutes": {
                "type": "integer",
                "minimum": 0,
                "default": 0
              },
              "max_transfers_per_window": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "default": 3
              },
              "sell_recovery_fraction": {
                "type": "number",
                "minimum": 0,
                "maximum": 1,
                "default": 0.5
              },
              "initial_build_exempt": {
                "type": "boolean"
              },
              "trade_review": {
                "type": "string",
                "enum": [
                  "none",
                  "commissioner"
                ]
              },
              "trades_count_as_transfers": {
                "type": "boolean"
              },
              "trade_deadline_rounds_before_end": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "closes_at"
            ],
            "additionalProperties": false
          },
          "activated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "tenant_id",
          "league_id",
          "version",
          "weights",
          "captain_multiplier",
          "rating_weight",
          "mvp_bonus",
          "initial_budget",
          "available_formations",
          "lineup_lock_policy",
          "activated_at"
        ]
      },
      "AdminPublishFantasyRulesRequest": {
        "type": "object",
        "properties": {
          "league_id": {
            "type": "string",
            "format": "uuid"
          },
          "weights": {
            "type": "object",
            "additionalProperties": true
          },
          "captain_multiplier": {
            "type": "number",
            "minimum": 1,
            "maximum": 3
          },
          "rating_weight": {
            "type": "number",
            "minimum": 0,
            "maximum": 5
          },
          "performance_source": {
            "type": "string",
            "enum": [
              "evaluator_rating",
              "evaluator_vote",
              "automatic_participation"
            ]
          },
          "participation_baseline": {
            "type": "number",
            "minimum": 0,
            "maximum": 10
          },
          "mvp_bonus": {
            "type": "number",
            "minimum": 0,
            "maximum": 10
          },
          "initial_budget": {
            "type": "integer",
            "minimum": 0
          },
          "available_formations": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "formation_string": {
                  "type": "string",
                  "pattern": "^1-\\d-\\d-\\d$"
                },
                "formation": {
                  "type": "object",
                  "properties": {
                    "GK": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "DEF": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "MID": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "FWD": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "GK",
                    "DEF",
                    "MID",
                    "FWD"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "formation_string",
                "formation"
              ],
              "additionalProperties": false
            },
            "minItems": 1
          },
          "lineup_lock_policy": {
            "type": "string",
            "enum": [
              "global_deadline",
              "progressive_lock"
            ]
          },
          "effective_from_round_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "transfer_window": {
            "type": "object",
            "properties": {
              "close_buffer_minutes": {
                "type": "integer",
                "minimum": 0,
                "maximum": 1440
              },
              "max_transfers_per_window": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 99
              },
              "sell_recovery_fraction": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "initial_build_exempt": {
                "type": "boolean"
              },
              "trade_review": {
                "type": "string",
                "enum": [
                  "none",
                  "commissioner"
                ]
              },
              "trades_count_as_transfers": {
                "type": "boolean"
              },
              "trade_deadline_rounds_before_end": {
                "type": "integer",
                "minimum": 0,
                "maximum": 38
              }
            },
            "required": [],
            "additionalProperties": false
          },
          "captain_mode": {
            "type": "string",
            "enum": [
              "double",
              "modifier"
            ]
          }
        },
        "required": [
          "league_id",
          "weights",
          "captain_multiplier",
          "rating_weight",
          "mvp_bonus",
          "initial_budget"
        ]
      },
      "AdminFantasyMarketDecideRequest": {
        "type": "object",
        "properties": {
          "decision": {
            "type": "string",
            "enum": [
              "accepted",
              "rejected"
            ]
          },
          "reason": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "decision",
          "reason"
        ]
      },
      "AdminFantasyRuleSetList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "tenant_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "league_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "version": {
                  "type": "integer",
                  "minimum": 1
                },
                "weights": {
                  "type": "object",
                  "additionalProperties": true
                },
                "captain_multiplier": {
                  "type": "number",
                  "minimum": 1,
                  "maximum": 3
                },
                "rating_weight": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 5
                },
                "performance_source": {
                  "type": "string",
                  "enum": [
                    "evaluator_rating",
                    "evaluator_vote",
                    "automatic_participation"
                  ]
                },
                "participation_baseline": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 10
                },
                "mvp_bonus": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 10
                },
                "auto_substitution_limit": {
                  "oneOf": [
                    {
                      "type": "integer",
                      "minimum": 0
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "initial_budget": {
                  "type": "integer",
                  "minimum": 0
                },
                "available_formations": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "formation_string": {
                        "type": "string",
                        "pattern": "^1-\\d-\\d-\\d$"
                      },
                      "formation": {
                        "type": "object",
                        "properties": {
                          "GK": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "DEF": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "MID": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "FWD": {
                            "type": "integer",
                            "minimum": 0
                          }
                        },
                        "required": [
                          "GK",
                          "DEF",
                          "MID",
                          "FWD"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "formation_string",
                      "formation"
                    ],
                    "additionalProperties": false
                  },
                  "minItems": 1
                },
                "lineup_lock_policy": {
                  "type": "string",
                  "enum": [
                    "global_deadline",
                    "progressive_lock"
                  ]
                },
                "captain_mode": {
                  "type": "string",
                  "enum": [
                    "double",
                    "modifier"
                  ]
                },
                "transfer_window": {
                  "type": "object",
                  "properties": {
                    "closes_at": {
                      "type": "string",
                      "enum": [
                        "round_deadline"
                      ]
                    },
                    "close_buffer_minutes": {
                      "type": "integer",
                      "minimum": 0,
                      "default": 0
                    },
                    "max_transfers_per_window": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "default": 3
                    },
                    "sell_recovery_fraction": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1,
                      "default": 0.5
                    },
                    "initial_build_exempt": {
                      "type": "boolean"
                    },
                    "trade_review": {
                      "type": "string",
                      "enum": [
                        "none",
                        "commissioner"
                      ]
                    },
                    "trades_count_as_transfers": {
                      "type": "boolean"
                    },
                    "trade_deadline_rounds_before_end": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "closes_at"
                  ],
                  "additionalProperties": false
                },
                "activated_at": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "id",
                "tenant_id",
                "league_id",
                "version",
                "weights",
                "captain_multiplier",
                "rating_weight",
                "mvp_bonus",
                "initial_budget",
                "available_formations",
                "lineup_lock_policy",
                "activated_at"
              ]
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "AdminSupportTicketRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "subject": {
            "type": "string",
            "minLength": 1,
            "maxLength": 180
          },
          "status": {
            "type": "string",
            "enum": [
              "open",
              "in_progress",
              "awaiting_user",
              "resolved",
              "closed"
            ]
          },
          "priority": {
            "type": "string",
            "enum": [
              "low",
              "normal",
              "high",
              "urgent"
            ]
          },
          "dpo_only": {
            "type": "boolean"
          },
          "opened_at": {
            "type": "string",
            "format": "date-time"
          },
          "last_activity_at": {
            "type": "string",
            "format": "date-time"
          },
          "requester_pseudo": {
            "type": "string",
            "pattern": "^user:[0-9a-f]{10}$"
          },
          "assigned_operator_pseudo": {
            "oneOf": [
              {
                "type": "string",
                "pattern": "^user:[0-9a-f]{10}$"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "tenant_id",
          "subject",
          "status",
          "priority",
          "dpo_only",
          "opened_at",
          "last_activity_at",
          "requester_pseudo",
          "assigned_operator_pseudo"
        ]
      },
      "AdminSupportTicketList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "tenant_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "subject": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 180
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "open",
                    "in_progress",
                    "awaiting_user",
                    "resolved",
                    "closed"
                  ]
                },
                "priority": {
                  "type": "string",
                  "enum": [
                    "low",
                    "normal",
                    "high",
                    "urgent"
                  ]
                },
                "dpo_only": {
                  "type": "boolean"
                },
                "opened_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "last_activity_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "requester_pseudo": {
                  "type": "string",
                  "pattern": "^user:[0-9a-f]{10}$"
                },
                "assigned_operator_pseudo": {
                  "oneOf": [
                    {
                      "type": "string",
                      "pattern": "^user:[0-9a-f]{10}$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "tenant_id",
                "subject",
                "status",
                "priority",
                "dpo_only",
                "opened_at",
                "last_activity_at",
                "requester_pseudo",
                "assigned_operator_pseudo"
              ]
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "AdminIncidentRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 180
          },
          "severity": {
            "type": "string",
            "enum": [
              "sev1",
              "sev2",
              "sev3",
              "sev4"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "investigating",
              "identified",
              "monitoring",
              "resolved"
            ]
          },
          "feature_flag_key": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "affected_module": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "started_at": {
            "type": "string",
            "format": "date-time"
          },
          "resolved_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "owner_pseudo": {
            "oneOf": [
              {
                "type": "string",
                "pattern": "^user:[0-9a-f]{10}$"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "tenant_id",
          "title",
          "severity",
          "status",
          "feature_flag_key",
          "affected_module",
          "started_at",
          "resolved_at",
          "owner_pseudo"
        ]
      },
      "AdminIncidentList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "tenant_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "title": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 180
                },
                "severity": {
                  "type": "string",
                  "enum": [
                    "sev1",
                    "sev2",
                    "sev3",
                    "sev4"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "investigating",
                    "identified",
                    "monitoring",
                    "resolved"
                  ]
                },
                "feature_flag_key": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "affected_module": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "started_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "resolved_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "owner_pseudo": {
                  "oneOf": [
                    {
                      "type": "string",
                      "pattern": "^user:[0-9a-f]{10}$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "tenant_id",
                "title",
                "severity",
                "status",
                "feature_flag_key",
                "affected_module",
                "started_at",
                "resolved_at",
                "owner_pseudo"
              ]
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "AdminCertificationRequestRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "match_id": {
            "type": "string",
            "format": "uuid"
          },
          "report_version_id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "enum": [
              "requested",
              "processing",
              "completed",
              "failed",
              "dead_letter",
              "superseded"
            ]
          },
          "adapter_name": {
            "type": "string",
            "minLength": 1
          },
          "attempt_count": {
            "type": "integer",
            "minimum": 0
          },
          "next_attempt_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_error": {
            "oneOf": [
              {
                "type": "string",
                "maxLength": 240
              },
              {
                "type": "null"
              }
            ]
          },
          "payload_hash": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "requested_at": {
            "type": "string",
            "format": "date-time"
          },
          "completed_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "tenant_id",
          "match_id",
          "report_version_id",
          "status",
          "adapter_name",
          "attempt_count",
          "next_attempt_at",
          "last_error",
          "payload_hash",
          "requested_at",
          "completed_at"
        ]
      },
      "AdminCertificationRequestList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "tenant_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "match_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "report_version_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "requested",
                    "processing",
                    "completed",
                    "failed",
                    "dead_letter",
                    "superseded"
                  ]
                },
                "adapter_name": {
                  "type": "string",
                  "minLength": 1
                },
                "attempt_count": {
                  "type": "integer",
                  "minimum": 0
                },
                "next_attempt_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "last_error": {
                  "oneOf": [
                    {
                      "type": "string",
                      "maxLength": 240
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "payload_hash": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "requested_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "completed_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "tenant_id",
                "match_id",
                "report_version_id",
                "status",
                "adapter_name",
                "attempt_count",
                "next_attempt_at",
                "last_error",
                "payload_hash",
                "requested_at",
                "completed_at"
              ]
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "AdminArchivePublicRegistrationRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "source_system": {
            "type": "string",
            "minLength": 2,
            "maxLength": 64,
            "pattern": "^[a-z0-9](?:[a-z0-9._-]*[a-z0-9])?$"
          },
          "source_registration_id": {
            "type": "string"
          },
          "display_name": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "source_role_label": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "person_kind": {
            "type": "string",
            "enum": [
              "player",
              "staff",
              "unknown"
            ]
          },
          "source_role": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "GK",
                  "DEF",
                  "MID",
                  "FWD"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "staff_role": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "manager",
                  "coach",
                  "external_officer"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "public_profile_url": {
            "oneOf": [
              {
                "type": "string",
                "format": "uri",
                "pattern": "^https?:\\/\\/"
              },
              {
                "type": "null"
              }
            ]
          },
          "tournament_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "team_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "source_tournament_id": {
            "type": "string"
          },
          "source_team_id": {
            "type": "string"
          },
          "source_group_id": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "source_group_team_id": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "source_season_label": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "membership_basis": {
            "type": "string",
            "enum": [
              "roster",
              "roster_only",
              "lineup_only"
            ]
          },
          "appearances": {
            "type": "integer",
            "minimum": 0
          },
          "statistic_label_counts": {
            "type": "object",
            "additionalProperties": true
          },
          "statistics_basis": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "public_match_page_icons"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "source": {
            "type": "object",
            "properties": {
              "surface": {
                "type": "string",
                "enum": [
                  "public_page",
                  "private_back_office"
                ]
              },
              "captured_at": {
                "type": "string",
                "format": "date-time"
              },
              "proof": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "url": {
                        "type": "string",
                        "format": "uri",
                        "pattern": "^https?:\\/\\/"
                      },
                      "sha256": {
                        "type": "string",
                        "pattern": "^[0-9a-f]{64}$"
                      },
                      "captured_at": {
                        "type": "string",
                        "format": "date-time"
                      }
                    },
                    "required": [
                      "url",
                      "sha256",
                      "captured_at"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "surface",
              "captured_at",
              "proof"
            ]
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "organization_id": {
            "type": "string",
            "format": "uuid"
          },
          "publication": {
            "type": "string",
            "enum": [
              "published",
              "withheld"
            ]
          },
          "withheld_reason": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "name_not_captured",
                  "youth_competition",
                  "source_public_proof_missing",
                  "operator_decision",
                  "erasure_request"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "publication_note": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "publicly_readable": {
            "type": "boolean"
          },
          "source_page_urls": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uri",
              "pattern": "^https?:\\/\\/"
            }
          },
          "source_revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "version": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "etag": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "source_system",
          "source_registration_id",
          "display_name",
          "source_role_label",
          "person_kind",
          "source_role",
          "staff_role",
          "public_profile_url",
          "tournament_id",
          "team_id",
          "source_tournament_id",
          "source_team_id",
          "source_group_id",
          "source_group_team_id",
          "source_season_label",
          "membership_basis",
          "appearances",
          "statistic_label_counts",
          "statistics_basis",
          "source",
          "tenant_id",
          "organization_id",
          "publication",
          "withheld_reason",
          "publication_note",
          "publicly_readable",
          "source_page_urls",
          "source_revision",
          "version",
          "etag"
        ]
      },
      "AdminArchivePublicRegistrationList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "source_system": {
                  "type": "string",
                  "minLength": 2,
                  "maxLength": 64,
                  "pattern": "^[a-z0-9](?:[a-z0-9._-]*[a-z0-9])?$"
                },
                "source_registration_id": {
                  "type": "string"
                },
                "display_name": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "source_role_label": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "person_kind": {
                  "type": "string",
                  "enum": [
                    "player",
                    "staff",
                    "unknown"
                  ]
                },
                "source_role": {
                  "oneOf": [
                    {
                      "type": "string",
                      "enum": [
                        "GK",
                        "DEF",
                        "MID",
                        "FWD"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "staff_role": {
                  "oneOf": [
                    {
                      "type": "string",
                      "enum": [
                        "manager",
                        "coach",
                        "external_officer"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "public_profile_url": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uri",
                      "pattern": "^https?:\\/\\/"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "tournament_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "team_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "source_tournament_id": {
                  "type": "string"
                },
                "source_team_id": {
                  "type": "string"
                },
                "source_group_id": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "source_group_team_id": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "source_season_label": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "membership_basis": {
                  "type": "string",
                  "enum": [
                    "roster",
                    "roster_only",
                    "lineup_only"
                  ]
                },
                "appearances": {
                  "type": "integer",
                  "minimum": 0
                },
                "statistic_label_counts": {
                  "type": "object",
                  "additionalProperties": true
                },
                "statistics_basis": {
                  "oneOf": [
                    {
                      "type": "string",
                      "enum": [
                        "public_match_page_icons"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "source": {
                  "type": "object",
                  "properties": {
                    "surface": {
                      "type": "string",
                      "enum": [
                        "public_page",
                        "private_back_office"
                      ]
                    },
                    "captured_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "proof": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "url": {
                              "type": "string",
                              "format": "uri",
                              "pattern": "^https?:\\/\\/"
                            },
                            "sha256": {
                              "type": "string",
                              "pattern": "^[0-9a-f]{64}$"
                            },
                            "captured_at": {
                              "type": "string",
                              "format": "date-time"
                            }
                          },
                          "required": [
                            "url",
                            "sha256",
                            "captured_at"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "surface",
                    "captured_at",
                    "proof"
                  ]
                },
                "tenant_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "organization_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "publication": {
                  "type": "string",
                  "enum": [
                    "published",
                    "withheld"
                  ]
                },
                "withheld_reason": {
                  "oneOf": [
                    {
                      "type": "string",
                      "enum": [
                        "name_not_captured",
                        "youth_competition",
                        "source_public_proof_missing",
                        "operator_decision",
                        "erasure_request"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "publication_note": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "publicly_readable": {
                  "type": "boolean"
                },
                "source_page_urls": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uri",
                    "pattern": "^https?:\\/\\/"
                  }
                },
                "source_revision": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "version": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "etag": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "source_system",
                "source_registration_id",
                "display_name",
                "source_role_label",
                "person_kind",
                "source_role",
                "staff_role",
                "public_profile_url",
                "tournament_id",
                "team_id",
                "source_tournament_id",
                "source_team_id",
                "source_group_id",
                "source_group_team_id",
                "source_season_label",
                "membership_basis",
                "appearances",
                "statistic_label_counts",
                "statistics_basis",
                "source",
                "tenant_id",
                "organization_id",
                "publication",
                "withheld_reason",
                "publication_note",
                "publicly_readable",
                "source_page_urls",
                "source_revision",
                "version",
                "etag"
              ]
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "offset": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "items",
          "total",
          "limit",
          "offset"
        ]
      },
      "AdminArchivePublicRegistrationSummaryResponse": {
        "type": "object",
        "properties": {
          "by_person_kind": {
            "type": "object",
            "properties": {
              "player": {
                "type": "integer",
                "minimum": 0
              },
              "staff": {
                "type": "integer",
                "minimum": 0
              },
              "unknown": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "player",
              "staff",
              "unknown"
            ]
          },
          "by_source_role": {
            "type": "object",
            "properties": {
              "GK": {
                "type": "integer",
                "minimum": 0
              },
              "DEF": {
                "type": "integer",
                "minimum": 0
              },
              "MID": {
                "type": "integer",
                "minimum": 0
              },
              "FWD": {
                "type": "integer",
                "minimum": 0
              },
              "none": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "GK",
              "DEF",
              "MID",
              "FWD",
              "none"
            ]
          },
          "with_display_name": {
            "type": "integer",
            "minimum": 0
          },
          "without_display_name": {
            "type": "integer",
            "minimum": 0
          },
          "publishable": {
            "type": "integer",
            "minimum": 0
          },
          "withheld": {
            "type": "integer",
            "minimum": 0
          },
          "with_destination_refs": {
            "type": "integer",
            "minimum": 0
          },
          "without_destination_refs": {
            "type": "integer",
            "minimum": 0
          },
          "organization_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "total": {
            "type": "integer",
            "minimum": 0
          },
          "last_captured_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "by_person_kind",
          "by_source_role",
          "with_display_name",
          "without_display_name",
          "publishable",
          "withheld",
          "with_destination_refs",
          "without_destination_refs",
          "organization_id",
          "total",
          "last_captured_at"
        ]
      },
      "AdminArchivePublicRegistrationImportRequest": {
        "type": "object",
        "properties": {
          "organization_id": {
            "type": "string",
            "format": "uuid"
          },
          "source_system": {
            "type": "string",
            "minLength": 2,
            "maxLength": 64,
            "pattern": "^[a-z0-9](?:[a-z0-9._-]*[a-z0-9])?$"
          },
          "source_surface": {
            "type": "string",
            "enum": [
              "public_page",
              "private_back_office"
            ]
          },
          "captured_at": {
            "type": "string",
            "format": "date-time"
          },
          "initial_publication": {
            "type": "string",
            "enum": [
              "withheld",
              "published"
            ],
            "default": "withheld"
          },
          "rows": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "source_registration_id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64
                },
                "display_name": {
                  "oneOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "source_role_label": {
                  "oneOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 80
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "public_profile_url": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uri",
                      "pattern": "^https?:\\/\\/"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "source_tournament_id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64
                },
                "source_team_id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64
                },
                "source_group_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "source_group_team_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "memberships": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "source_group_id": {
                        "oneOf": [
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 64
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "source_group_team_id": {
                        "oneOf": [
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 64
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "surface": {
                        "type": "string",
                        "enum": [
                          "public_team_page",
                          "public_match_page"
                        ]
                      },
                      "source_public_proof": {
                        "type": "object",
                        "properties": {
                          "url": {
                            "type": "string",
                            "format": "uri",
                            "pattern": "^https?:\\/\\/"
                          },
                          "sha256": {
                            "type": "string",
                            "pattern": "^[0-9a-f]{64}$"
                          },
                          "captured_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "url",
                          "sha256",
                          "captured_at"
                        ]
                      }
                    },
                    "required": [
                      "source_group_id",
                      "source_group_team_id",
                      "surface",
                      "source_public_proof"
                    ]
                  },
                  "maxItems": 16,
                  "default": []
                },
                "source_surface_read": {
                  "type": "string",
                  "enum": [
                    "public_team_page",
                    "public_match_page"
                  ],
                  "default": "public_team_page"
                },
                "source_season_label": {
                  "oneOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "tournament_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "team_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "membership_basis": {
                  "type": "string",
                  "enum": [
                    "roster",
                    "roster_only",
                    "lineup_only"
                  ]
                },
                "appearances": {
                  "type": "integer",
                  "minimum": 0,
                  "default": 0
                },
                "statistic_label_counts": {
                  "type": "object",
                  "additionalProperties": true,
                  "default": {}
                },
                "source_page_urls": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uri",
                    "pattern": "^https?:\\/\\/"
                  },
                  "maxItems": 8,
                  "default": []
                },
                "source_public_proof": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "url": {
                          "type": "string",
                          "format": "uri",
                          "pattern": "^https?:\\/\\/"
                        },
                        "sha256": {
                          "type": "string",
                          "pattern": "^[0-9a-f]{64}$"
                        },
                        "captured_at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "url",
                        "sha256",
                        "captured_at"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "expected_source_revision": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "required": [
                "source_registration_id",
                "source_tournament_id",
                "source_team_id",
                "membership_basis"
              ]
            },
            "minItems": 1,
            "maxItems": 500
          }
        },
        "required": [
          "organization_id",
          "source_system",
          "source_surface",
          "captured_at",
          "rows"
        ]
      },
      "AdminArchivePublicRegistrationImportResponse": {
        "type": "object",
        "properties": {
          "organization_id": {
            "type": "string",
            "format": "uuid"
          },
          "source_system": {
            "type": "string",
            "minLength": 2,
            "maxLength": 64,
            "pattern": "^[a-z0-9](?:[a-z0-9._-]*[a-z0-9])?$"
          },
          "source_surface": {
            "type": "string",
            "enum": [
              "public_page",
              "private_back_office"
            ]
          },
          "captured_at": {
            "type": "string",
            "format": "date-time"
          },
          "received": {
            "type": "integer",
            "minimum": 0
          },
          "created": {
            "type": "integer",
            "minimum": 0
          },
          "updated": {
            "type": "integer",
            "minimum": 0
          },
          "unchanged": {
            "type": "integer",
            "minimum": 0
          },
          "stale": {
            "type": "integer",
            "minimum": 0
          },
          "publication_preserved": {
            "type": "integer",
            "minimum": 0
          },
          "publishable": {
            "type": "integer",
            "minimum": 0
          },
          "published_on_create": {
            "type": "integer",
            "minimum": 0
          },
          "initial_publication_refused": {
            "type": "integer",
            "minimum": 0
          },
          "withheld": {
            "type": "integer",
            "minimum": 0
          },
          "with_destination_refs": {
            "type": "integer",
            "minimum": 0
          },
          "without_destination_refs": {
            "type": "integer",
            "minimum": 0
          },
          "conflicted": {
            "type": "integer",
            "minimum": 0,
            "default": 0
          },
          "by_person_kind": {
            "type": "object",
            "properties": {
              "player": {
                "type": "integer",
                "minimum": 0
              },
              "staff": {
                "type": "integer",
                "minimum": 0
              },
              "unknown": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "player",
              "staff",
              "unknown"
            ]
          },
          "by_source_role": {
            "type": "object",
            "properties": {
              "GK": {
                "type": "integer",
                "minimum": 0
              },
              "DEF": {
                "type": "integer",
                "minimum": 0
              },
              "MID": {
                "type": "integer",
                "minimum": 0
              },
              "FWD": {
                "type": "integer",
                "minimum": 0
              },
              "none": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "GK",
              "DEF",
              "MID",
              "FWD",
              "none"
            ]
          },
          "with_display_name": {
            "type": "integer",
            "minimum": 0
          },
          "without_display_name": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "organization_id",
          "source_system",
          "source_surface",
          "captured_at",
          "received",
          "created",
          "updated",
          "unchanged",
          "stale",
          "publication_preserved",
          "publishable",
          "published_on_create",
          "initial_publication_refused",
          "withheld",
          "with_destination_refs",
          "without_destination_refs",
          "by_person_kind",
          "by_source_role",
          "with_display_name",
          "without_display_name"
        ]
      },
      "AdminArchiveStandingsRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "source_system": {
            "type": "string",
            "minLength": 2,
            "maxLength": 64,
            "pattern": "^[a-z0-9](?:[a-z0-9._-]*[a-z0-9])?$"
          },
          "tournament_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "phase_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "group_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "source_tournament_id": {
            "type": "string"
          },
          "source_group_id": {
            "type": "string"
          },
          "group_label": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "source_columns": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "scoring": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "win": {
                    "type": "integer"
                  },
                  "draw": {
                    "type": "integer"
                  },
                  "loss": {
                    "type": "integer"
                  }
                },
                "required": [
                  "win",
                  "draw",
                  "loss"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "rows": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "position": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "source_team_id": {
                  "type": "string"
                },
                "team_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "team_label": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "points": {
                  "oneOf": [
                    {
                      "type": "integer"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "goal_difference": {
                  "oneOf": [
                    {
                      "type": "integer"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "goals_for": {
                  "oneOf": [
                    {
                      "type": "integer"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "goals_against": {
                  "oneOf": [
                    {
                      "type": "integer"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "played": {
                  "oneOf": [
                    {
                      "type": "integer",
                      "minimum": 0
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "won": {
                  "oneOf": [
                    {
                      "type": "integer",
                      "minimum": 0
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "drawn": {
                  "oneOf": [
                    {
                      "type": "integer",
                      "minimum": 0
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "lost": {
                  "oneOf": [
                    {
                      "type": "integer",
                      "minimum": 0
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "source_point_adjustment": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "integer"
                        },
                        "has_source_note": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "value",
                        "has_source_note"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "position",
                "source_team_id",
                "team_id",
                "team_label",
                "points",
                "goal_difference",
                "goals_for",
                "goals_against",
                "played",
                "won",
                "drawn",
                "lost",
                "source_point_adjustment"
              ]
            }
          },
          "source": {
            "type": "object",
            "properties": {
              "surface": {
                "type": "string",
                "enum": [
                  "public_page",
                  "private_back_office"
                ]
              },
              "captured_at": {
                "type": "string",
                "format": "date-time"
              },
              "proof": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "url": {
                        "type": "string",
                        "format": "uri",
                        "pattern": "^https?:\\/\\/"
                      },
                      "sha256": {
                        "type": "string",
                        "pattern": "^[0-9a-f]{64}$"
                      },
                      "captured_at": {
                        "type": "string",
                        "format": "date-time"
                      }
                    },
                    "required": [
                      "url",
                      "sha256",
                      "captured_at"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "surface",
              "captured_at",
              "proof"
            ]
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "organization_id": {
            "type": "string",
            "format": "uuid"
          },
          "publication": {
            "type": "string",
            "enum": [
              "published",
              "withheld"
            ]
          },
          "withheld_reason": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "name_not_captured",
                  "youth_competition",
                  "source_public_proof_missing",
                  "operator_decision",
                  "erasure_request"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "publication_note": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "publicly_readable": {
            "type": "boolean"
          },
          "source_page_urls": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uri",
              "pattern": "^https?:\\/\\/"
            }
          },
          "source_revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "version": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "etag": {
            "type": "string"
          },
          "admin_rows": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "position": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "source_team_id": {
                  "type": "string"
                },
                "team_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "team_label": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "source_point_adjustment": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "integer"
                        },
                        "note": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "value",
                        "note"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "position",
                "source_team_id",
                "team_id",
                "team_label",
                "source_point_adjustment"
              ]
            }
          }
        },
        "required": [
          "id",
          "source_system",
          "tournament_id",
          "phase_id",
          "group_id",
          "source_tournament_id",
          "source_group_id",
          "group_label",
          "source_columns",
          "scoring",
          "rows",
          "source",
          "tenant_id",
          "organization_id",
          "publication",
          "withheld_reason",
          "publication_note",
          "publicly_readable",
          "source_page_urls",
          "source_revision",
          "version",
          "etag",
          "admin_rows"
        ]
      },
      "AdminArchiveStandingsList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "source_system": {
                  "type": "string",
                  "minLength": 2,
                  "maxLength": 64,
                  "pattern": "^[a-z0-9](?:[a-z0-9._-]*[a-z0-9])?$"
                },
                "tournament_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "phase_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "group_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "source_tournament_id": {
                  "type": "string"
                },
                "source_group_id": {
                  "type": "string"
                },
                "group_label": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "source_columns": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "scoring": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "win": {
                          "type": "integer"
                        },
                        "draw": {
                          "type": "integer"
                        },
                        "loss": {
                          "type": "integer"
                        }
                      },
                      "required": [
                        "win",
                        "draw",
                        "loss"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "rows": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "position": {
                        "type": "integer",
                        "exclusiveMinimum": 0
                      },
                      "source_team_id": {
                        "type": "string"
                      },
                      "team_id": {
                        "oneOf": [
                          {
                            "type": "string",
                            "format": "uuid"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "team_label": {
                        "oneOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "points": {
                        "oneOf": [
                          {
                            "type": "integer"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "goal_difference": {
                        "oneOf": [
                          {
                            "type": "integer"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "goals_for": {
                        "oneOf": [
                          {
                            "type": "integer"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "goals_against": {
                        "oneOf": [
                          {
                            "type": "integer"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "played": {
                        "oneOf": [
                          {
                            "type": "integer",
                            "minimum": 0
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "won": {
                        "oneOf": [
                          {
                            "type": "integer",
                            "minimum": 0
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "drawn": {
                        "oneOf": [
                          {
                            "type": "integer",
                            "minimum": 0
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "lost": {
                        "oneOf": [
                          {
                            "type": "integer",
                            "minimum": 0
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "source_point_adjustment": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "value": {
                                "type": "integer"
                              },
                              "has_source_note": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "value",
                              "has_source_note"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "position",
                      "source_team_id",
                      "team_id",
                      "team_label",
                      "points",
                      "goal_difference",
                      "goals_for",
                      "goals_against",
                      "played",
                      "won",
                      "drawn",
                      "lost",
                      "source_point_adjustment"
                    ]
                  }
                },
                "source": {
                  "type": "object",
                  "properties": {
                    "surface": {
                      "type": "string",
                      "enum": [
                        "public_page",
                        "private_back_office"
                      ]
                    },
                    "captured_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "proof": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "url": {
                              "type": "string",
                              "format": "uri",
                              "pattern": "^https?:\\/\\/"
                            },
                            "sha256": {
                              "type": "string",
                              "pattern": "^[0-9a-f]{64}$"
                            },
                            "captured_at": {
                              "type": "string",
                              "format": "date-time"
                            }
                          },
                          "required": [
                            "url",
                            "sha256",
                            "captured_at"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "surface",
                    "captured_at",
                    "proof"
                  ]
                },
                "tenant_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "organization_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "publication": {
                  "type": "string",
                  "enum": [
                    "published",
                    "withheld"
                  ]
                },
                "withheld_reason": {
                  "oneOf": [
                    {
                      "type": "string",
                      "enum": [
                        "name_not_captured",
                        "youth_competition",
                        "source_public_proof_missing",
                        "operator_decision",
                        "erasure_request"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "publication_note": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "publicly_readable": {
                  "type": "boolean"
                },
                "source_page_urls": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uri",
                    "pattern": "^https?:\\/\\/"
                  }
                },
                "source_revision": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "version": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "etag": {
                  "type": "string"
                },
                "admin_rows": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "position": {
                        "type": "integer",
                        "exclusiveMinimum": 0
                      },
                      "source_team_id": {
                        "type": "string"
                      },
                      "team_id": {
                        "oneOf": [
                          {
                            "type": "string",
                            "format": "uuid"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "team_label": {
                        "oneOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "source_point_adjustment": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "value": {
                                "type": "integer"
                              },
                              "note": {
                                "oneOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "value",
                              "note"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "position",
                      "source_team_id",
                      "team_id",
                      "team_label",
                      "source_point_adjustment"
                    ]
                  }
                }
              },
              "required": [
                "id",
                "source_system",
                "tournament_id",
                "phase_id",
                "group_id",
                "source_tournament_id",
                "source_group_id",
                "group_label",
                "source_columns",
                "scoring",
                "rows",
                "source",
                "tenant_id",
                "organization_id",
                "publication",
                "withheld_reason",
                "publication_note",
                "publicly_readable",
                "source_page_urls",
                "source_revision",
                "version",
                "etag",
                "admin_rows"
              ]
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "offset": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "items",
          "total",
          "limit",
          "offset"
        ]
      },
      "AdminArchiveStandingsImportRequest": {
        "type": "object",
        "properties": {
          "organization_id": {
            "type": "string",
            "format": "uuid"
          },
          "source_system": {
            "type": "string",
            "minLength": 2,
            "maxLength": 64,
            "pattern": "^[a-z0-9](?:[a-z0-9._-]*[a-z0-9])?$"
          },
          "source_surface": {
            "type": "string",
            "enum": [
              "public_page",
              "private_back_office"
            ]
          },
          "captured_at": {
            "type": "string",
            "format": "date-time"
          },
          "initial_publication": {
            "type": "string",
            "enum": [
              "withheld",
              "published"
            ],
            "default": "withheld"
          },
          "snapshots": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "source_tournament_id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64
                },
                "source_group_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "source_table_index": {
                  "type": "integer",
                  "minimum": 0,
                  "default": 0
                },
                "group_label": {
                  "oneOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "tournament_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "phase_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "group_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "source_columns": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "points",
                      "played",
                      "won",
                      "drawn",
                      "lost",
                      "goals_for",
                      "goals_against",
                      "goal_difference"
                    ]
                  },
                  "minItems": 1,
                  "maxItems": 8
                },
                "source_column_labels": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 32
                  },
                  "maxItems": 16,
                  "default": []
                },
                "group_binding": {
                  "type": "string",
                  "enum": [
                    "select_option_value",
                    "single_table_cardinality",
                    "per_group_read",
                    "unbound"
                  ]
                },
                "scoring": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "win": {
                          "type": "integer"
                        },
                        "draw": {
                          "type": "integer"
                        },
                        "loss": {
                          "type": "integer"
                        }
                      },
                      "required": [
                        "win",
                        "draw",
                        "loss"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "rows": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "position": {
                        "type": "integer",
                        "exclusiveMinimum": 0
                      },
                      "source_team_id": {
                        "oneOf": [
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 64
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "default": null
                      },
                      "source_team_badge_file": {
                        "oneOf": [
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "default": null
                      },
                      "team_id": {
                        "oneOf": [
                          {
                            "type": "string",
                            "format": "uuid"
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "default": null
                      },
                      "team_label": {
                        "oneOf": [
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "default": null
                      },
                      "points": {
                        "oneOf": [
                          {
                            "type": "integer"
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "default": null
                      },
                      "goal_difference": {
                        "oneOf": [
                          {
                            "type": "integer"
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "default": null
                      },
                      "goals_for": {
                        "oneOf": [
                          {
                            "type": "integer"
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "default": null
                      },
                      "goals_against": {
                        "oneOf": [
                          {
                            "type": "integer"
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "default": null
                      },
                      "played": {
                        "oneOf": [
                          {
                            "type": "integer",
                            "minimum": 0
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "default": null
                      },
                      "won": {
                        "oneOf": [
                          {
                            "type": "integer",
                            "minimum": 0
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "default": null
                      },
                      "drawn": {
                        "oneOf": [
                          {
                            "type": "integer",
                            "minimum": 0
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "default": null
                      },
                      "lost": {
                        "oneOf": [
                          {
                            "type": "integer",
                            "minimum": 0
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "default": null
                      },
                      "source_point_adjustment": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "value": {
                                "type": "integer"
                              },
                              "note": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 500
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "default": null
                              }
                            },
                            "required": [
                              "value"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "default": null
                      }
                    },
                    "required": [
                      "position"
                    ]
                  },
                  "maxItems": 64
                },
                "source_page_urls": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uri",
                    "pattern": "^https?:\\/\\/"
                  },
                  "maxItems": 8,
                  "default": []
                },
                "source_public_proof": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "url": {
                          "type": "string",
                          "format": "uri",
                          "pattern": "^https?:\\/\\/"
                        },
                        "sha256": {
                          "type": "string",
                          "pattern": "^[0-9a-f]{64}$"
                        },
                        "captured_at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "url",
                        "sha256",
                        "captured_at"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "expected_source_revision": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "required": [
                "source_tournament_id",
                "source_columns",
                "group_binding",
                "rows"
              ]
            },
            "minItems": 1,
            "maxItems": 100
          }
        },
        "required": [
          "organization_id",
          "source_system",
          "source_surface",
          "captured_at",
          "snapshots"
        ]
      },
      "AdminArchiveStandingsImportResponse": {
        "type": "object",
        "properties": {
          "organization_id": {
            "type": "string",
            "format": "uuid"
          },
          "source_system": {
            "type": "string",
            "minLength": 2,
            "maxLength": 64,
            "pattern": "^[a-z0-9](?:[a-z0-9._-]*[a-z0-9])?$"
          },
          "source_surface": {
            "type": "string",
            "enum": [
              "public_page",
              "private_back_office"
            ]
          },
          "captured_at": {
            "type": "string",
            "format": "date-time"
          },
          "received": {
            "type": "integer",
            "minimum": 0
          },
          "created": {
            "type": "integer",
            "minimum": 0
          },
          "updated": {
            "type": "integer",
            "minimum": 0
          },
          "unchanged": {
            "type": "integer",
            "minimum": 0
          },
          "stale": {
            "type": "integer",
            "minimum": 0
          },
          "publication_preserved": {
            "type": "integer",
            "minimum": 0
          },
          "publishable": {
            "type": "integer",
            "minimum": 0
          },
          "published_on_create": {
            "type": "integer",
            "minimum": 0
          },
          "initial_publication_refused": {
            "type": "integer",
            "minimum": 0
          },
          "withheld": {
            "type": "integer",
            "minimum": 0
          },
          "with_destination_refs": {
            "type": "integer",
            "minimum": 0
          },
          "without_destination_refs": {
            "type": "integer",
            "minimum": 0
          },
          "conflicted": {
            "type": "integer",
            "minimum": 0,
            "default": 0
          }
        },
        "required": [
          "organization_id",
          "source_system",
          "source_surface",
          "captured_at",
          "received",
          "created",
          "updated",
          "unchanged",
          "stale",
          "publication_preserved",
          "publishable",
          "published_on_create",
          "initial_publication_refused",
          "withheld",
          "with_destination_refs",
          "without_destination_refs"
        ]
      },
      "AdminArchivePublicationRequest": {
        "type": "object",
        "properties": {
          "publication": {
            "type": "string",
            "enum": [
              "published",
              "withheld"
            ]
          },
          "withheld_reason": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "name_not_captured",
                  "youth_competition",
                  "source_public_proof_missing",
                  "operator_decision",
                  "erasure_request"
                ]
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "note": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "expected_etag": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "publication"
        ]
      },
      "AdminArchiveBulkPublicationRequest": {
        "type": "object",
        "properties": {
          "organization_id": {
            "type": "string",
            "format": "uuid"
          },
          "scope": {
            "type": "object",
            "properties": {
              "tournament_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null
              },
              "team_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null
              },
              "source_tournament_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null
              },
              "source_team_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null
              }
            },
            "required": []
          },
          "publication": {
            "type": "string",
            "enum": [
              "published",
              "withheld"
            ]
          },
          "withheld_reason": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "name_not_captured",
                  "youth_competition",
                  "source_public_proof_missing",
                  "operator_decision",
                  "erasure_request"
                ]
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "note": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "only_undecided": {
            "type": "boolean",
            "default": true
          },
          "expected_rows": {
            "oneOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "max_rows": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 1000,
            "default": 1000
          }
        },
        "required": [
          "organization_id",
          "scope",
          "publication"
        ]
      },
      "AdminArchiveBulkPublicationResponse": {
        "type": "object",
        "properties": {
          "organization_id": {
            "type": "string",
            "format": "uuid"
          },
          "publication": {
            "type": "string",
            "enum": [
              "published",
              "withheld"
            ]
          },
          "matched": {
            "type": "integer",
            "minimum": 0
          },
          "changed": {
            "type": "integer",
            "minimum": 0
          },
          "unchanged": {
            "type": "integer",
            "minimum": 0
          },
          "skipped_operator_decided": {
            "type": "integer",
            "minimum": 0
          },
          "refused_without_name": {
            "type": "integer",
            "minimum": 0
          },
          "refused_without_public_proof": {
            "type": "integer",
            "minimum": 0
          },
          "truncated": {
            "type": "boolean"
          },
          "remaining": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "organization_id",
          "publication",
          "matched",
          "changed",
          "unchanged",
          "skipped_operator_decided",
          "refused_without_name",
          "refused_without_public_proof",
          "truncated",
          "remaining"
        ]
      },
      "PublicArchiveRegistration": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "source_system": {
            "type": "string",
            "minLength": 2,
            "maxLength": 64,
            "pattern": "^[a-z0-9](?:[a-z0-9._-]*[a-z0-9])?$"
          },
          "source_registration_id": {
            "type": "string"
          },
          "display_name": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "source_role_label": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "person_kind": {
            "type": "string",
            "enum": [
              "player",
              "staff",
              "unknown"
            ]
          },
          "source_role": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "GK",
                  "DEF",
                  "MID",
                  "FWD"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "staff_role": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "manager",
                  "coach",
                  "external_officer"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "public_profile_url": {
            "oneOf": [
              {
                "type": "string",
                "format": "uri",
                "pattern": "^https?:\\/\\/"
              },
              {
                "type": "null"
              }
            ]
          },
          "tournament_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "team_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "source_tournament_id": {
            "type": "string"
          },
          "source_team_id": {
            "type": "string"
          },
          "source_group_id": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "source_group_team_id": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "source_season_label": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "membership_basis": {
            "type": "string",
            "enum": [
              "roster",
              "roster_only",
              "lineup_only"
            ]
          },
          "appearances": {
            "type": "integer",
            "minimum": 0
          },
          "statistic_label_counts": {
            "type": "object",
            "additionalProperties": true
          },
          "statistics_basis": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "public_match_page_icons"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "source": {
            "type": "object",
            "properties": {
              "surface": {
                "type": "string",
                "enum": [
                  "public_page",
                  "private_back_office"
                ]
              },
              "captured_at": {
                "type": "string",
                "format": "date-time"
              },
              "proof": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "url": {
                        "type": "string",
                        "format": "uri",
                        "pattern": "^https?:\\/\\/"
                      },
                      "sha256": {
                        "type": "string",
                        "pattern": "^[0-9a-f]{64}$"
                      },
                      "captured_at": {
                        "type": "string",
                        "format": "date-time"
                      }
                    },
                    "required": [
                      "url",
                      "sha256",
                      "captured_at"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "surface",
              "captured_at",
              "proof"
            ]
          }
        },
        "required": [
          "id",
          "source_system",
          "source_registration_id",
          "display_name",
          "source_role_label",
          "person_kind",
          "source_role",
          "staff_role",
          "public_profile_url",
          "tournament_id",
          "team_id",
          "source_tournament_id",
          "source_team_id",
          "source_group_id",
          "source_group_team_id",
          "source_season_label",
          "membership_basis",
          "appearances",
          "statistic_label_counts",
          "statistics_basis",
          "source"
        ]
      },
      "PublicArchiveRegistrationList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "source_system": {
                  "type": "string",
                  "minLength": 2,
                  "maxLength": 64,
                  "pattern": "^[a-z0-9](?:[a-z0-9._-]*[a-z0-9])?$"
                },
                "source_registration_id": {
                  "type": "string"
                },
                "display_name": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "source_role_label": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "person_kind": {
                  "type": "string",
                  "enum": [
                    "player",
                    "staff",
                    "unknown"
                  ]
                },
                "source_role": {
                  "oneOf": [
                    {
                      "type": "string",
                      "enum": [
                        "GK",
                        "DEF",
                        "MID",
                        "FWD"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "staff_role": {
                  "oneOf": [
                    {
                      "type": "string",
                      "enum": [
                        "manager",
                        "coach",
                        "external_officer"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "public_profile_url": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uri",
                      "pattern": "^https?:\\/\\/"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "tournament_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "team_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "source_tournament_id": {
                  "type": "string"
                },
                "source_team_id": {
                  "type": "string"
                },
                "source_group_id": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "source_group_team_id": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "source_season_label": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "membership_basis": {
                  "type": "string",
                  "enum": [
                    "roster",
                    "roster_only",
                    "lineup_only"
                  ]
                },
                "appearances": {
                  "type": "integer",
                  "minimum": 0
                },
                "statistic_label_counts": {
                  "type": "object",
                  "additionalProperties": true
                },
                "statistics_basis": {
                  "oneOf": [
                    {
                      "type": "string",
                      "enum": [
                        "public_match_page_icons"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "source": {
                  "type": "object",
                  "properties": {
                    "surface": {
                      "type": "string",
                      "enum": [
                        "public_page",
                        "private_back_office"
                      ]
                    },
                    "captured_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "proof": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "url": {
                              "type": "string",
                              "format": "uri",
                              "pattern": "^https?:\\/\\/"
                            },
                            "sha256": {
                              "type": "string",
                              "pattern": "^[0-9a-f]{64}$"
                            },
                            "captured_at": {
                              "type": "string",
                              "format": "date-time"
                            }
                          },
                          "required": [
                            "url",
                            "sha256",
                            "captured_at"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "surface",
                    "captured_at",
                    "proof"
                  ]
                }
              },
              "required": [
                "id",
                "source_system",
                "source_registration_id",
                "display_name",
                "source_role_label",
                "person_kind",
                "source_role",
                "staff_role",
                "public_profile_url",
                "tournament_id",
                "team_id",
                "source_tournament_id",
                "source_team_id",
                "source_group_id",
                "source_group_team_id",
                "source_season_label",
                "membership_basis",
                "appearances",
                "statistic_label_counts",
                "statistics_basis",
                "source"
              ]
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "offset": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "items",
          "total",
          "limit",
          "offset"
        ]
      },
      "PublicArchiveStandingsTable": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "source_system": {
            "type": "string",
            "minLength": 2,
            "maxLength": 64,
            "pattern": "^[a-z0-9](?:[a-z0-9._-]*[a-z0-9])?$"
          },
          "tournament_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "phase_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "group_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "source_tournament_id": {
            "type": "string"
          },
          "source_group_id": {
            "type": "string"
          },
          "group_label": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "source_columns": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "scoring": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "win": {
                    "type": "integer"
                  },
                  "draw": {
                    "type": "integer"
                  },
                  "loss": {
                    "type": "integer"
                  }
                },
                "required": [
                  "win",
                  "draw",
                  "loss"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "rows": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "position": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "source_team_id": {
                  "type": "string"
                },
                "team_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "team_label": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "points": {
                  "oneOf": [
                    {
                      "type": "integer"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "goal_difference": {
                  "oneOf": [
                    {
                      "type": "integer"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "goals_for": {
                  "oneOf": [
                    {
                      "type": "integer"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "goals_against": {
                  "oneOf": [
                    {
                      "type": "integer"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "played": {
                  "oneOf": [
                    {
                      "type": "integer",
                      "minimum": 0
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "won": {
                  "oneOf": [
                    {
                      "type": "integer",
                      "minimum": 0
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "drawn": {
                  "oneOf": [
                    {
                      "type": "integer",
                      "minimum": 0
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "lost": {
                  "oneOf": [
                    {
                      "type": "integer",
                      "minimum": 0
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "source_point_adjustment": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "integer"
                        },
                        "has_source_note": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "value",
                        "has_source_note"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "position",
                "source_team_id",
                "team_id",
                "team_label",
                "points",
                "goal_difference",
                "goals_for",
                "goals_against",
                "played",
                "won",
                "drawn",
                "lost",
                "source_point_adjustment"
              ]
            }
          },
          "source": {
            "type": "object",
            "properties": {
              "surface": {
                "type": "string",
                "enum": [
                  "public_page",
                  "private_back_office"
                ]
              },
              "captured_at": {
                "type": "string",
                "format": "date-time"
              },
              "proof": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "url": {
                        "type": "string",
                        "format": "uri",
                        "pattern": "^https?:\\/\\/"
                      },
                      "sha256": {
                        "type": "string",
                        "pattern": "^[0-9a-f]{64}$"
                      },
                      "captured_at": {
                        "type": "string",
                        "format": "date-time"
                      }
                    },
                    "required": [
                      "url",
                      "sha256",
                      "captured_at"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "surface",
              "captured_at",
              "proof"
            ]
          }
        },
        "required": [
          "id",
          "source_system",
          "tournament_id",
          "phase_id",
          "group_id",
          "source_tournament_id",
          "source_group_id",
          "group_label",
          "source_columns",
          "scoring",
          "rows",
          "source"
        ]
      },
      "PublicArchiveStandingsList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "source_system": {
                  "type": "string",
                  "minLength": 2,
                  "maxLength": 64,
                  "pattern": "^[a-z0-9](?:[a-z0-9._-]*[a-z0-9])?$"
                },
                "tournament_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "phase_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "group_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "source_tournament_id": {
                  "type": "string"
                },
                "source_group_id": {
                  "type": "string"
                },
                "group_label": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "source_columns": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "scoring": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "win": {
                          "type": "integer"
                        },
                        "draw": {
                          "type": "integer"
                        },
                        "loss": {
                          "type": "integer"
                        }
                      },
                      "required": [
                        "win",
                        "draw",
                        "loss"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "rows": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "position": {
                        "type": "integer",
                        "exclusiveMinimum": 0
                      },
                      "source_team_id": {
                        "type": "string"
                      },
                      "team_id": {
                        "oneOf": [
                          {
                            "type": "string",
                            "format": "uuid"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "team_label": {
                        "oneOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "points": {
                        "oneOf": [
                          {
                            "type": "integer"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "goal_difference": {
                        "oneOf": [
                          {
                            "type": "integer"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "goals_for": {
                        "oneOf": [
                          {
                            "type": "integer"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "goals_against": {
                        "oneOf": [
                          {
                            "type": "integer"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "played": {
                        "oneOf": [
                          {
                            "type": "integer",
                            "minimum": 0
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "won": {
                        "oneOf": [
                          {
                            "type": "integer",
                            "minimum": 0
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "drawn": {
                        "oneOf": [
                          {
                            "type": "integer",
                            "minimum": 0
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "lost": {
                        "oneOf": [
                          {
                            "type": "integer",
                            "minimum": 0
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "source_point_adjustment": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "value": {
                                "type": "integer"
                              },
                              "has_source_note": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "value",
                              "has_source_note"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "position",
                      "source_team_id",
                      "team_id",
                      "team_label",
                      "points",
                      "goal_difference",
                      "goals_for",
                      "goals_against",
                      "played",
                      "won",
                      "drawn",
                      "lost",
                      "source_point_adjustment"
                    ]
                  }
                },
                "source": {
                  "type": "object",
                  "properties": {
                    "surface": {
                      "type": "string",
                      "enum": [
                        "public_page",
                        "private_back_office"
                      ]
                    },
                    "captured_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "proof": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "url": {
                              "type": "string",
                              "format": "uri",
                              "pattern": "^https?:\\/\\/"
                            },
                            "sha256": {
                              "type": "string",
                              "pattern": "^[0-9a-f]{64}$"
                            },
                            "captured_at": {
                              "type": "string",
                              "format": "date-time"
                            }
                          },
                          "required": [
                            "url",
                            "sha256",
                            "captured_at"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "surface",
                    "captured_at",
                    "proof"
                  ]
                }
              },
              "required": [
                "id",
                "source_system",
                "tournament_id",
                "phase_id",
                "group_id",
                "source_tournament_id",
                "source_group_id",
                "group_label",
                "source_columns",
                "scoring",
                "rows",
                "source"
              ]
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "AdminHistoricalBracketRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "source_system": {
            "type": "string",
            "minLength": 2,
            "maxLength": 64,
            "pattern": "^[a-z0-9](?:[a-z0-9._-]*[a-z0-9])?$"
          },
          "source_group_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "source_tournament_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "source_group_label": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              {
                "type": "null"
              }
            ]
          },
          "tournament_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "phase_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "group_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "topology": {
            "type": "string",
            "enum": [
              "declared_edges",
              "rounds_only",
              "no_bracket_declared"
            ]
          },
          "rounds": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "round_index": {
                  "type": "integer",
                  "minimum": 0
                },
                "source_round_label": {
                  "oneOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "declared_full_round_capacity": {
                  "oneOf": [
                    {
                      "type": "integer",
                      "exclusiveMinimum": 0
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "matches": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "reference": {
                        "type": "object",
                        "properties": {
                          "source_match_id": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 64
                          },
                          "match_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          },
                          "state": {
                            "type": "string",
                            "enum": [
                              "resolved",
                              "unavailable"
                            ]
                          },
                          "unavailable_reason": {
                            "oneOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "not_in_prepared_archive",
                                  "not_resolved_by_importer"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          }
                        },
                        "required": [
                          "source_match_id",
                          "state"
                        ]
                      },
                      "visual_order_in_round": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "side_a": {
                        "type": "object",
                        "properties": {
                          "slot": {
                            "type": "string",
                            "enum": [
                              "a",
                              "b"
                            ]
                          },
                          "team": {
                            "type": "object",
                            "properties": {
                              "source_group_team_id": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 64
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "default": null
                              },
                              "team_id": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "default": null
                              },
                              "state": {
                                "type": "string",
                                "enum": [
                                  "resolved",
                                  "unavailable",
                                  "source_slot_empty"
                                ]
                              },
                              "unavailable_reason": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "enum": [
                                      "not_in_prepared_archive",
                                      "not_resolved_by_importer"
                                    ]
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "default": null
                              }
                            },
                            "required": [
                              "state"
                            ]
                          },
                          "declared_entry_slot": {
                            "type": "boolean",
                            "default": false
                          },
                          "declared_score_text": {
                            "oneOf": [
                              {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 8
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          }
                        },
                        "required": [
                          "slot",
                          "team"
                        ]
                      },
                      "side_b": {
                        "type": "object",
                        "properties": {
                          "slot": {
                            "type": "string",
                            "enum": [
                              "a",
                              "b"
                            ]
                          },
                          "team": {
                            "type": "object",
                            "properties": {
                              "source_group_team_id": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 64
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "default": null
                              },
                              "team_id": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "default": null
                              },
                              "state": {
                                "type": "string",
                                "enum": [
                                  "resolved",
                                  "unavailable",
                                  "source_slot_empty"
                                ]
                              },
                              "unavailable_reason": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "enum": [
                                      "not_in_prepared_archive",
                                      "not_resolved_by_importer"
                                    ]
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "default": null
                              }
                            },
                            "required": [
                              "state"
                            ]
                          },
                          "declared_entry_slot": {
                            "type": "boolean",
                            "default": false
                          },
                          "declared_score_text": {
                            "oneOf": [
                              {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 8
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          }
                        },
                        "required": [
                          "slot",
                          "team"
                        ]
                      },
                      "declared_two_leg_tie": {
                        "type": "boolean",
                        "default": false
                      },
                      "legs": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "reference": {
                              "type": "object",
                              "properties": {
                                "source_match_id": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 64
                                },
                                "match_id": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "default": null
                                },
                                "state": {
                                  "type": "string",
                                  "enum": [
                                    "resolved",
                                    "unavailable"
                                  ]
                                },
                                "unavailable_reason": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "enum": [
                                        "not_in_prepared_archive",
                                        "not_resolved_by_importer"
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "default": null
                                }
                              },
                              "required": [
                                "source_match_id",
                                "state"
                              ]
                            },
                            "side_a_score_element": {
                              "type": "string",
                              "enum": [
                                "a",
                                "b"
                              ]
                            },
                            "side_b_score_element": {
                              "type": "string",
                              "enum": [
                                "a",
                                "b"
                              ]
                            }
                          },
                          "required": [
                            "reference",
                            "side_a_score_element",
                            "side_b_score_element"
                          ]
                        },
                        "minItems": 1,
                        "maxItems": 4
                      }
                    },
                    "required": [
                      "reference",
                      "visual_order_in_round",
                      "side_a",
                      "side_b",
                      "legs"
                    ]
                  },
                  "maxItems": 64
                }
              },
              "required": [
                "round_index",
                "matches"
              ]
            },
            "maxItems": 12
          },
          "edges": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "successor": {
                  "type": "object",
                  "properties": {
                    "source_match_id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64
                    },
                    "match_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "default": null
                    },
                    "state": {
                      "type": "string",
                      "enum": [
                        "resolved",
                        "unavailable"
                      ]
                    },
                    "unavailable_reason": {
                      "oneOf": [
                        {
                          "type": "string",
                          "enum": [
                            "not_in_prepared_archive",
                            "not_resolved_by_importer"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "default": null
                    }
                  },
                  "required": [
                    "source_match_id",
                    "state"
                  ]
                },
                "successor_slot": {
                  "type": "string",
                  "enum": [
                    "a",
                    "b"
                  ]
                },
                "predecessor": {
                  "type": "object",
                  "properties": {
                    "source_match_id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64
                    },
                    "match_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "default": null
                    },
                    "state": {
                      "type": "string",
                      "enum": [
                        "resolved",
                        "unavailable"
                      ]
                    },
                    "unavailable_reason": {
                      "oneOf": [
                        {
                          "type": "string",
                          "enum": [
                            "not_in_prepared_archive",
                            "not_resolved_by_importer"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "default": null
                    }
                  },
                  "required": [
                    "source_match_id",
                    "state"
                  ]
                },
                "evidence": {
                  "type": "string",
                  "enum": [
                    "source_option_list_equals_one_earlier_match"
                  ]
                }
              },
              "required": [
                "successor",
                "successor_slot",
                "predecessor",
                "evidence"
              ]
            },
            "maxItems": 256
          },
          "champion_declarations": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "source_final_index": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "winner": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "source_group_team_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 64
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "default": null
                        },
                        "team_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "default": null
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "resolved",
                            "unavailable",
                            "source_slot_empty"
                          ]
                        },
                        "unavailable_reason": {
                          "oneOf": [
                            {
                              "type": "string",
                              "enum": [
                                "not_in_prepared_archive",
                                "not_resolved_by_importer"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "default": null
                        }
                      },
                      "required": [
                        "state"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "runner_up": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "source_group_team_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 64
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "default": null
                        },
                        "team_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "default": null
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "resolved",
                            "unavailable",
                            "source_slot_empty"
                          ]
                        },
                        "unavailable_reason": {
                          "oneOf": [
                            {
                              "type": "string",
                              "enum": [
                                "not_in_prepared_archive",
                                "not_resolved_by_importer"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "default": null
                        }
                      },
                      "required": [
                        "state"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                }
              },
              "required": [
                "source_final_index"
              ]
            },
            "maxItems": 8
          },
          "slot_totals": {
            "type": "object",
            "properties": {
              "slots": {
                "type": "integer",
                "minimum": 0
              },
              "entry_round_slots": {
                "type": "integer",
                "minimum": 0
              },
              "declared_edges": {
                "type": "integer",
                "minimum": 0
              },
              "not_declared": {
                "type": "integer",
                "minimum": 0
              },
              "single_option_slots": {
                "type": "integer",
                "minimum": 0,
                "default": 0
              }
            },
            "required": [
              "slots",
              "entry_round_slots",
              "declared_edges",
              "not_declared"
            ]
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "organization_id": {
            "type": "string",
            "format": "uuid"
          },
          "source_capture": {
            "type": "object",
            "properties": {
              "url": {
                "type": "string",
                "format": "uri",
                "pattern": "^https?:\\/\\/"
              },
              "sha256": {
                "type": "string",
                "pattern": "^[0-9a-f]{64}$"
              },
              "captured_at": {
                "type": "string",
                "format": "date-time"
              },
              "surface": {
                "type": "string",
                "enum": [
                  "private_back_office",
                  "public_page"
                ]
              },
              "authenticated": {
                "type": "boolean"
              },
              "bytes": {
                "oneOf": [
                  {
                    "type": "integer",
                    "minimum": 0
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null
              }
            },
            "required": [
              "url",
              "sha256",
              "captured_at",
              "surface",
              "authenticated"
            ]
          },
          "publication": {
            "type": "string",
            "enum": [
              "published",
              "withheld"
            ]
          },
          "withheld_reason": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "awaiting_operator_decision",
                  "operator_decision",
                  "destination_tournament_unresolved"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "publication_note": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "publication_decided_by_operator": {
            "type": "boolean"
          },
          "publicly_readable": {
            "type": "boolean"
          },
          "captured_at": {
            "type": "string",
            "format": "date-time"
          },
          "source_revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "version": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "etag": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "source_system",
          "source_group_id",
          "source_tournament_id",
          "source_group_label",
          "tournament_id",
          "phase_id",
          "group_id",
          "topology",
          "rounds",
          "edges",
          "champion_declarations",
          "slot_totals",
          "tenant_id",
          "organization_id",
          "source_capture",
          "publication",
          "withheld_reason",
          "publication_note",
          "publication_decided_by_operator",
          "publicly_readable",
          "captured_at",
          "source_revision",
          "version",
          "etag"
        ]
      },
      "AdminHistoricalBracketList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "source_system": {
                  "type": "string",
                  "minLength": 2,
                  "maxLength": 64,
                  "pattern": "^[a-z0-9](?:[a-z0-9._-]*[a-z0-9])?$"
                },
                "source_group_id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64
                },
                "source_tournament_id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64
                },
                "source_group_label": {
                  "oneOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "tournament_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "phase_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "group_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "topology": {
                  "type": "string",
                  "enum": [
                    "declared_edges",
                    "rounds_only",
                    "no_bracket_declared"
                  ]
                },
                "rounds": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "round_index": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "source_round_label": {
                        "oneOf": [
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 64
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "default": null
                      },
                      "declared_full_round_capacity": {
                        "oneOf": [
                          {
                            "type": "integer",
                            "exclusiveMinimum": 0
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "default": null
                      },
                      "matches": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "reference": {
                              "type": "object",
                              "properties": {
                                "source_match_id": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 64
                                },
                                "match_id": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "default": null
                                },
                                "state": {
                                  "type": "string",
                                  "enum": [
                                    "resolved",
                                    "unavailable"
                                  ]
                                },
                                "unavailable_reason": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "enum": [
                                        "not_in_prepared_archive",
                                        "not_resolved_by_importer"
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "default": null
                                }
                              },
                              "required": [
                                "source_match_id",
                                "state"
                              ]
                            },
                            "visual_order_in_round": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "side_a": {
                              "type": "object",
                              "properties": {
                                "slot": {
                                  "type": "string",
                                  "enum": [
                                    "a",
                                    "b"
                                  ]
                                },
                                "team": {
                                  "type": "object",
                                  "properties": {
                                    "source_group_team_id": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 64
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "default": null
                                    },
                                    "team_id": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "format": "uuid"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "default": null
                                    },
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "resolved",
                                        "unavailable",
                                        "source_slot_empty"
                                      ]
                                    },
                                    "unavailable_reason": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "enum": [
                                            "not_in_prepared_archive",
                                            "not_resolved_by_importer"
                                          ]
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "default": null
                                    }
                                  },
                                  "required": [
                                    "state"
                                  ]
                                },
                                "declared_entry_slot": {
                                  "type": "boolean",
                                  "default": false
                                },
                                "declared_score_text": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 8
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "default": null
                                }
                              },
                              "required": [
                                "slot",
                                "team"
                              ]
                            },
                            "side_b": {
                              "type": "object",
                              "properties": {
                                "slot": {
                                  "type": "string",
                                  "enum": [
                                    "a",
                                    "b"
                                  ]
                                },
                                "team": {
                                  "type": "object",
                                  "properties": {
                                    "source_group_team_id": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 64
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "default": null
                                    },
                                    "team_id": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "format": "uuid"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "default": null
                                    },
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "resolved",
                                        "unavailable",
                                        "source_slot_empty"
                                      ]
                                    },
                                    "unavailable_reason": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "enum": [
                                            "not_in_prepared_archive",
                                            "not_resolved_by_importer"
                                          ]
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "default": null
                                    }
                                  },
                                  "required": [
                                    "state"
                                  ]
                                },
                                "declared_entry_slot": {
                                  "type": "boolean",
                                  "default": false
                                },
                                "declared_score_text": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 8
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "default": null
                                }
                              },
                              "required": [
                                "slot",
                                "team"
                              ]
                            },
                            "declared_two_leg_tie": {
                              "type": "boolean",
                              "default": false
                            },
                            "legs": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "reference": {
                                    "type": "object",
                                    "properties": {
                                      "source_match_id": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 64
                                      },
                                      "match_id": {
                                        "oneOf": [
                                          {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "default": null
                                      },
                                      "state": {
                                        "type": "string",
                                        "enum": [
                                          "resolved",
                                          "unavailable"
                                        ]
                                      },
                                      "unavailable_reason": {
                                        "oneOf": [
                                          {
                                            "type": "string",
                                            "enum": [
                                              "not_in_prepared_archive",
                                              "not_resolved_by_importer"
                                            ]
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "default": null
                                      }
                                    },
                                    "required": [
                                      "source_match_id",
                                      "state"
                                    ]
                                  },
                                  "side_a_score_element": {
                                    "type": "string",
                                    "enum": [
                                      "a",
                                      "b"
                                    ]
                                  },
                                  "side_b_score_element": {
                                    "type": "string",
                                    "enum": [
                                      "a",
                                      "b"
                                    ]
                                  }
                                },
                                "required": [
                                  "reference",
                                  "side_a_score_element",
                                  "side_b_score_element"
                                ]
                              },
                              "minItems": 1,
                              "maxItems": 4
                            }
                          },
                          "required": [
                            "reference",
                            "visual_order_in_round",
                            "side_a",
                            "side_b",
                            "legs"
                          ]
                        },
                        "maxItems": 64
                      }
                    },
                    "required": [
                      "round_index",
                      "matches"
                    ]
                  },
                  "maxItems": 12
                },
                "edges": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "successor": {
                        "type": "object",
                        "properties": {
                          "source_match_id": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 64
                          },
                          "match_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          },
                          "state": {
                            "type": "string",
                            "enum": [
                              "resolved",
                              "unavailable"
                            ]
                          },
                          "unavailable_reason": {
                            "oneOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "not_in_prepared_archive",
                                  "not_resolved_by_importer"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          }
                        },
                        "required": [
                          "source_match_id",
                          "state"
                        ]
                      },
                      "successor_slot": {
                        "type": "string",
                        "enum": [
                          "a",
                          "b"
                        ]
                      },
                      "predecessor": {
                        "type": "object",
                        "properties": {
                          "source_match_id": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 64
                          },
                          "match_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          },
                          "state": {
                            "type": "string",
                            "enum": [
                              "resolved",
                              "unavailable"
                            ]
                          },
                          "unavailable_reason": {
                            "oneOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "not_in_prepared_archive",
                                  "not_resolved_by_importer"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          }
                        },
                        "required": [
                          "source_match_id",
                          "state"
                        ]
                      },
                      "evidence": {
                        "type": "string",
                        "enum": [
                          "source_option_list_equals_one_earlier_match"
                        ]
                      }
                    },
                    "required": [
                      "successor",
                      "successor_slot",
                      "predecessor",
                      "evidence"
                    ]
                  },
                  "maxItems": 256
                },
                "champion_declarations": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "source_final_index": {
                        "type": "integer",
                        "exclusiveMinimum": 0
                      },
                      "winner": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "source_group_team_id": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 64
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "default": null
                              },
                              "team_id": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "default": null
                              },
                              "state": {
                                "type": "string",
                                "enum": [
                                  "resolved",
                                  "unavailable",
                                  "source_slot_empty"
                                ]
                              },
                              "unavailable_reason": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "enum": [
                                      "not_in_prepared_archive",
                                      "not_resolved_by_importer"
                                    ]
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "default": null
                              }
                            },
                            "required": [
                              "state"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "default": null
                      },
                      "runner_up": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "source_group_team_id": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 64
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "default": null
                              },
                              "team_id": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "default": null
                              },
                              "state": {
                                "type": "string",
                                "enum": [
                                  "resolved",
                                  "unavailable",
                                  "source_slot_empty"
                                ]
                              },
                              "unavailable_reason": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "enum": [
                                      "not_in_prepared_archive",
                                      "not_resolved_by_importer"
                                    ]
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "default": null
                              }
                            },
                            "required": [
                              "state"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "default": null
                      }
                    },
                    "required": [
                      "source_final_index"
                    ]
                  },
                  "maxItems": 8
                },
                "slot_totals": {
                  "type": "object",
                  "properties": {
                    "slots": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "entry_round_slots": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "declared_edges": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "not_declared": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "single_option_slots": {
                      "type": "integer",
                      "minimum": 0,
                      "default": 0
                    }
                  },
                  "required": [
                    "slots",
                    "entry_round_slots",
                    "declared_edges",
                    "not_declared"
                  ]
                },
                "tenant_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "organization_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "source_capture": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string",
                      "format": "uri",
                      "pattern": "^https?:\\/\\/"
                    },
                    "sha256": {
                      "type": "string",
                      "pattern": "^[0-9a-f]{64}$"
                    },
                    "captured_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "surface": {
                      "type": "string",
                      "enum": [
                        "private_back_office",
                        "public_page"
                      ]
                    },
                    "authenticated": {
                      "type": "boolean"
                    },
                    "bytes": {
                      "oneOf": [
                        {
                          "type": "integer",
                          "minimum": 0
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "default": null
                    }
                  },
                  "required": [
                    "url",
                    "sha256",
                    "captured_at",
                    "surface",
                    "authenticated"
                  ]
                },
                "publication": {
                  "type": "string",
                  "enum": [
                    "published",
                    "withheld"
                  ]
                },
                "withheld_reason": {
                  "oneOf": [
                    {
                      "type": "string",
                      "enum": [
                        "awaiting_operator_decision",
                        "operator_decision",
                        "destination_tournament_unresolved"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "publication_note": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "publication_decided_by_operator": {
                  "type": "boolean"
                },
                "publicly_readable": {
                  "type": "boolean"
                },
                "captured_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "source_revision": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "version": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "etag": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "source_system",
                "source_group_id",
                "source_tournament_id",
                "source_group_label",
                "tournament_id",
                "phase_id",
                "group_id",
                "topology",
                "rounds",
                "edges",
                "champion_declarations",
                "slot_totals",
                "tenant_id",
                "organization_id",
                "source_capture",
                "publication",
                "withheld_reason",
                "publication_note",
                "publication_decided_by_operator",
                "publicly_readable",
                "captured_at",
                "source_revision",
                "version",
                "etag"
              ]
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "offset": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "items",
          "total",
          "limit",
          "offset"
        ]
      },
      "AdminHistoricalBracketImportRequest": {
        "type": "object",
        "properties": {
          "organization_id": {
            "type": "string",
            "format": "uuid"
          },
          "source_system": {
            "type": "string",
            "minLength": 2,
            "maxLength": 64,
            "pattern": "^[a-z0-9](?:[a-z0-9._-]*[a-z0-9])?$"
          },
          "captured_at": {
            "type": "string",
            "format": "date-time"
          },
          "initial_publication": {
            "type": "string",
            "enum": [
              "withheld",
              "published"
            ],
            "default": "withheld"
          },
          "snapshots": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "source_group_id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64
                },
                "source_tournament_id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64
                },
                "source_group_label": {
                  "oneOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "tournament_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "phase_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "group_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "topology": {
                  "type": "string",
                  "enum": [
                    "declared_edges",
                    "rounds_only",
                    "no_bracket_declared"
                  ]
                },
                "rounds": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "round_index": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "source_round_label": {
                        "oneOf": [
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 64
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "default": null
                      },
                      "declared_full_round_capacity": {
                        "oneOf": [
                          {
                            "type": "integer",
                            "exclusiveMinimum": 0
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "default": null
                      },
                      "matches": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "reference": {
                              "type": "object",
                              "properties": {
                                "source_match_id": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 64
                                },
                                "match_id": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "default": null
                                },
                                "state": {
                                  "type": "string",
                                  "enum": [
                                    "resolved",
                                    "unavailable"
                                  ]
                                },
                                "unavailable_reason": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "enum": [
                                        "not_in_prepared_archive",
                                        "not_resolved_by_importer"
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "default": null
                                }
                              },
                              "required": [
                                "source_match_id",
                                "state"
                              ]
                            },
                            "visual_order_in_round": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "side_a": {
                              "type": "object",
                              "properties": {
                                "slot": {
                                  "type": "string",
                                  "enum": [
                                    "a",
                                    "b"
                                  ]
                                },
                                "team": {
                                  "type": "object",
                                  "properties": {
                                    "source_group_team_id": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 64
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "default": null
                                    },
                                    "team_id": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "format": "uuid"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "default": null
                                    },
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "resolved",
                                        "unavailable",
                                        "source_slot_empty"
                                      ]
                                    },
                                    "unavailable_reason": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "enum": [
                                            "not_in_prepared_archive",
                                            "not_resolved_by_importer"
                                          ]
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "default": null
                                    }
                                  },
                                  "required": [
                                    "state"
                                  ]
                                },
                                "declared_entry_slot": {
                                  "type": "boolean",
                                  "default": false
                                },
                                "declared_score_text": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 8
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "default": null
                                }
                              },
                              "required": [
                                "slot",
                                "team"
                              ]
                            },
                            "side_b": {
                              "type": "object",
                              "properties": {
                                "slot": {
                                  "type": "string",
                                  "enum": [
                                    "a",
                                    "b"
                                  ]
                                },
                                "team": {
                                  "type": "object",
                                  "properties": {
                                    "source_group_team_id": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 64
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "default": null
                                    },
                                    "team_id": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "format": "uuid"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "default": null
                                    },
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "resolved",
                                        "unavailable",
                                        "source_slot_empty"
                                      ]
                                    },
                                    "unavailable_reason": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "enum": [
                                            "not_in_prepared_archive",
                                            "not_resolved_by_importer"
                                          ]
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "default": null
                                    }
                                  },
                                  "required": [
                                    "state"
                                  ]
                                },
                                "declared_entry_slot": {
                                  "type": "boolean",
                                  "default": false
                                },
                                "declared_score_text": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 8
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "default": null
                                }
                              },
                              "required": [
                                "slot",
                                "team"
                              ]
                            },
                            "declared_two_leg_tie": {
                              "type": "boolean",
                              "default": false
                            },
                            "legs": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "reference": {
                                    "type": "object",
                                    "properties": {
                                      "source_match_id": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 64
                                      },
                                      "match_id": {
                                        "oneOf": [
                                          {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "default": null
                                      },
                                      "state": {
                                        "type": "string",
                                        "enum": [
                                          "resolved",
                                          "unavailable"
                                        ]
                                      },
                                      "unavailable_reason": {
                                        "oneOf": [
                                          {
                                            "type": "string",
                                            "enum": [
                                              "not_in_prepared_archive",
                                              "not_resolved_by_importer"
                                            ]
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "default": null
                                      }
                                    },
                                    "required": [
                                      "source_match_id",
                                      "state"
                                    ]
                                  },
                                  "side_a_score_element": {
                                    "type": "string",
                                    "enum": [
                                      "a",
                                      "b"
                                    ]
                                  },
                                  "side_b_score_element": {
                                    "type": "string",
                                    "enum": [
                                      "a",
                                      "b"
                                    ]
                                  }
                                },
                                "required": [
                                  "reference",
                                  "side_a_score_element",
                                  "side_b_score_element"
                                ]
                              },
                              "minItems": 1,
                              "maxItems": 4
                            }
                          },
                          "required": [
                            "reference",
                            "visual_order_in_round",
                            "side_a",
                            "side_b",
                            "legs"
                          ]
                        },
                        "maxItems": 64
                      }
                    },
                    "required": [
                      "round_index",
                      "matches"
                    ]
                  },
                  "maxItems": 12,
                  "default": []
                },
                "edges": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "successor": {
                        "type": "object",
                        "properties": {
                          "source_match_id": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 64
                          },
                          "match_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          },
                          "state": {
                            "type": "string",
                            "enum": [
                              "resolved",
                              "unavailable"
                            ]
                          },
                          "unavailable_reason": {
                            "oneOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "not_in_prepared_archive",
                                  "not_resolved_by_importer"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          }
                        },
                        "required": [
                          "source_match_id",
                          "state"
                        ]
                      },
                      "successor_slot": {
                        "type": "string",
                        "enum": [
                          "a",
                          "b"
                        ]
                      },
                      "predecessor": {
                        "type": "object",
                        "properties": {
                          "source_match_id": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 64
                          },
                          "match_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          },
                          "state": {
                            "type": "string",
                            "enum": [
                              "resolved",
                              "unavailable"
                            ]
                          },
                          "unavailable_reason": {
                            "oneOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "not_in_prepared_archive",
                                  "not_resolved_by_importer"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          }
                        },
                        "required": [
                          "source_match_id",
                          "state"
                        ]
                      },
                      "evidence": {
                        "type": "string",
                        "enum": [
                          "source_option_list_equals_one_earlier_match"
                        ]
                      }
                    },
                    "required": [
                      "successor",
                      "successor_slot",
                      "predecessor",
                      "evidence"
                    ]
                  },
                  "maxItems": 256,
                  "default": []
                },
                "champion_declarations": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "source_final_index": {
                        "type": "integer",
                        "exclusiveMinimum": 0
                      },
                      "winner": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "source_group_team_id": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 64
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "default": null
                              },
                              "team_id": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "default": null
                              },
                              "state": {
                                "type": "string",
                                "enum": [
                                  "resolved",
                                  "unavailable",
                                  "source_slot_empty"
                                ]
                              },
                              "unavailable_reason": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "enum": [
                                      "not_in_prepared_archive",
                                      "not_resolved_by_importer"
                                    ]
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "default": null
                              }
                            },
                            "required": [
                              "state"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "default": null
                      },
                      "runner_up": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "source_group_team_id": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 64
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "default": null
                              },
                              "team_id": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "default": null
                              },
                              "state": {
                                "type": "string",
                                "enum": [
                                  "resolved",
                                  "unavailable",
                                  "source_slot_empty"
                                ]
                              },
                              "unavailable_reason": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "enum": [
                                      "not_in_prepared_archive",
                                      "not_resolved_by_importer"
                                    ]
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "default": null
                              }
                            },
                            "required": [
                              "state"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "default": null
                      }
                    },
                    "required": [
                      "source_final_index"
                    ]
                  },
                  "maxItems": 8,
                  "default": []
                },
                "slot_totals": {
                  "type": "object",
                  "properties": {
                    "slots": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "entry_round_slots": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "declared_edges": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "not_declared": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "single_option_slots": {
                      "type": "integer",
                      "minimum": 0,
                      "default": 0
                    }
                  },
                  "required": [
                    "slots",
                    "entry_round_slots",
                    "declared_edges",
                    "not_declared"
                  ]
                },
                "source_capture": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string",
                      "format": "uri",
                      "pattern": "^https?:\\/\\/"
                    },
                    "sha256": {
                      "type": "string",
                      "pattern": "^[0-9a-f]{64}$"
                    },
                    "captured_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "surface": {
                      "type": "string",
                      "enum": [
                        "private_back_office",
                        "public_page"
                      ]
                    },
                    "authenticated": {
                      "type": "boolean"
                    },
                    "bytes": {
                      "oneOf": [
                        {
                          "type": "integer",
                          "minimum": 0
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "default": null
                    }
                  },
                  "required": [
                    "url",
                    "sha256",
                    "captured_at",
                    "surface",
                    "authenticated"
                  ]
                },
                "expected_source_revision": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "required": [
                "source_group_id",
                "source_tournament_id",
                "topology",
                "slot_totals",
                "source_capture"
              ]
            },
            "minItems": 1,
            "maxItems": 25
          }
        },
        "required": [
          "organization_id",
          "source_system",
          "captured_at",
          "snapshots"
        ]
      },
      "AdminHistoricalBracketImportResponse": {
        "type": "object",
        "properties": {
          "organization_id": {
            "type": "string",
            "format": "uuid"
          },
          "source_system": {
            "type": "string",
            "minLength": 2,
            "maxLength": 64,
            "pattern": "^[a-z0-9](?:[a-z0-9._-]*[a-z0-9])?$"
          },
          "captured_at": {
            "type": "string",
            "format": "date-time"
          },
          "received": {
            "type": "integer",
            "minimum": 0
          },
          "created": {
            "type": "integer",
            "minimum": 0
          },
          "updated": {
            "type": "integer",
            "minimum": 0
          },
          "unchanged": {
            "type": "integer",
            "minimum": 0
          },
          "stale": {
            "type": "integer",
            "minimum": 0
          },
          "conflicted": {
            "type": "integer",
            "minimum": 0
          },
          "publication_preserved": {
            "type": "integer",
            "minimum": 0
          },
          "published_on_create": {
            "type": "integer",
            "minimum": 0
          },
          "initial_publication_refused": {
            "type": "integer",
            "minimum": 0
          },
          "withheld": {
            "type": "integer",
            "minimum": 0
          },
          "with_destination_refs": {
            "type": "integer",
            "minimum": 0
          },
          "without_destination_refs": {
            "type": "integer",
            "minimum": 0
          },
          "matches": {
            "type": "integer",
            "minimum": 0
          },
          "declared_edges": {
            "type": "integer",
            "minimum": 0
          },
          "champion_declarations": {
            "type": "integer",
            "minimum": 0
          },
          "unavailable_match_references": {
            "type": "integer",
            "minimum": 0
          },
          "unavailable_team_references": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "organization_id",
          "source_system",
          "captured_at",
          "received",
          "created",
          "updated",
          "unchanged",
          "stale",
          "conflicted",
          "publication_preserved",
          "published_on_create",
          "initial_publication_refused",
          "withheld",
          "with_destination_refs",
          "without_destination_refs",
          "matches",
          "declared_edges",
          "champion_declarations",
          "unavailable_match_references",
          "unavailable_team_references"
        ]
      },
      "AdminHistoricalBracketPublicationRequest": {
        "type": "object",
        "properties": {
          "publication": {
            "type": "string",
            "enum": [
              "published",
              "withheld"
            ]
          },
          "withheld_reason": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "awaiting_operator_decision",
                  "operator_decision",
                  "destination_tournament_unresolved"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "note": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ]
          },
          "expected_etag": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "publication",
          "withheld_reason",
          "note"
        ]
      },
      "PublicHistoricalBracket": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "source_system": {
            "type": "string",
            "minLength": 2,
            "maxLength": 64,
            "pattern": "^[a-z0-9](?:[a-z0-9._-]*[a-z0-9])?$"
          },
          "source_group_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "source_tournament_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "source_group_label": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              {
                "type": "null"
              }
            ]
          },
          "tournament_id": {
            "type": "string",
            "format": "uuid"
          },
          "phase_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "group_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "topology": {
            "type": "string",
            "enum": [
              "declared_edges",
              "rounds_only",
              "no_bracket_declared"
            ]
          },
          "rounds": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "round_index": {
                  "type": "integer",
                  "minimum": 0
                },
                "source_round_label": {
                  "oneOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "declared_full_round_capacity": {
                  "oneOf": [
                    {
                      "type": "integer",
                      "exclusiveMinimum": 0
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "matches": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "reference": {
                        "type": "object",
                        "properties": {
                          "source_match_id": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 64
                          },
                          "match_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          },
                          "state": {
                            "type": "string",
                            "enum": [
                              "resolved",
                              "unavailable"
                            ]
                          },
                          "unavailable_reason": {
                            "oneOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "not_in_prepared_archive",
                                  "not_resolved_by_importer"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          }
                        },
                        "required": [
                          "source_match_id",
                          "state"
                        ]
                      },
                      "visual_order_in_round": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "side_a": {
                        "type": "object",
                        "properties": {
                          "slot": {
                            "type": "string",
                            "enum": [
                              "a",
                              "b"
                            ]
                          },
                          "team": {
                            "type": "object",
                            "properties": {
                              "source_group_team_id": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 64
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "default": null
                              },
                              "team_id": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "default": null
                              },
                              "state": {
                                "type": "string",
                                "enum": [
                                  "resolved",
                                  "unavailable",
                                  "source_slot_empty"
                                ]
                              },
                              "unavailable_reason": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "enum": [
                                      "not_in_prepared_archive",
                                      "not_resolved_by_importer"
                                    ]
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "default": null
                              }
                            },
                            "required": [
                              "state"
                            ]
                          },
                          "declared_entry_slot": {
                            "type": "boolean",
                            "default": false
                          },
                          "declared_score_text": {
                            "oneOf": [
                              {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 8
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          }
                        },
                        "required": [
                          "slot",
                          "team"
                        ]
                      },
                      "side_b": {
                        "type": "object",
                        "properties": {
                          "slot": {
                            "type": "string",
                            "enum": [
                              "a",
                              "b"
                            ]
                          },
                          "team": {
                            "type": "object",
                            "properties": {
                              "source_group_team_id": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 64
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "default": null
                              },
                              "team_id": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "default": null
                              },
                              "state": {
                                "type": "string",
                                "enum": [
                                  "resolved",
                                  "unavailable",
                                  "source_slot_empty"
                                ]
                              },
                              "unavailable_reason": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "enum": [
                                      "not_in_prepared_archive",
                                      "not_resolved_by_importer"
                                    ]
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "default": null
                              }
                            },
                            "required": [
                              "state"
                            ]
                          },
                          "declared_entry_slot": {
                            "type": "boolean",
                            "default": false
                          },
                          "declared_score_text": {
                            "oneOf": [
                              {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 8
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          }
                        },
                        "required": [
                          "slot",
                          "team"
                        ]
                      },
                      "declared_two_leg_tie": {
                        "type": "boolean",
                        "default": false
                      },
                      "legs": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "reference": {
                              "type": "object",
                              "properties": {
                                "source_match_id": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 64
                                },
                                "match_id": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "default": null
                                },
                                "state": {
                                  "type": "string",
                                  "enum": [
                                    "resolved",
                                    "unavailable"
                                  ]
                                },
                                "unavailable_reason": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "enum": [
                                        "not_in_prepared_archive",
                                        "not_resolved_by_importer"
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "default": null
                                }
                              },
                              "required": [
                                "source_match_id",
                                "state"
                              ]
                            },
                            "side_a_score_element": {
                              "type": "string",
                              "enum": [
                                "a",
                                "b"
                              ]
                            },
                            "side_b_score_element": {
                              "type": "string",
                              "enum": [
                                "a",
                                "b"
                              ]
                            }
                          },
                          "required": [
                            "reference",
                            "side_a_score_element",
                            "side_b_score_element"
                          ]
                        },
                        "minItems": 1,
                        "maxItems": 4
                      }
                    },
                    "required": [
                      "reference",
                      "visual_order_in_round",
                      "side_a",
                      "side_b",
                      "legs"
                    ]
                  },
                  "maxItems": 64
                }
              },
              "required": [
                "round_index",
                "matches"
              ]
            },
            "maxItems": 12
          },
          "edges": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "successor": {
                  "type": "object",
                  "properties": {
                    "source_match_id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64
                    },
                    "match_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "default": null
                    },
                    "state": {
                      "type": "string",
                      "enum": [
                        "resolved",
                        "unavailable"
                      ]
                    },
                    "unavailable_reason": {
                      "oneOf": [
                        {
                          "type": "string",
                          "enum": [
                            "not_in_prepared_archive",
                            "not_resolved_by_importer"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "default": null
                    }
                  },
                  "required": [
                    "source_match_id",
                    "state"
                  ]
                },
                "successor_slot": {
                  "type": "string",
                  "enum": [
                    "a",
                    "b"
                  ]
                },
                "predecessor": {
                  "type": "object",
                  "properties": {
                    "source_match_id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64
                    },
                    "match_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "default": null
                    },
                    "state": {
                      "type": "string",
                      "enum": [
                        "resolved",
                        "unavailable"
                      ]
                    },
                    "unavailable_reason": {
                      "oneOf": [
                        {
                          "type": "string",
                          "enum": [
                            "not_in_prepared_archive",
                            "not_resolved_by_importer"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "default": null
                    }
                  },
                  "required": [
                    "source_match_id",
                    "state"
                  ]
                },
                "evidence": {
                  "type": "string",
                  "enum": [
                    "source_option_list_equals_one_earlier_match"
                  ]
                }
              },
              "required": [
                "successor",
                "successor_slot",
                "predecessor",
                "evidence"
              ]
            },
            "maxItems": 256
          },
          "champion_declarations": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "source_final_index": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "winner": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "source_group_team_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 64
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "default": null
                        },
                        "team_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "default": null
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "resolved",
                            "unavailable",
                            "source_slot_empty"
                          ]
                        },
                        "unavailable_reason": {
                          "oneOf": [
                            {
                              "type": "string",
                              "enum": [
                                "not_in_prepared_archive",
                                "not_resolved_by_importer"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "default": null
                        }
                      },
                      "required": [
                        "state"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "runner_up": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "source_group_team_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 64
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "default": null
                        },
                        "team_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "default": null
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "resolved",
                            "unavailable",
                            "source_slot_empty"
                          ]
                        },
                        "unavailable_reason": {
                          "oneOf": [
                            {
                              "type": "string",
                              "enum": [
                                "not_in_prepared_archive",
                                "not_resolved_by_importer"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "default": null
                        }
                      },
                      "required": [
                        "state"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                }
              },
              "required": [
                "source_final_index"
              ]
            },
            "maxItems": 8
          },
          "slot_totals": {
            "type": "object",
            "properties": {
              "slots": {
                "type": "integer",
                "minimum": 0
              },
              "entry_round_slots": {
                "type": "integer",
                "minimum": 0
              },
              "declared_edges": {
                "type": "integer",
                "minimum": 0
              },
              "not_declared": {
                "type": "integer",
                "minimum": 0
              },
              "single_option_slots": {
                "type": "integer",
                "minimum": 0,
                "default": 0
              }
            },
            "required": [
              "slots",
              "entry_round_slots",
              "declared_edges",
              "not_declared"
            ]
          }
        },
        "required": [
          "id",
          "source_system",
          "source_group_id",
          "source_tournament_id",
          "source_group_label",
          "tournament_id",
          "phase_id",
          "group_id",
          "topology",
          "rounds",
          "edges",
          "champion_declarations",
          "slot_totals"
        ]
      },
      "PublicHistoricalBracketList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "source_system": {
                  "type": "string",
                  "minLength": 2,
                  "maxLength": 64,
                  "pattern": "^[a-z0-9](?:[a-z0-9._-]*[a-z0-9])?$"
                },
                "source_group_id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64
                },
                "source_tournament_id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64
                },
                "source_group_label": {
                  "oneOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "tournament_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "phase_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "group_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "topology": {
                  "type": "string",
                  "enum": [
                    "declared_edges",
                    "rounds_only",
                    "no_bracket_declared"
                  ]
                },
                "rounds": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "round_index": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "source_round_label": {
                        "oneOf": [
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 64
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "default": null
                      },
                      "declared_full_round_capacity": {
                        "oneOf": [
                          {
                            "type": "integer",
                            "exclusiveMinimum": 0
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "default": null
                      },
                      "matches": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "reference": {
                              "type": "object",
                              "properties": {
                                "source_match_id": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 64
                                },
                                "match_id": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "default": null
                                },
                                "state": {
                                  "type": "string",
                                  "enum": [
                                    "resolved",
                                    "unavailable"
                                  ]
                                },
                                "unavailable_reason": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "enum": [
                                        "not_in_prepared_archive",
                                        "not_resolved_by_importer"
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "default": null
                                }
                              },
                              "required": [
                                "source_match_id",
                                "state"
                              ]
                            },
                            "visual_order_in_round": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "side_a": {
                              "type": "object",
                              "properties": {
                                "slot": {
                                  "type": "string",
                                  "enum": [
                                    "a",
                                    "b"
                                  ]
                                },
                                "team": {
                                  "type": "object",
                                  "properties": {
                                    "source_group_team_id": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 64
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "default": null
                                    },
                                    "team_id": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "format": "uuid"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "default": null
                                    },
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "resolved",
                                        "unavailable",
                                        "source_slot_empty"
                                      ]
                                    },
                                    "unavailable_reason": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "enum": [
                                            "not_in_prepared_archive",
                                            "not_resolved_by_importer"
                                          ]
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "default": null
                                    }
                                  },
                                  "required": [
                                    "state"
                                  ]
                                },
                                "declared_entry_slot": {
                                  "type": "boolean",
                                  "default": false
                                },
                                "declared_score_text": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 8
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "default": null
                                }
                              },
                              "required": [
                                "slot",
                                "team"
                              ]
                            },
                            "side_b": {
                              "type": "object",
                              "properties": {
                                "slot": {
                                  "type": "string",
                                  "enum": [
                                    "a",
                                    "b"
                                  ]
                                },
                                "team": {
                                  "type": "object",
                                  "properties": {
                                    "source_group_team_id": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 64
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "default": null
                                    },
                                    "team_id": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "format": "uuid"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "default": null
                                    },
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "resolved",
                                        "unavailable",
                                        "source_slot_empty"
                                      ]
                                    },
                                    "unavailable_reason": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "enum": [
                                            "not_in_prepared_archive",
                                            "not_resolved_by_importer"
                                          ]
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "default": null
                                    }
                                  },
                                  "required": [
                                    "state"
                                  ]
                                },
                                "declared_entry_slot": {
                                  "type": "boolean",
                                  "default": false
                                },
                                "declared_score_text": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 8
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "default": null
                                }
                              },
                              "required": [
                                "slot",
                                "team"
                              ]
                            },
                            "declared_two_leg_tie": {
                              "type": "boolean",
                              "default": false
                            },
                            "legs": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "reference": {
                                    "type": "object",
                                    "properties": {
                                      "source_match_id": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 64
                                      },
                                      "match_id": {
                                        "oneOf": [
                                          {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "default": null
                                      },
                                      "state": {
                                        "type": "string",
                                        "enum": [
                                          "resolved",
                                          "unavailable"
                                        ]
                                      },
                                      "unavailable_reason": {
                                        "oneOf": [
                                          {
                                            "type": "string",
                                            "enum": [
                                              "not_in_prepared_archive",
                                              "not_resolved_by_importer"
                                            ]
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "default": null
                                      }
                                    },
                                    "required": [
                                      "source_match_id",
                                      "state"
                                    ]
                                  },
                                  "side_a_score_element": {
                                    "type": "string",
                                    "enum": [
                                      "a",
                                      "b"
                                    ]
                                  },
                                  "side_b_score_element": {
                                    "type": "string",
                                    "enum": [
                                      "a",
                                      "b"
                                    ]
                                  }
                                },
                                "required": [
                                  "reference",
                                  "side_a_score_element",
                                  "side_b_score_element"
                                ]
                              },
                              "minItems": 1,
                              "maxItems": 4
                            }
                          },
                          "required": [
                            "reference",
                            "visual_order_in_round",
                            "side_a",
                            "side_b",
                            "legs"
                          ]
                        },
                        "maxItems": 64
                      }
                    },
                    "required": [
                      "round_index",
                      "matches"
                    ]
                  },
                  "maxItems": 12
                },
                "edges": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "successor": {
                        "type": "object",
                        "properties": {
                          "source_match_id": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 64
                          },
                          "match_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          },
                          "state": {
                            "type": "string",
                            "enum": [
                              "resolved",
                              "unavailable"
                            ]
                          },
                          "unavailable_reason": {
                            "oneOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "not_in_prepared_archive",
                                  "not_resolved_by_importer"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          }
                        },
                        "required": [
                          "source_match_id",
                          "state"
                        ]
                      },
                      "successor_slot": {
                        "type": "string",
                        "enum": [
                          "a",
                          "b"
                        ]
                      },
                      "predecessor": {
                        "type": "object",
                        "properties": {
                          "source_match_id": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 64
                          },
                          "match_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          },
                          "state": {
                            "type": "string",
                            "enum": [
                              "resolved",
                              "unavailable"
                            ]
                          },
                          "unavailable_reason": {
                            "oneOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "not_in_prepared_archive",
                                  "not_resolved_by_importer"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          }
                        },
                        "required": [
                          "source_match_id",
                          "state"
                        ]
                      },
                      "evidence": {
                        "type": "string",
                        "enum": [
                          "source_option_list_equals_one_earlier_match"
                        ]
                      }
                    },
                    "required": [
                      "successor",
                      "successor_slot",
                      "predecessor",
                      "evidence"
                    ]
                  },
                  "maxItems": 256
                },
                "champion_declarations": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "source_final_index": {
                        "type": "integer",
                        "exclusiveMinimum": 0
                      },
                      "winner": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "source_group_team_id": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 64
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "default": null
                              },
                              "team_id": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "default": null
                              },
                              "state": {
                                "type": "string",
                                "enum": [
                                  "resolved",
                                  "unavailable",
                                  "source_slot_empty"
                                ]
                              },
                              "unavailable_reason": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "enum": [
                                      "not_in_prepared_archive",
                                      "not_resolved_by_importer"
                                    ]
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "default": null
                              }
                            },
                            "required": [
                              "state"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "default": null
                      },
                      "runner_up": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "source_group_team_id": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 64
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "default": null
                              },
                              "team_id": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "default": null
                              },
                              "state": {
                                "type": "string",
                                "enum": [
                                  "resolved",
                                  "unavailable",
                                  "source_slot_empty"
                                ]
                              },
                              "unavailable_reason": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "enum": [
                                      "not_in_prepared_archive",
                                      "not_resolved_by_importer"
                                    ]
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "default": null
                              }
                            },
                            "required": [
                              "state"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "default": null
                      }
                    },
                    "required": [
                      "source_final_index"
                    ]
                  },
                  "maxItems": 8
                },
                "slot_totals": {
                  "type": "object",
                  "properties": {
                    "slots": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "entry_round_slots": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "declared_edges": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "not_declared": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "single_option_slots": {
                      "type": "integer",
                      "minimum": 0,
                      "default": 0
                    }
                  },
                  "required": [
                    "slots",
                    "entry_round_slots",
                    "declared_edges",
                    "not_declared"
                  ]
                }
              },
              "required": [
                "id",
                "source_system",
                "source_group_id",
                "source_tournament_id",
                "source_group_label",
                "tournament_id",
                "phase_id",
                "group_id",
                "topology",
                "rounds",
                "edges",
                "champion_declarations",
                "slot_totals"
              ]
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "offset": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "items",
          "total",
          "limit",
          "offset"
        ]
      },
      "AdminHistoricalRegistryRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "organization_id": {
            "type": "string",
            "format": "uuid"
          },
          "source_system": {
            "type": "string",
            "minLength": 2,
            "maxLength": 64,
            "pattern": "^[a-z0-9](?:[a-z0-9._-]*[a-z0-9])?$"
          },
          "source_person_id": {
            "type": "string"
          },
          "display_name": {
            "type": "string"
          },
          "person_kind": {
            "type": "string",
            "enum": [
              "player",
              "staff",
              "unknown"
            ]
          },
          "source_role": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "GK",
                  "DEF",
                  "MID",
                  "FWD"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "staff_role": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "manager",
                  "coach",
                  "external_officer"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "source_role_label": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "source_team_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "captured_at": {
            "type": "string",
            "format": "date-time"
          },
          "source_revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "linked_player_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "link_verified_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "link_note": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "link_verified_by_pseudo": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "version": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "etag": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "tenant_id",
          "organization_id",
          "source_system",
          "source_person_id",
          "display_name",
          "person_kind",
          "source_role",
          "staff_role",
          "source_role_label",
          "source_team_ids",
          "captured_at",
          "source_revision",
          "linked_player_id",
          "link_verified_at",
          "link_note",
          "link_verified_by_pseudo",
          "version",
          "etag"
        ]
      },
      "AdminHistoricalRegistryList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "tenant_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "organization_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "source_system": {
                  "type": "string",
                  "minLength": 2,
                  "maxLength": 64,
                  "pattern": "^[a-z0-9](?:[a-z0-9._-]*[a-z0-9])?$"
                },
                "source_person_id": {
                  "type": "string"
                },
                "display_name": {
                  "type": "string"
                },
                "person_kind": {
                  "type": "string",
                  "enum": [
                    "player",
                    "staff",
                    "unknown"
                  ]
                },
                "source_role": {
                  "oneOf": [
                    {
                      "type": "string",
                      "enum": [
                        "GK",
                        "DEF",
                        "MID",
                        "FWD"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "staff_role": {
                  "oneOf": [
                    {
                      "type": "string",
                      "enum": [
                        "manager",
                        "coach",
                        "external_officer"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "source_role_label": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "source_team_ids": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "captured_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "source_revision": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "linked_player_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "link_verified_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "link_note": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "link_verified_by_pseudo": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "version": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "etag": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "tenant_id",
                "organization_id",
                "source_system",
                "source_person_id",
                "display_name",
                "person_kind",
                "source_role",
                "staff_role",
                "source_role_label",
                "source_team_ids",
                "captured_at",
                "source_revision",
                "linked_player_id",
                "link_verified_at",
                "link_note",
                "link_verified_by_pseudo",
                "version",
                "etag"
              ]
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "offset": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "items",
          "total",
          "limit",
          "offset"
        ]
      },
      "AdminHistoricalRegistrySummary": {
        "type": "object",
        "properties": {
          "organization_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "total": {
            "type": "integer",
            "minimum": 0
          },
          "by_person_kind": {
            "type": "object",
            "properties": {
              "player": {
                "type": "integer",
                "minimum": 0
              },
              "staff": {
                "type": "integer",
                "minimum": 0
              },
              "unknown": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "player",
              "staff",
              "unknown"
            ]
          },
          "by_source_role": {
            "type": "object",
            "properties": {
              "GK": {
                "type": "integer",
                "minimum": 0
              },
              "DEF": {
                "type": "integer",
                "minimum": 0
              },
              "MID": {
                "type": "integer",
                "minimum": 0
              },
              "FWD": {
                "type": "integer",
                "minimum": 0
              },
              "none": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "GK",
              "DEF",
              "MID",
              "FWD",
              "none"
            ]
          },
          "linked": {
            "type": "integer",
            "minimum": 0
          },
          "unlinked": {
            "type": "integer",
            "minimum": 0
          },
          "with_source_team": {
            "type": "integer",
            "minimum": 0
          },
          "without_source_team": {
            "type": "integer",
            "minimum": 0
          },
          "sources": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "source_system": {
                  "type": "string",
                  "minLength": 2,
                  "maxLength": 64,
                  "pattern": "^[a-z0-9](?:[a-z0-9._-]*[a-z0-9])?$"
                },
                "records": {
                  "type": "integer",
                  "minimum": 0
                },
                "last_captured_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "source_system",
                "records",
                "last_captured_at"
              ]
            }
          }
        },
        "required": [
          "organization_id",
          "total",
          "by_person_kind",
          "by_source_role",
          "linked",
          "unlinked",
          "with_source_team",
          "without_source_team",
          "sources"
        ]
      },
      "AdminHistoricalRegistryImportRequest": {
        "type": "object",
        "properties": {
          "organization_id": {
            "type": "string",
            "format": "uuid"
          },
          "source_system": {
            "type": "string",
            "minLength": 2,
            "maxLength": 64,
            "pattern": "^[a-z0-9](?:[a-z0-9._-]*[a-z0-9])?$"
          },
          "captured_at": {
            "type": "string",
            "format": "date-time"
          },
          "rows": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "source_person_id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64
                },
                "display_name": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "source_role_label": {
                  "oneOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 80
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "source_team_ids": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64
                  },
                  "maxItems": 32,
                  "default": []
                }
              },
              "required": [
                "source_person_id",
                "display_name"
              ]
            },
            "minItems": 1,
            "maxItems": 500
          }
        },
        "required": [
          "organization_id",
          "source_system",
          "captured_at",
          "rows"
        ]
      },
      "AdminHistoricalRegistryImportResponse": {
        "type": "object",
        "properties": {
          "organization_id": {
            "type": "string",
            "format": "uuid"
          },
          "source_system": {
            "type": "string",
            "minLength": 2,
            "maxLength": 64,
            "pattern": "^[a-z0-9](?:[a-z0-9._-]*[a-z0-9])?$"
          },
          "captured_at": {
            "type": "string",
            "format": "date-time"
          },
          "received": {
            "type": "integer",
            "minimum": 0
          },
          "created": {
            "type": "integer",
            "minimum": 0
          },
          "updated": {
            "type": "integer",
            "minimum": 0
          },
          "unchanged": {
            "type": "integer",
            "minimum": 0
          },
          "stale": {
            "type": "integer",
            "minimum": 0
          },
          "link_preserved": {
            "type": "integer",
            "minimum": 0
          },
          "by_person_kind": {
            "type": "object",
            "properties": {
              "player": {
                "type": "integer",
                "minimum": 0
              },
              "staff": {
                "type": "integer",
                "minimum": 0
              },
              "unknown": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "player",
              "staff",
              "unknown"
            ]
          },
          "by_source_role": {
            "type": "object",
            "properties": {
              "GK": {
                "type": "integer",
                "minimum": 0
              },
              "DEF": {
                "type": "integer",
                "minimum": 0
              },
              "MID": {
                "type": "integer",
                "minimum": 0
              },
              "FWD": {
                "type": "integer",
                "minimum": 0
              },
              "none": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "GK",
              "DEF",
              "MID",
              "FWD",
              "none"
            ]
          },
          "with_source_team": {
            "type": "integer",
            "minimum": 0
          },
          "without_source_team": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "organization_id",
          "source_system",
          "captured_at",
          "received",
          "created",
          "updated",
          "unchanged",
          "stale",
          "link_preserved",
          "by_person_kind",
          "by_source_role",
          "with_source_team",
          "without_source_team"
        ]
      },
      "AdminHistoricalRegistryLinkRequest": {
        "type": "object",
        "properties": {
          "player_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "note": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "expected_etag": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "player_id"
        ]
      },
      "AdminOrganizationCreate": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string",
            "minLength": 2,
            "maxLength": 64,
            "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
          },
          "legal_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "display_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "country_iso2": {
            "type": "string",
            "minLength": 2,
            "maxLength": 2,
            "pattern": "^[A-Z]{2}$"
          },
          "contact_email": {
            "type": "string",
            "format": "email",
            "maxLength": 200
          },
          "public_website_url": {
            "oneOf": [
              {
                "type": "string",
                "format": "uri"
              },
              {
                "type": "null"
              }
            ]
          },
          "city_name": {
            "type": "string",
            "minLength": 1
          },
          "city_slug": {
            "type": "string",
            "minLength": 2,
            "maxLength": 64,
            "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
          },
          "city_status": {
            "type": "string",
            "enum": [
              "live",
              "coming_soon"
            ]
          },
          "is_national": {
            "type": "boolean"
          }
        },
        "required": [
          "slug",
          "legal_name",
          "display_name",
          "country_iso2",
          "contact_email",
          "public_website_url"
        ]
      },
      "AdminOrganizationUpdate": {
        "type": "object",
        "properties": {
          "legal_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "display_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "country_iso2": {
            "type": "string",
            "minLength": 2,
            "maxLength": 2,
            "pattern": "^[A-Z]{2}$"
          },
          "contact_email": {
            "type": "string",
            "format": "email",
            "maxLength": 200
          },
          "public_website_url": {
            "oneOf": [
              {
                "type": "string",
                "format": "uri"
              },
              {
                "type": "null"
              }
            ]
          },
          "city_name": {
            "type": "string",
            "minLength": 1
          },
          "city_slug": {
            "type": "string",
            "minLength": 2,
            "maxLength": 64,
            "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
          },
          "city_status": {
            "type": "string",
            "enum": [
              "live",
              "coming_soon"
            ]
          },
          "is_national": {
            "type": "boolean"
          }
        },
        "required": []
      },
      "AdminOrganizationRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "slug": {
            "type": "string",
            "minLength": 2,
            "maxLength": 64,
            "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
          },
          "legal_name": {
            "type": "string"
          },
          "display_name": {
            "type": "string"
          },
          "country_iso2": {
            "type": "string"
          },
          "contact_email": {
            "type": "string"
          },
          "public_website_url": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "city_name": {
            "type": "string",
            "minLength": 1
          },
          "city_slug": {
            "type": "string",
            "minLength": 2,
            "maxLength": 64,
            "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
          },
          "city_status": {
            "type": "string",
            "enum": [
              "live",
              "coming_soon"
            ]
          },
          "is_national": {
            "type": "boolean"
          },
          "version": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "etag": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "id",
          "tenant_id",
          "slug",
          "legal_name",
          "display_name",
          "country_iso2",
          "contact_email",
          "public_website_url",
          "version",
          "etag"
        ]
      },
      "AdminOrganizationList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "tenant_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "slug": {
                  "type": "string",
                  "minLength": 2,
                  "maxLength": 64,
                  "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
                },
                "legal_name": {
                  "type": "string"
                },
                "display_name": {
                  "type": "string"
                },
                "country_iso2": {
                  "type": "string"
                },
                "contact_email": {
                  "type": "string"
                },
                "public_website_url": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "city_name": {
                  "type": "string",
                  "minLength": 1
                },
                "city_slug": {
                  "type": "string",
                  "minLength": 2,
                  "maxLength": 64,
                  "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
                },
                "city_status": {
                  "type": "string",
                  "enum": [
                    "live",
                    "coming_soon"
                  ]
                },
                "is_national": {
                  "type": "boolean"
                },
                "version": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "etag": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "required": [
                "id",
                "tenant_id",
                "slug",
                "legal_name",
                "display_name",
                "country_iso2",
                "contact_email",
                "public_website_url",
                "version",
                "etag"
              ]
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "offset": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "items",
          "total",
          "limit",
          "offset"
        ]
      },
      "AdminSeasonCreate": {
        "type": "object",
        "properties": {
          "organization_id": {
            "type": "string",
            "format": "uuid"
          },
          "slug": {
            "type": "string",
            "minLength": 2,
            "maxLength": 64,
            "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
          },
          "label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "starts_on": {
            "type": "string",
            "format": "date"
          },
          "ends_on": {
            "type": "string",
            "format": "date"
          },
          "roster_registration_deadline_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "transfer_window_opens_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "transfer_window_closes_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "organization_id",
          "slug",
          "label",
          "starts_on",
          "ends_on"
        ]
      },
      "AdminSeasonUpdate": {
        "type": "object",
        "properties": {
          "expected_etag": {
            "type": "string",
            "minLength": 1
          },
          "label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "starts_on": {
            "type": "string",
            "format": "date"
          },
          "ends_on": {
            "type": "string",
            "format": "date"
          },
          "roster_registration_deadline_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "transfer_window_opens_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "transfer_window_closes_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": []
      },
      "AdminSeasonRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "organization_id": {
            "type": "string",
            "format": "uuid"
          },
          "slug": {
            "type": "string",
            "minLength": 2,
            "maxLength": 64,
            "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
          },
          "label": {
            "type": "string"
          },
          "starts_on": {
            "type": "string",
            "format": "date"
          },
          "ends_on": {
            "type": "string",
            "format": "date"
          },
          "version": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "etag": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "id",
          "tenant_id",
          "organization_id",
          "slug",
          "label",
          "starts_on",
          "ends_on",
          "version",
          "etag"
        ]
      },
      "AdminSeasonList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "tenant_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "organization_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "slug": {
                  "type": "string",
                  "minLength": 2,
                  "maxLength": 64,
                  "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
                },
                "label": {
                  "type": "string"
                },
                "starts_on": {
                  "type": "string",
                  "format": "date"
                },
                "ends_on": {
                  "type": "string",
                  "format": "date"
                },
                "version": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "etag": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "required": [
                "id",
                "tenant_id",
                "organization_id",
                "slug",
                "label",
                "starts_on",
                "ends_on",
                "version",
                "etag"
              ]
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "offset": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "items",
          "total",
          "limit",
          "offset"
        ]
      },
      "AdminTournamentCreate": {
        "type": "object",
        "properties": {
          "season_id": {
            "type": "string",
            "format": "uuid"
          },
          "organization_id": {
            "type": "string",
            "format": "uuid"
          },
          "slug": {
            "type": "string",
            "minLength": 2,
            "maxLength": 64,
            "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
          },
          "label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "format": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "league",
                  "league_with_playoffs",
                  "cup",
                  "group_then_knockout"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "group_count": {
            "oneOf": [
              {
                "type": "integer",
                "minimum": 1,
                "maximum": 32
              },
              {
                "type": "null"
              }
            ]
          },
          "public_kind": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "championship",
                  "tournament"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "competition_category": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "serie_a",
                  "serie_a2",
                  "serie_b",
                  "cup",
                  "playoff"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "starts_on": {
            "type": "string",
            "format": "date"
          },
          "ends_on": {
            "oneOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ]
          },
          "regular_season_legs": {
            "oneOf": [
              {
                "type": "number",
                "enum": [
                  1
                ]
              },
              {
                "type": "number",
                "enum": [
                  2
                ]
              }
            ]
          },
          "expected_team_count": {
            "oneOf": [
              {
                "type": "integer",
                "minimum": 2,
                "maximum": 64
              },
              {
                "type": "null"
              }
            ]
          },
          "roster_registration_deadline_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "transfer_window_opens_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "transfer_window_closes_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "discipline_predecessor_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "discipline_policy_version": {
            "type": "string",
            "minLength": 1
          },
          "knockout_config": {
            "type": "object",
            "properties": {
              "seeding_source": {
                "type": "string",
                "enum": [
                  "standings_top_n",
                  "manual",
                  "draw"
                ]
              },
              "qualified_count": {
                "type": "integer",
                "minimum": 2,
                "maximum": 64
              },
              "linked_source_tournament_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "round_defaults": {
                "type": "object",
                "properties": {
                  "legs": {
                    "oneOf": [
                      {
                        "type": "number",
                        "enum": [
                          1
                        ]
                      },
                      {
                        "type": "number",
                        "enum": [
                          2
                        ]
                      }
                    ]
                  },
                  "away_goals_rule": {
                    "type": "boolean"
                  },
                  "extra_time": {
                    "type": "boolean"
                  },
                  "penalties": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "legs",
                  "extra_time",
                  "penalties"
                ]
              }
            },
            "required": [
              "seeding_source",
              "round_defaults"
            ]
          }
        },
        "required": [
          "season_id",
          "organization_id",
          "slug",
          "label",
          "format",
          "starts_on",
          "ends_on"
        ]
      },
      "AdminTournamentUpdate": {
        "type": "object",
        "properties": {
          "expected_etag": {
            "type": "string",
            "minLength": 1
          },
          "label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "format": {
            "type": "string",
            "enum": [
              "league",
              "league_with_playoffs",
              "cup",
              "group_then_knockout"
            ]
          },
          "group_count": {
            "oneOf": [
              {
                "type": "integer",
                "minimum": 1,
                "maximum": 32
              },
              {
                "type": "null"
              }
            ]
          },
          "public_kind": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "championship",
                  "tournament"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "competition_category": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "serie_a",
                  "serie_a2",
                  "serie_b",
                  "cup",
                  "playoff"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "starts_on": {
            "type": "string",
            "format": "date"
          },
          "ends_on": {
            "oneOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "ready",
              "scheduled",
              "in_progress",
              "completed",
              "playoffs",
              "archived"
            ]
          },
          "regular_season_legs": {
            "oneOf": [
              {
                "type": "number",
                "enum": [
                  1
                ]
              },
              {
                "type": "number",
                "enum": [
                  2
                ]
              }
            ]
          },
          "expected_team_count": {
            "oneOf": [
              {
                "type": "integer",
                "minimum": 2,
                "maximum": 64
              },
              {
                "type": "null"
              }
            ]
          },
          "roster_registration_deadline_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "transfer_window_opens_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "transfer_window_closes_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "discipline_predecessor_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "discipline_policy_version": {
            "type": "string",
            "minLength": 1
          },
          "knockout_config": {
            "type": "object",
            "properties": {
              "seeding_source": {
                "type": "string",
                "enum": [
                  "standings_top_n",
                  "manual",
                  "draw"
                ]
              },
              "qualified_count": {
                "type": "integer",
                "minimum": 2,
                "maximum": 64
              },
              "linked_source_tournament_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "round_defaults": {
                "type": "object",
                "properties": {
                  "legs": {
                    "oneOf": [
                      {
                        "type": "number",
                        "enum": [
                          1
                        ]
                      },
                      {
                        "type": "number",
                        "enum": [
                          2
                        ]
                      }
                    ]
                  },
                  "away_goals_rule": {
                    "type": "boolean"
                  },
                  "extra_time": {
                    "type": "boolean"
                  },
                  "penalties": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "legs",
                  "extra_time",
                  "penalties"
                ]
              }
            },
            "required": [
              "seeding_source",
              "round_defaults"
            ]
          },
          "standings_zones": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "promoted": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 32
                  },
                  "playoff": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 32
                  },
                  "relegated": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 32
                  },
                  "promoted_label": {
                    "oneOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 40
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "playoff_label": {
                    "oneOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 40
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "relegated_label": {
                    "oneOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 40
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "promoted",
                  "playoff",
                  "relegated"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": []
      },
      "AdminTournamentRuleRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "tournament_id": {
            "type": "string",
            "format": "uuid"
          },
          "players_per_side": {
            "type": "integer",
            "minimum": 5,
            "maximum": 11
          },
          "minimum_players_to_start": {
            "type": "integer",
            "minimum": 1,
            "maximum": 11
          },
          "match_duration_minutes": {
            "type": "integer",
            "minimum": 20,
            "maximum": 120
          },
          "periods": {
            "type": "integer",
            "minimum": 1,
            "maximum": 4
          },
          "stoppage_time_policy": {
            "type": "string",
            "enum": [
              "referee_declared",
              "none"
            ]
          },
          "substitution_policy": {
            "type": "string",
            "enum": [
              "rolling",
              "limited",
              "none"
            ]
          },
          "max_subs_per_team": {
            "type": "integer",
            "minimum": 0,
            "maximum": 20
          },
          "max_bench_players": {
            "type": "integer",
            "minimum": 0,
            "maximum": 20
          },
          "max_roster_players": {
            "type": "integer",
            "minimum": 1,
            "maximum": 50
          },
          "minimum_player_age": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100
          },
          "minimum_player_age_reference": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "registration_effective_date",
                  "tournament_start",
                  "season_start"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "forfeit_score_home": {
            "type": "integer",
            "minimum": 0,
            "maximum": 20
          },
          "forfeit_score_away": {
            "type": "integer",
            "minimum": 0,
            "maximum": 20
          },
          "forfeit_points_penalty": {
            "type": "integer",
            "maximum": -1
          },
          "forfeit_triggers": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "no_show",
                    "ineligible_player",
                    "roster_below_minimum",
                    "late_result_confirmation_both_secretariats"
                  ]
                },
                "enabled": {
                  "type": "boolean"
                },
                "after_days": {
                  "oneOf": [
                    {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 30
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "kind",
                "enabled",
                "after_days"
              ]
            },
            "minItems": 1,
            "maxItems": 4
          },
          "points": {
            "type": "object",
            "properties": {
              "win": {
                "type": "integer",
                "minimum": 0,
                "maximum": 10
              },
              "draw": {
                "type": "integer",
                "minimum": 0,
                "maximum": 10
              },
              "loss": {
                "type": "integer",
                "minimum": 0,
                "maximum": 10
              },
              "shootout": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "winner": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 10
                      },
                      "loser": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 10
                      }
                    },
                    "required": [
                      "winner",
                      "loser"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "win",
              "draw",
              "loss"
            ]
          },
          "tiebreakers": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "points",
                "goal_difference",
                "goals_for",
                "head_to_head",
                "head_to_head_goals_for",
                "wins",
                "disciplinary",
                "draw",
                "team_id_asc"
              ]
            },
            "minItems": 1
          },
          "yellow_cards_to_suspension": {
            "type": "integer",
            "minimum": 0,
            "maximum": 20
          },
          "red_card_immediate_ban_matches": {
            "type": "integer",
            "minimum": 0,
            "maximum": 10
          },
          "yellow_cards_to_diffida": {
            "type": "integer",
            "minimum": 0,
            "maximum": 20
          },
          "second_yellow_ban_matches": {
            "type": "integer",
            "minimum": 0,
            "maximum": 10
          },
          "matchday_deadline_offsets": {
            "type": "object",
            "properties": {
              "availability_minutes_before_kickoff": {
                "type": "integer",
                "minimum": 0,
                "maximum": 20160
              },
              "callup_minutes_before_kickoff": {
                "type": "integer",
                "minimum": 0,
                "maximum": 20160
              },
              "lineup_minutes_before_kickoff": {
                "type": "integer",
                "minimum": 0,
                "maximum": 20160
              }
            },
            "required": [
              "availability_minutes_before_kickoff",
              "callup_minutes_before_kickoff",
              "lineup_minutes_before_kickoff"
            ]
          },
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "previous_revision_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "lifecycle_status": {
            "type": "string",
            "enum": [
              "draft",
              "published",
              "superseded"
            ]
          },
          "effective_from_phase_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "effective_from_round_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "content_hash": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "published_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "frozen_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "updated_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "tenant_id",
          "tournament_id",
          "players_per_side",
          "minimum_players_to_start",
          "match_duration_minutes",
          "periods",
          "substitution_policy",
          "max_subs_per_team",
          "max_bench_players",
          "forfeit_score_home",
          "forfeit_score_away",
          "forfeit_triggers",
          "points",
          "tiebreakers",
          "yellow_cards_to_suspension",
          "red_card_immediate_ban_matches",
          "created_at",
          "updated_at",
          "created_by",
          "updated_by"
        ]
      },
      "AdminTournamentRuleUpdate": {
        "type": "object",
        "properties": {
          "minimum_players_to_start": {
            "type": "integer",
            "minimum": 1,
            "maximum": 11
          },
          "match_duration_minutes": {
            "type": "integer",
            "minimum": 20,
            "maximum": 120
          },
          "periods": {
            "type": "integer",
            "minimum": 1,
            "maximum": 4
          },
          "stoppage_time_policy": {
            "type": "string",
            "enum": [
              "referee_declared",
              "none"
            ]
          },
          "substitution_policy": {
            "type": "string",
            "enum": [
              "rolling",
              "limited",
              "none"
            ]
          },
          "max_subs_per_team": {
            "type": "integer",
            "minimum": 0,
            "maximum": 20
          },
          "max_bench_players": {
            "type": "integer",
            "minimum": 0,
            "maximum": 20
          },
          "max_roster_players": {
            "type": "integer",
            "minimum": 1,
            "maximum": 50
          },
          "minimum_player_age": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100
          },
          "minimum_player_age_reference": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "registration_effective_date",
                  "tournament_start",
                  "season_start"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "forfeit_score_home": {
            "type": "integer",
            "minimum": 0,
            "maximum": 20
          },
          "forfeit_score_away": {
            "type": "integer",
            "minimum": 0,
            "maximum": 20
          },
          "forfeit_points_penalty": {
            "type": "integer",
            "maximum": -1
          },
          "forfeit_triggers": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "no_show",
                    "ineligible_player",
                    "roster_below_minimum",
                    "late_result_confirmation_both_secretariats"
                  ]
                },
                "enabled": {
                  "type": "boolean"
                },
                "after_days": {
                  "oneOf": [
                    {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 30
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "kind",
                "enabled",
                "after_days"
              ]
            },
            "minItems": 1,
            "maxItems": 4
          },
          "points": {
            "type": "object",
            "properties": {
              "win": {
                "type": "integer",
                "minimum": 0,
                "maximum": 10
              },
              "draw": {
                "type": "integer",
                "minimum": 0,
                "maximum": 10
              },
              "loss": {
                "type": "integer",
                "minimum": 0,
                "maximum": 10
              },
              "shootout": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "winner": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 10
                      },
                      "loser": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 10
                      }
                    },
                    "required": [
                      "winner",
                      "loser"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "win",
              "draw",
              "loss"
            ]
          },
          "tiebreakers": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "points",
                "goal_difference",
                "goals_for",
                "head_to_head",
                "head_to_head_goals_for",
                "wins",
                "disciplinary",
                "draw",
                "team_id_asc"
              ]
            },
            "minItems": 1,
            "maxItems": 9
          },
          "yellow_cards_to_suspension": {
            "type": "integer",
            "minimum": 0,
            "maximum": 20
          },
          "red_card_immediate_ban_matches": {
            "type": "integer",
            "minimum": 0,
            "maximum": 10
          },
          "yellow_cards_to_diffida": {
            "type": "integer",
            "minimum": 0,
            "maximum": 20
          },
          "second_yellow_ban_matches": {
            "type": "integer",
            "minimum": 0,
            "maximum": 10
          },
          "effective_from_phase_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "effective_from_round_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "minimum_players_to_start",
          "match_duration_minutes",
          "periods",
          "substitution_policy",
          "max_subs_per_team",
          "max_bench_players",
          "forfeit_score_home",
          "forfeit_score_away",
          "forfeit_triggers",
          "points",
          "tiebreakers",
          "yellow_cards_to_suspension",
          "red_card_immediate_ban_matches"
        ]
      },
      "AdminTournamentRulePublishResponse": {
        "type": "object",
        "properties": {
          "rule": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "tenant_id": {
                "type": "string",
                "format": "uuid"
              },
              "tournament_id": {
                "type": "string",
                "format": "uuid"
              },
              "players_per_side": {
                "type": "integer",
                "minimum": 5,
                "maximum": 11
              },
              "minimum_players_to_start": {
                "type": "integer",
                "minimum": 1,
                "maximum": 11
              },
              "match_duration_minutes": {
                "type": "integer",
                "minimum": 20,
                "maximum": 120
              },
              "periods": {
                "type": "integer",
                "minimum": 1,
                "maximum": 4
              },
              "stoppage_time_policy": {
                "type": "string",
                "enum": [
                  "referee_declared",
                  "none"
                ]
              },
              "substitution_policy": {
                "type": "string",
                "enum": [
                  "rolling",
                  "limited",
                  "none"
                ]
              },
              "max_subs_per_team": {
                "type": "integer",
                "minimum": 0,
                "maximum": 20
              },
              "max_bench_players": {
                "type": "integer",
                "minimum": 0,
                "maximum": 20
              },
              "max_roster_players": {
                "type": "integer",
                "minimum": 1,
                "maximum": 50
              },
              "minimum_player_age": {
                "type": "integer",
                "minimum": 0,
                "maximum": 100
              },
              "minimum_player_age_reference": {
                "oneOf": [
                  {
                    "type": "string",
                    "enum": [
                      "registration_effective_date",
                      "tournament_start",
                      "season_start"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "forfeit_score_home": {
                "type": "integer",
                "minimum": 0,
                "maximum": 20
              },
              "forfeit_score_away": {
                "type": "integer",
                "minimum": 0,
                "maximum": 20
              },
              "forfeit_points_penalty": {
                "type": "integer",
                "maximum": -1
              },
              "forfeit_triggers": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "enum": [
                        "no_show",
                        "ineligible_player",
                        "roster_below_minimum",
                        "late_result_confirmation_both_secretariats"
                      ]
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "after_days": {
                      "oneOf": [
                        {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 30
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "kind",
                    "enabled",
                    "after_days"
                  ]
                },
                "minItems": 1,
                "maxItems": 4
              },
              "points": {
                "type": "object",
                "properties": {
                  "win": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10
                  },
                  "draw": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10
                  },
                  "loss": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10
                  },
                  "shootout": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "winner": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 10
                          },
                          "loser": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 10
                          }
                        },
                        "required": [
                          "winner",
                          "loser"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "win",
                  "draw",
                  "loss"
                ]
              },
              "tiebreakers": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "points",
                    "goal_difference",
                    "goals_for",
                    "head_to_head",
                    "head_to_head_goals_for",
                    "wins",
                    "disciplinary",
                    "draw",
                    "team_id_asc"
                  ]
                },
                "minItems": 1
              },
              "yellow_cards_to_suspension": {
                "type": "integer",
                "minimum": 0,
                "maximum": 20
              },
              "red_card_immediate_ban_matches": {
                "type": "integer",
                "minimum": 0,
                "maximum": 10
              },
              "yellow_cards_to_diffida": {
                "type": "integer",
                "minimum": 0,
                "maximum": 20
              },
              "second_yellow_ban_matches": {
                "type": "integer",
                "minimum": 0,
                "maximum": 10
              },
              "matchday_deadline_offsets": {
                "type": "object",
                "properties": {
                  "availability_minutes_before_kickoff": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 20160
                  },
                  "callup_minutes_before_kickoff": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 20160
                  },
                  "lineup_minutes_before_kickoff": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 20160
                  }
                },
                "required": [
                  "availability_minutes_before_kickoff",
                  "callup_minutes_before_kickoff",
                  "lineup_minutes_before_kickoff"
                ]
              },
              "revision": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "previous_revision_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "lifecycle_status": {
                "type": "string",
                "enum": [
                  "draft",
                  "published",
                  "superseded"
                ]
              },
              "effective_from_phase_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "effective_from_round_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "content_hash": {
                "type": "string",
                "pattern": "^[0-9a-f]{64}$"
              },
              "published_at": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "frozen_at": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "created_by": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "updated_by": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "id",
              "tenant_id",
              "tournament_id",
              "players_per_side",
              "minimum_players_to_start",
              "match_duration_minutes",
              "periods",
              "substitution_policy",
              "max_subs_per_team",
              "max_bench_players",
              "forfeit_score_home",
              "forfeit_score_away",
              "forfeit_triggers",
              "points",
              "tiebreakers",
              "yellow_cards_to_suspension",
              "red_card_immediate_ban_matches",
              "created_at",
              "updated_at",
              "created_by",
              "updated_by"
            ]
          },
          "recomputed": {
            "type": "boolean"
          },
          "official_match_count": {
            "type": "integer",
            "minimum": 0
          },
          "standings_count": {
            "type": "integer",
            "minimum": 0
          },
          "recomputed_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "rule",
          "recomputed",
          "official_match_count",
          "standings_count",
          "recomputed_at"
        ]
      },
      "AdminTournamentTeamRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "tournament_id": {
            "type": "string",
            "format": "uuid"
          },
          "team_id": {
            "type": "string",
            "format": "uuid"
          },
          "team_slug": {
            "type": "string",
            "minLength": 2,
            "maxLength": 64,
            "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
          },
          "team_display_name": {
            "type": "string",
            "minLength": 1
          },
          "team_short_name": {
            "type": "string",
            "minLength": 1
          },
          "seed": {
            "oneOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "registered_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "tenant_id",
          "tournament_id",
          "team_id",
          "team_slug",
          "team_display_name",
          "team_short_name",
          "seed",
          "registered_at"
        ]
      },
      "AdminTournamentTeamList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "tenant_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "tournament_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "team_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "team_slug": {
                  "type": "string",
                  "minLength": 2,
                  "maxLength": 64,
                  "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
                },
                "team_display_name": {
                  "type": "string",
                  "minLength": 1
                },
                "team_short_name": {
                  "type": "string",
                  "minLength": 1
                },
                "seed": {
                  "oneOf": [
                    {
                      "type": "integer",
                      "exclusiveMinimum": 0
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "registered_at": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "id",
                "tenant_id",
                "tournament_id",
                "team_id",
                "team_slug",
                "team_display_name",
                "team_short_name",
                "seed",
                "registered_at"
              ]
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "AdminTournamentTeamRegister": {
        "type": "object",
        "properties": {
          "team_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "minItems": 1,
            "maxItems": 64
          },
          "seeds": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "team_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "seed": {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 64
                }
              },
              "required": [
                "team_id",
                "seed"
              ]
            }
          }
        },
        "required": [
          "team_ids"
        ]
      },
      "AdminTournamentSeedRequest": {
        "type": "object",
        "properties": {
          "order": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "minItems": 2,
            "maxItems": 64
          },
          "randomize": {
            "type": "boolean"
          }
        },
        "required": []
      },
      "AdminTournamentCalendarPreviewRequest": {
        "type": "object",
        "properties": {
          "start_date": {
            "type": "string",
            "format": "date"
          },
          "matchday_interval_days": {
            "type": "integer",
            "minimum": 1,
            "maximum": 30
          },
          "kickoff_slots": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "time": {
                  "type": "string",
                  "pattern": "^\\d{2}:\\d{2}$"
                },
                "field_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "time",
                "field_id"
              ]
            },
            "minItems": 1,
            "maxItems": 32
          },
          "timezone_offset": {
            "type": "string",
            "pattern": "^[+-]\\d{2}:\\d{2}$"
          },
          "blackout_dates": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "date"
            },
            "maxItems": 100
          },
          "team_blackouts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "team_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "date": {
                  "type": "string",
                  "format": "date"
                },
                "reason": {
                  "type": "string",
                  "maxLength": 200
                }
              },
              "required": [
                "team_id",
                "date"
              ]
            },
            "maxItems": 500
          },
          "field_blackouts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "field_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "date": {
                  "type": "string",
                  "format": "date"
                },
                "reason": {
                  "type": "string",
                  "maxLength": 200
                }
              },
              "required": [
                "field_id",
                "date"
              ]
            },
            "maxItems": 500
          }
        },
        "required": [
          "start_date",
          "matchday_interval_days",
          "kickoff_slots"
        ]
      },
      "AdminTournamentCalendarGenerateRequest": {
        "type": "object",
        "properties": {
          "start_date": {
            "type": "string",
            "format": "date"
          },
          "matchday_interval_days": {
            "type": "integer",
            "minimum": 1,
            "maximum": 30
          },
          "kickoff_slots": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "time": {
                  "type": "string",
                  "pattern": "^\\d{2}:\\d{2}$"
                },
                "field_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "time",
                "field_id"
              ]
            },
            "minItems": 1,
            "maxItems": 32
          },
          "timezone_offset": {
            "type": "string",
            "pattern": "^[+-]\\d{2}:\\d{2}$"
          },
          "blackout_dates": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "date"
            },
            "maxItems": 100
          },
          "team_blackouts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "team_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "date": {
                  "type": "string",
                  "format": "date"
                },
                "reason": {
                  "type": "string",
                  "maxLength": 200
                }
              },
              "required": [
                "team_id",
                "date"
              ]
            },
            "maxItems": 500
          },
          "field_blackouts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "field_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "date": {
                  "type": "string",
                  "format": "date"
                },
                "reason": {
                  "type": "string",
                  "maxLength": 200
                }
              },
              "required": [
                "field_id",
                "date"
              ]
            },
            "maxItems": 500
          },
          "confirm_regenerate": {
            "type": "boolean"
          }
        },
        "required": [
          "start_date",
          "matchday_interval_days",
          "kickoff_slots"
        ]
      },
      "AdminTournamentCalendarRoundPreview": {
        "type": "object",
        "properties": {
          "round_index": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "leg_index": {
            "oneOf": [
              {
                "type": "number",
                "enum": [
                  1
                ]
              },
              {
                "type": "number",
                "enum": [
                  2
                ]
              }
            ]
          },
          "label": {
            "type": "string",
            "minLength": 1
          },
          "scheduled_date": {
            "type": "string",
            "format": "date"
          }
        },
        "required": [
          "round_index",
          "leg_index",
          "label",
          "scheduled_date"
        ]
      },
      "AdminTournamentCalendarFixturePreview": {
        "type": "object",
        "properties": {
          "sequence": {
            "type": "integer",
            "minimum": 0
          },
          "round_index": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "leg_index": {
            "oneOf": [
              {
                "type": "number",
                "enum": [
                  1
                ]
              },
              {
                "type": "number",
                "enum": [
                  2
                ]
              }
            ]
          },
          "home_team_id": {
            "type": "string",
            "format": "uuid"
          },
          "away_team_id": {
            "type": "string",
            "format": "uuid"
          },
          "scheduled_at": {
            "type": "string",
            "format": "date-time"
          },
          "field_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "conflict_codes": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "team_blackout",
                "field_blackout",
                "proposed_slot_conflict",
                "existing_slot_conflict"
              ]
            }
          }
        },
        "required": [
          "sequence",
          "round_index",
          "leg_index",
          "home_team_id",
          "away_team_id",
          "scheduled_at",
          "field_id",
          "conflict_codes"
        ]
      },
      "AdminTournamentCalendarHomeAwayBalance": {
        "type": "object",
        "properties": {
          "team_id": {
            "type": "string",
            "format": "uuid"
          },
          "home": {
            "type": "integer",
            "minimum": 0
          },
          "away": {
            "type": "integer",
            "minimum": 0
          },
          "byes": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "team_id",
          "home",
          "away",
          "byes"
        ]
      },
      "AdminTournamentCalendarPreviewConflict": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "enum": [
              "team_blackout",
              "field_blackout",
              "proposed_slot_conflict",
              "existing_slot_conflict"
            ]
          },
          "sequence": {
            "type": "integer",
            "minimum": 0
          },
          "round_index": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "scheduled_at": {
            "type": "string",
            "format": "date-time"
          },
          "field_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "home_team_id": {
            "type": "string",
            "format": "uuid"
          },
          "away_team_id": {
            "type": "string",
            "format": "uuid"
          },
          "message": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "code",
          "sequence",
          "round_index",
          "scheduled_at",
          "field_id",
          "home_team_id",
          "away_team_id",
          "message"
        ]
      },
      "AdminTournamentFixtureConflict": {
        "type": "object",
        "properties": {
          "field_id": {
            "type": "string",
            "format": "uuid"
          },
          "match_id": {
            "type": "string",
            "format": "uuid"
          },
          "scheduled_at": {
            "type": "string",
            "format": "date-time"
          },
          "tournament_id": {
            "type": "string",
            "format": "uuid"
          },
          "other_match_id": {
            "type": "string",
            "format": "uuid"
          },
          "other_scheduled_at": {
            "type": "string",
            "format": "date-time"
          },
          "other_tournament_id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "field_id",
          "match_id",
          "scheduled_at",
          "tournament_id",
          "other_match_id",
          "other_scheduled_at",
          "other_tournament_id"
        ]
      },
      "AdminTournamentCalendarPreviewResponse": {
        "type": "object",
        "properties": {
          "tournament_id": {
            "type": "string",
            "format": "uuid"
          },
          "generated_at": {
            "type": "string",
            "format": "date-time"
          },
          "rounds": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "round_index": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "leg_index": {
                  "oneOf": [
                    {
                      "type": "number",
                      "enum": [
                        1
                      ]
                    },
                    {
                      "type": "number",
                      "enum": [
                        2
                      ]
                    }
                  ]
                },
                "label": {
                  "type": "string",
                  "minLength": 1
                },
                "scheduled_date": {
                  "type": "string",
                  "format": "date"
                }
              },
              "required": [
                "round_index",
                "leg_index",
                "label",
                "scheduled_date"
              ]
            }
          },
          "fixtures": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "sequence": {
                  "type": "integer",
                  "minimum": 0
                },
                "round_index": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "leg_index": {
                  "oneOf": [
                    {
                      "type": "number",
                      "enum": [
                        1
                      ]
                    },
                    {
                      "type": "number",
                      "enum": [
                        2
                      ]
                    }
                  ]
                },
                "home_team_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "away_team_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "scheduled_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "field_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "conflict_codes": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "team_blackout",
                      "field_blackout",
                      "proposed_slot_conflict",
                      "existing_slot_conflict"
                    ]
                  }
                }
              },
              "required": [
                "sequence",
                "round_index",
                "leg_index",
                "home_team_id",
                "away_team_id",
                "scheduled_at",
                "field_id",
                "conflict_codes"
              ]
            }
          },
          "home_away_balance": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "team_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "home": {
                  "type": "integer",
                  "minimum": 0
                },
                "away": {
                  "type": "integer",
                  "minimum": 0
                },
                "byes": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "required": [
                "team_id",
                "home",
                "away",
                "byes"
              ]
            }
          },
          "conflicts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string",
                  "enum": [
                    "team_blackout",
                    "field_blackout",
                    "proposed_slot_conflict",
                    "existing_slot_conflict"
                  ]
                },
                "sequence": {
                  "type": "integer",
                  "minimum": 0
                },
                "round_index": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "scheduled_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "field_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "home_team_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "away_team_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "message": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "required": [
                "code",
                "sequence",
                "round_index",
                "scheduled_at",
                "field_id",
                "home_team_id",
                "away_team_id",
                "message"
              ]
            }
          },
          "existing_conflicts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "field_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "match_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "scheduled_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "tournament_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "other_match_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "other_scheduled_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "other_tournament_id": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "required": [
                "field_id",
                "match_id",
                "scheduled_at",
                "tournament_id",
                "other_match_id",
                "other_scheduled_at",
                "other_tournament_id"
              ]
            }
          }
        },
        "required": [
          "tournament_id",
          "generated_at",
          "rounds",
          "fixtures",
          "home_away_balance",
          "conflicts",
          "existing_conflicts"
        ]
      },
      "AdminTournamentRoundRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "tournament_id": {
            "type": "string",
            "format": "uuid"
          },
          "label": {
            "type": "string",
            "minLength": 1
          },
          "order_index": {
            "type": "integer",
            "minimum": 0
          },
          "starts_on": {
            "oneOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ]
          },
          "ends_on": {
            "oneOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "tenant_id",
          "tournament_id",
          "label",
          "order_index",
          "starts_on",
          "ends_on"
        ]
      },
      "AdminTournamentCalendarSkippedFixture": {
        "type": "object",
        "properties": {
          "sequence": {
            "type": "integer",
            "minimum": 0
          },
          "round_index": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "home_team_id": {
            "type": "string",
            "format": "uuid"
          },
          "away_team_id": {
            "type": "string",
            "format": "uuid"
          },
          "error_code": {
            "type": "string",
            "minLength": 1
          },
          "message": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "sequence",
          "round_index",
          "home_team_id",
          "away_team_id",
          "error_code",
          "message"
        ]
      },
      "AdminTournamentCalendarGenerateResponse": {
        "type": "object",
        "properties": {
          "preview": {
            "type": "object",
            "properties": {
              "tournament_id": {
                "type": "string",
                "format": "uuid"
              },
              "generated_at": {
                "type": "string",
                "format": "date-time"
              },
              "rounds": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "round_index": {
                      "type": "integer",
                      "exclusiveMinimum": 0
                    },
                    "leg_index": {
                      "oneOf": [
                        {
                          "type": "number",
                          "enum": [
                            1
                          ]
                        },
                        {
                          "type": "number",
                          "enum": [
                            2
                          ]
                        }
                      ]
                    },
                    "label": {
                      "type": "string",
                      "minLength": 1
                    },
                    "scheduled_date": {
                      "type": "string",
                      "format": "date"
                    }
                  },
                  "required": [
                    "round_index",
                    "leg_index",
                    "label",
                    "scheduled_date"
                  ]
                }
              },
              "fixtures": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "sequence": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "round_index": {
                      "type": "integer",
                      "exclusiveMinimum": 0
                    },
                    "leg_index": {
                      "oneOf": [
                        {
                          "type": "number",
                          "enum": [
                            1
                          ]
                        },
                        {
                          "type": "number",
                          "enum": [
                            2
                          ]
                        }
                      ]
                    },
                    "home_team_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "away_team_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "scheduled_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "field_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "conflict_codes": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "team_blackout",
                          "field_blackout",
                          "proposed_slot_conflict",
                          "existing_slot_conflict"
                        ]
                      }
                    }
                  },
                  "required": [
                    "sequence",
                    "round_index",
                    "leg_index",
                    "home_team_id",
                    "away_team_id",
                    "scheduled_at",
                    "field_id",
                    "conflict_codes"
                  ]
                }
              },
              "home_away_balance": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "team_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "home": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "away": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "byes": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "team_id",
                    "home",
                    "away",
                    "byes"
                  ]
                }
              },
              "conflicts": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "team_blackout",
                        "field_blackout",
                        "proposed_slot_conflict",
                        "existing_slot_conflict"
                      ]
                    },
                    "sequence": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "round_index": {
                      "type": "integer",
                      "exclusiveMinimum": 0
                    },
                    "scheduled_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "field_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "home_team_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "away_team_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "message": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "code",
                    "sequence",
                    "round_index",
                    "scheduled_at",
                    "field_id",
                    "home_team_id",
                    "away_team_id",
                    "message"
                  ]
                }
              },
              "existing_conflicts": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "field_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "match_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "scheduled_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "other_match_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "other_scheduled_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "other_tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "field_id",
                    "match_id",
                    "scheduled_at",
                    "tournament_id",
                    "other_match_id",
                    "other_scheduled_at",
                    "other_tournament_id"
                  ]
                }
              }
            },
            "required": [
              "tournament_id",
              "generated_at",
              "rounds",
              "fixtures",
              "home_away_balance",
              "conflicts",
              "existing_conflicts"
            ]
          },
          "created_rounds": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "tenant_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "tournament_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "label": {
                  "type": "string",
                  "minLength": 1
                },
                "order_index": {
                  "type": "integer",
                  "minimum": 0
                },
                "starts_on": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "ends_on": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "tenant_id",
                "tournament_id",
                "label",
                "order_index",
                "starts_on",
                "ends_on"
              ]
            }
          },
          "created_fixtures": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "match_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "tenant_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "tournament_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "round_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "group_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "field_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "scheduled_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "schedule_precision": {
                  "type": "string",
                  "enum": [
                    "exact",
                    "date_only",
                    "unknown"
                  ]
                },
                "scheduled_on": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "state": {
                  "type": "string",
                  "enum": [
                    "scheduled",
                    "live",
                    "ended",
                    "report_draft",
                    "report_submitted",
                    "report_official",
                    "corrected",
                    "cancelled",
                    "postponed"
                  ]
                },
                "home_team_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "away_team_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "version": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "etag": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "required": [
                "match_id",
                "tenant_id",
                "tournament_id",
                "round_id",
                "group_id",
                "field_id",
                "scheduled_at",
                "schedule_precision",
                "scheduled_on",
                "state",
                "home_team_id",
                "away_team_id",
                "version",
                "etag"
              ]
            }
          },
          "skipped": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "sequence": {
                  "type": "integer",
                  "minimum": 0
                },
                "round_index": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "home_team_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "away_team_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "error_code": {
                  "type": "string",
                  "minLength": 1
                },
                "message": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "required": [
                "sequence",
                "round_index",
                "home_team_id",
                "away_team_id",
                "error_code",
                "message"
              ]
            }
          }
        },
        "required": [
          "preview",
          "created_rounds",
          "created_fixtures",
          "skipped"
        ]
      },
      "AdminTeamCreate": {
        "type": "object",
        "properties": {
          "organization_id": {
            "type": "string",
            "format": "uuid"
          },
          "slug": {
            "type": "string",
            "minLength": 2,
            "maxLength": 64,
            "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
          },
          "display_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "short_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 20
          },
          "primary_color": {
            "type": "string",
            "pattern": "^#[0-9A-Fa-f]{6}$"
          },
          "secondary_color": {
            "type": "string",
            "pattern": "^#[0-9A-Fa-f]{6}$"
          },
          "logo_url": {
            "oneOf": [
              {
                "type": "string",
                "format": "uri"
              },
              {
                "type": "null"
              }
            ]
          },
          "media_asset_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "organization_id",
          "slug",
          "display_name",
          "short_name",
          "primary_color",
          "secondary_color"
        ]
      },
      "AdminTeamUpdate": {
        "type": "object",
        "properties": {
          "expected_etag": {
            "type": "string",
            "minLength": 1
          },
          "display_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "short_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 20
          },
          "primary_color": {
            "type": "string",
            "pattern": "^#[0-9A-Fa-f]{6}$"
          },
          "secondary_color": {
            "type": "string",
            "pattern": "^#[0-9A-Fa-f]{6}$"
          },
          "logo_url": {
            "oneOf": [
              {
                "type": "string",
                "format": "uri"
              },
              {
                "type": "null"
              }
            ]
          },
          "media_asset_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "is_active": {
            "type": "boolean"
          }
        },
        "required": []
      },
      "AdminPlayerCreate": {
        "type": "object",
        "properties": {
          "organization_id": {
            "type": "string",
            "format": "uuid"
          },
          "slug": {
            "type": "string",
            "minLength": 2,
            "maxLength": 64,
            "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
          },
          "sport_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "role": {
            "type": "string",
            "enum": [
              "GK",
              "DEF",
              "MID",
              "FWD"
            ]
          },
          "shirt_number": {
            "oneOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 99
              },
              {
                "type": "null"
              }
            ]
          },
          "public_photo_url": {
            "oneOf": [
              {
                "type": "string",
                "format": "uri"
              },
              {
                "type": "null"
              }
            ]
          },
          "is_minor": {
            "type": "boolean"
          }
        },
        "required": [
          "organization_id",
          "slug",
          "sport_name",
          "role",
          "shirt_number",
          "public_photo_url",
          "is_minor"
        ]
      },
      "AdminPlayerUpdate": {
        "type": "object",
        "properties": {
          "expected_etag": {
            "type": "string",
            "minLength": 1
          },
          "slug": {
            "type": "string",
            "minLength": 2,
            "maxLength": 64,
            "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
          },
          "sport_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "role": {
            "type": "string",
            "enum": [
              "GK",
              "DEF",
              "MID",
              "FWD"
            ]
          },
          "shirt_number": {
            "oneOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 99
              },
              {
                "type": "null"
              }
            ]
          },
          "public_photo_url": {
            "oneOf": [
              {
                "type": "string",
                "format": "uri"
              },
              {
                "type": "null"
              }
            ]
          },
          "is_active": {
            "type": "boolean"
          },
          "is_minor": {
            "type": "boolean"
          }
        },
        "required": []
      },
      "AdminFieldCreate": {
        "type": "object",
        "properties": {
          "organization_id": {
            "type": "string",
            "format": "uuid"
          },
          "label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "address": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 400
              },
              {
                "type": "null"
              }
            ]
          },
          "geo_lat": {
            "oneOf": [
              {
                "type": "number",
                "minimum": -90,
                "maximum": 90
              },
              {
                "type": "null"
              }
            ]
          },
          "geo_lng": {
            "oneOf": [
              {
                "type": "number",
                "minimum": -180,
                "maximum": 180
              },
              {
                "type": "null"
              }
            ]
          },
          "surface": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "grass",
                  "synthetic",
                  "mixed",
                  "indoor"
                ]
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "organization_id",
          "label",
          "address",
          "geo_lat",
          "geo_lng",
          "surface"
        ]
      },
      "AdminFieldUpdate": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "address": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 400
              },
              {
                "type": "null"
              }
            ]
          },
          "geo_lat": {
            "oneOf": [
              {
                "type": "number",
                "minimum": -90,
                "maximum": 90
              },
              {
                "type": "null"
              }
            ]
          },
          "geo_lng": {
            "oneOf": [
              {
                "type": "number",
                "minimum": -180,
                "maximum": 180
              },
              {
                "type": "null"
              }
            ]
          },
          "surface": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "grass",
                  "synthetic",
                  "mixed",
                  "indoor"
                ]
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": []
      },
      "AdminFieldRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "organization_id": {
            "type": "string",
            "format": "uuid"
          },
          "label": {
            "type": "string"
          },
          "address": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "geo_lat": {
            "oneOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "geo_lng": {
            "oneOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "surface": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "grass",
                  "synthetic",
                  "mixed",
                  "indoor"
                ]
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "tenant_id",
          "organization_id",
          "label",
          "address",
          "geo_lat",
          "geo_lng",
          "surface"
        ]
      },
      "AdminFieldList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "tenant_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "organization_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "label": {
                  "type": "string"
                },
                "address": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "geo_lat": {
                  "oneOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "geo_lng": {
                  "oneOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "surface": {
                  "oneOf": [
                    {
                      "type": "string",
                      "enum": [
                        "grass",
                        "synthetic",
                        "mixed",
                        "indoor"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "tenant_id",
                "organization_id",
                "label",
                "address",
                "geo_lat",
                "geo_lng",
                "surface"
              ]
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "AdminRosterEntryAdd": {
        "type": "object",
        "properties": {
          "team_id": {
            "type": "string",
            "format": "uuid"
          },
          "player_id": {
            "type": "string",
            "format": "uuid"
          },
          "season_id": {
            "type": "string",
            "format": "uuid"
          },
          "tournament_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "shirt_number": {
            "type": "integer",
            "minimum": 0,
            "maximum": 99
          },
          "from_date": {
            "type": "string",
            "format": "date-time"
          },
          "role_override": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "GK",
                  "DEF",
                  "MID",
                  "FWD"
                ]
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "team_id",
          "player_id",
          "season_id",
          "shirt_number",
          "from_date"
        ]
      },
      "AdminRosterEntryEnd": {
        "type": "object",
        "properties": {
          "to_date": {
            "type": "string",
            "format": "date-time"
          },
          "expected_etag": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "to_date"
        ]
      },
      "AdminRosterEntryClassifyTournament": {
        "type": "object",
        "properties": {
          "tournament_id": {
            "type": "string",
            "format": "uuid"
          },
          "expected_etag": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "tournament_id"
        ]
      },
      "AdminRosterEntryList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "tenant_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "team_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "player_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "season_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "tournament_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "shirt_number": {
                  "type": "integer"
                },
                "from_date": {
                  "type": "string"
                },
                "to_date": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "role_override": {
                  "oneOf": [
                    {
                      "type": "string",
                      "enum": [
                        "GK",
                        "DEF",
                        "MID",
                        "FWD"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "version": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "etag": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "required": [
                "id",
                "tenant_id",
                "team_id",
                "player_id",
                "season_id",
                "tournament_id",
                "shirt_number",
                "from_date",
                "to_date",
                "role_override",
                "version",
                "etag"
              ]
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "offset": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "items",
          "total",
          "limit",
          "offset"
        ]
      },
      "AdminRosterEntryRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "team_id": {
            "type": "string",
            "format": "uuid"
          },
          "player_id": {
            "type": "string",
            "format": "uuid"
          },
          "season_id": {
            "type": "string",
            "format": "uuid"
          },
          "tournament_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "shirt_number": {
            "type": "integer"
          },
          "from_date": {
            "type": "string"
          },
          "to_date": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "role_override": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "GK",
                  "DEF",
                  "MID",
                  "FWD"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "version": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "etag": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "id",
          "tenant_id",
          "team_id",
          "player_id",
          "season_id",
          "tournament_id",
          "shirt_number",
          "from_date",
          "to_date",
          "role_override",
          "version",
          "etag"
        ]
      },
      "AdminRosterTransfer": {
        "type": "object",
        "properties": {
          "source_roster_entry_id": {
            "type": "string",
            "format": "uuid"
          },
          "to_team_id": {
            "type": "string",
            "format": "uuid"
          },
          "tournament_id": {
            "type": "string",
            "format": "uuid"
          },
          "shirt_number": {
            "type": "integer",
            "minimum": 1,
            "maximum": 99
          },
          "effective_at": {
            "type": "string",
            "format": "date-time"
          },
          "idempotency_key": {
            "type": "string",
            "minLength": 8,
            "maxLength": 200
          },
          "role_override": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "GK",
                  "DEF",
                  "MID",
                  "FWD"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "expected_etag": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "source_roster_entry_id",
          "to_team_id",
          "tournament_id",
          "shirt_number",
          "effective_at",
          "idempotency_key"
        ]
      },
      "AdminRosterTransferResponse": {
        "type": "object",
        "properties": {
          "event": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "tenant_id": {
                "type": "string",
                "format": "uuid"
              },
              "season_id": {
                "type": "string",
                "format": "uuid"
              },
              "player_id": {
                "type": "string",
                "format": "uuid"
              },
              "from_team_id": {
                "type": "string",
                "format": "uuid"
              },
              "to_team_id": {
                "type": "string",
                "format": "uuid"
              },
              "source_roster_entry_id": {
                "type": "string",
                "format": "uuid"
              },
              "destination_roster_entry_id": {
                "type": "string",
                "format": "uuid"
              },
              "tournament_id": {
                "type": "string",
                "format": "uuid"
              },
              "effective_at": {
                "type": "string",
                "format": "date-time"
              },
              "registration_deadline_at": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "idempotency_key": {
                "type": "string",
                "minLength": 8,
                "maxLength": 200
              },
              "payload_hash": {
                "type": "string",
                "minLength": 64,
                "maxLength": 64
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "created_by": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "updated_by": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "id",
              "tenant_id",
              "season_id",
              "player_id",
              "from_team_id",
              "to_team_id",
              "source_roster_entry_id",
              "destination_roster_entry_id",
              "tournament_id",
              "effective_at",
              "registration_deadline_at",
              "idempotency_key",
              "payload_hash",
              "created_at",
              "updated_at",
              "created_by",
              "updated_by"
            ]
          },
          "source": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "tenant_id": {
                "type": "string",
                "format": "uuid"
              },
              "season_id": {
                "type": "string",
                "format": "uuid"
              },
              "tournament_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "team_id": {
                "type": "string",
                "format": "uuid"
              },
              "player_id": {
                "type": "string",
                "format": "uuid"
              },
              "shirt_number": {
                "type": "integer",
                "minimum": 1,
                "maximum": 99
              },
              "from_date": {
                "type": "string",
                "format": "date"
              },
              "to_date": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "date"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "role_override": {
                "oneOf": [
                  {
                    "type": "string",
                    "enum": [
                      "GK",
                      "DEF",
                      "MID",
                      "FWD"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "registration_idempotency_key": {
                "type": "string",
                "minLength": 8,
                "maxLength": 200
              },
              "role_projection_revision": {
                "type": "integer",
                "minimum": 0
              },
              "version": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "created_by": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "updated_by": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "etag": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "id",
              "tenant_id",
              "season_id",
              "team_id",
              "player_id",
              "shirt_number",
              "from_date",
              "to_date",
              "role_override",
              "version",
              "created_at",
              "updated_at",
              "created_by",
              "updated_by",
              "etag"
            ]
          },
          "destination": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "tenant_id": {
                "type": "string",
                "format": "uuid"
              },
              "season_id": {
                "type": "string",
                "format": "uuid"
              },
              "tournament_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "team_id": {
                "type": "string",
                "format": "uuid"
              },
              "player_id": {
                "type": "string",
                "format": "uuid"
              },
              "shirt_number": {
                "type": "integer",
                "minimum": 1,
                "maximum": 99
              },
              "from_date": {
                "type": "string",
                "format": "date"
              },
              "to_date": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "date"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "role_override": {
                "oneOf": [
                  {
                    "type": "string",
                    "enum": [
                      "GK",
                      "DEF",
                      "MID",
                      "FWD"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "registration_idempotency_key": {
                "type": "string",
                "minLength": 8,
                "maxLength": 200
              },
              "role_projection_revision": {
                "type": "integer",
                "minimum": 0
              },
              "version": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "created_by": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "updated_by": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "etag": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "id",
              "tenant_id",
              "season_id",
              "team_id",
              "player_id",
              "shirt_number",
              "from_date",
              "to_date",
              "role_override",
              "version",
              "created_at",
              "updated_at",
              "created_by",
              "updated_by",
              "etag"
            ]
          },
          "receipt": {
            "type": "object",
            "properties": {
              "object_id": {
                "type": "string",
                "format": "uuid"
              },
              "tenant_id": {
                "type": "string",
                "format": "uuid"
              },
              "version": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "etag": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "object_id",
              "tenant_id",
              "version",
              "etag"
            ]
          }
        },
        "required": [
          "event",
          "source",
          "destination",
          "receipt"
        ]
      },
      "AdminFixtureSchedule": {
        "type": "object",
        "properties": {
          "tournament_id": {
            "type": "string",
            "format": "uuid"
          },
          "round_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "group_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "field_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "home_team_id": {
            "type": "string",
            "format": "uuid"
          },
          "away_team_id": {
            "type": "string",
            "format": "uuid"
          },
          "scheduled_at": {
            "type": "string",
            "format": "date-time"
          },
          "allow_conflict": {
            "type": "boolean"
          }
        },
        "required": [
          "tournament_id",
          "round_id",
          "group_id",
          "field_id",
          "home_team_id",
          "away_team_id",
          "scheduled_at"
        ]
      },
      "AdminStandingsRecompute": {
        "type": "object",
        "properties": {
          "tournament_id": {
            "type": "string",
            "format": "uuid"
          },
          "group_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "tournament_id",
          "group_id"
        ]
      },
      "AdminStandingsRecomputeResponse": {
        "type": "object",
        "properties": {
          "tournament_id": {
            "type": "string",
            "format": "uuid"
          },
          "group_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "recomputed_at": {
            "type": "string",
            "format": "date-time"
          },
          "items": {
            "type": "array",
            "items": {}
          }
        },
        "required": [
          "tournament_id",
          "group_id",
          "recomputed_at",
          "items"
        ]
      },
      "AdminStandingsTieResolve": {
        "type": "object",
        "properties": {
          "tournament_id": {
            "type": "string",
            "format": "uuid"
          },
          "group_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "team_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "minItems": 2
          },
          "ordered_team_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "minItems": 2
          },
          "decision": {
            "type": "string",
            "enum": [
              "manual",
              "draw"
            ]
          },
          "reason": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1000
          }
        },
        "required": [
          "tournament_id",
          "group_id",
          "team_ids",
          "ordered_team_ids",
          "decision",
          "reason"
        ]
      },
      "AdminStandingsTieResolutionRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "tournament_id": {
            "type": "string",
            "format": "uuid"
          },
          "group_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "team_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "minItems": 2
          },
          "ordered_team_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "minItems": 2
          },
          "decision": {
            "type": "string",
            "enum": [
              "manual",
              "draw"
            ]
          },
          "reason": {
            "type": "string",
            "minLength": 1
          },
          "business_signature": {
            "type": "string",
            "minLength": 1
          },
          "version": {
            "type": "number",
            "enum": [
              1
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "tenant_id",
          "tournament_id",
          "group_id",
          "team_ids",
          "ordered_team_ids",
          "decision",
          "reason",
          "business_signature",
          "version",
          "created_at",
          "created_by"
        ]
      },
      "AdminStandingsTieResolveResponse": {
        "type": "object",
        "properties": {
          "resolution": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "tenant_id": {
                "type": "string",
                "format": "uuid"
              },
              "tournament_id": {
                "type": "string",
                "format": "uuid"
              },
              "group_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "team_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                },
                "minItems": 2
              },
              "ordered_team_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                },
                "minItems": 2
              },
              "decision": {
                "type": "string",
                "enum": [
                  "manual",
                  "draw"
                ]
              },
              "reason": {
                "type": "string",
                "minLength": 1
              },
              "business_signature": {
                "type": "string",
                "minLength": 1
              },
              "version": {
                "type": "number",
                "enum": [
                  1
                ]
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "created_by": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "id",
              "tenant_id",
              "tournament_id",
              "group_id",
              "team_ids",
              "ordered_team_ids",
              "decision",
              "reason",
              "business_signature",
              "version",
              "created_at",
              "created_by"
            ]
          },
          "replayed": {
            "type": "boolean"
          },
          "recomputed_at": {
            "type": "string",
            "format": "date-time"
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "tenant_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "tournament_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "group_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "phase_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "scope": {
                  "type": "string",
                  "enum": [
                    "competition",
                    "group"
                  ]
                },
                "team_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "played": {
                  "type": "integer",
                  "minimum": 0
                },
                "won": {
                  "type": "integer",
                  "minimum": 0
                },
                "drawn": {
                  "type": "integer",
                  "minimum": 0
                },
                "lost": {
                  "type": "integer",
                  "minimum": 0
                },
                "goals_for": {
                  "type": "integer",
                  "minimum": 0
                },
                "goals_against": {
                  "type": "integer",
                  "minimum": 0
                },
                "goal_difference": {
                  "type": "integer"
                },
                "points": {
                  "type": "integer"
                },
                "points_on_field": {
                  "type": "integer"
                },
                "position": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "ranking_status": {
                  "type": "string",
                  "enum": [
                    "pending_resolution"
                  ]
                },
                "form": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "W",
                      "D",
                      "L"
                    ]
                  },
                  "maxItems": 5,
                  "default": []
                },
                "points_adjustment": {
                  "type": "integer"
                },
                "projection_revision_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "ruleset_revision_id": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "required": [
                "tenant_id",
                "tournament_id",
                "group_id",
                "team_id",
                "played",
                "won",
                "drawn",
                "lost",
                "goals_for",
                "goals_against",
                "goal_difference",
                "points",
                "position"
              ]
            }
          }
        },
        "required": [
          "resolution",
          "replayed",
          "recomputed_at",
          "items"
        ]
      },
      "AdminMatchAssignmentDesignate": {
        "type": "object",
        "properties": {
          "match_id": {
            "type": "string",
            "format": "uuid"
          },
          "user_id": {
            "type": "string",
            "format": "uuid"
          },
          "role": {
            "type": "string",
            "enum": [
              "referee",
              "assistant_referee",
              "scorer",
              "evaluator",
              "media_operator"
            ]
          },
          "acceptance_deadline_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "match_id",
          "user_id",
          "role"
        ]
      },
      "AdminMatchAssignmentNoShow": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          }
        },
        "required": [
          "reason"
        ]
      },
      "AdminMatchAssignmentReplace": {
        "type": "object",
        "properties": {
          "user_id": {
            "type": "string",
            "format": "uuid"
          },
          "reason": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          }
        },
        "required": [
          "user_id",
          "reason"
        ]
      },
      "AdminMedicalEligibilitySet": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "valid",
              "expired",
              "suspended",
              "missing"
            ]
          },
          "valid_until": {
            "oneOf": [
              {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "note": {
            "oneOf": [
              {
                "type": "string",
                "maxLength": 280
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "status",
          "valid_until"
        ]
      },
      "AdminMedicalEligibilityRow": {
        "type": "object",
        "properties": {
          "player_id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "enum": [
              "valid",
              "expired",
              "suspended",
              "missing"
            ]
          },
          "valid_until": {
            "oneOf": [
              {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "note": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "player_id",
          "status",
          "valid_until",
          "note",
          "updated_at"
        ]
      },
      "AdminMedicalRegistryRow": {
        "type": "object",
        "properties": {
          "player_id": {
            "type": "string",
            "format": "uuid"
          },
          "sport_name": {
            "type": "string",
            "minLength": 1
          },
          "slug": {
            "type": "string",
            "minLength": 2,
            "maxLength": 64,
            "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
          },
          "organization_id": {
            "type": "string",
            "format": "uuid"
          },
          "team_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "team_label": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "state": {
            "type": "string",
            "enum": [
              "eligible",
              "expiring",
              "expired",
              "blocked",
              "declared_missing",
              "not_recorded"
            ]
          },
          "recorded_status": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "valid",
                  "expired",
                  "suspended",
                  "missing"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "valid_until": {
            "oneOf": [
              {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "days_to_expiry": {
            "oneOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "has_note": {
            "type": "boolean"
          },
          "lineup_blocked": {
            "type": "boolean"
          },
          "is_minor": {
            "type": "boolean"
          },
          "updated_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "player_id",
          "sport_name",
          "slug",
          "organization_id",
          "team_id",
          "team_label",
          "state",
          "recorded_status",
          "valid_until",
          "days_to_expiry",
          "has_note",
          "lineup_blocked",
          "is_minor",
          "updated_at"
        ]
      },
      "AdminMedicalRegistryList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "player_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "sport_name": {
                  "type": "string",
                  "minLength": 1
                },
                "slug": {
                  "type": "string",
                  "minLength": 2,
                  "maxLength": 64,
                  "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
                },
                "organization_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "team_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "team_label": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "state": {
                  "type": "string",
                  "enum": [
                    "eligible",
                    "expiring",
                    "expired",
                    "blocked",
                    "declared_missing",
                    "not_recorded"
                  ]
                },
                "recorded_status": {
                  "oneOf": [
                    {
                      "type": "string",
                      "enum": [
                        "valid",
                        "expired",
                        "suspended",
                        "missing"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "valid_until": {
                  "oneOf": [
                    {
                      "type": "string",
                      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "days_to_expiry": {
                  "oneOf": [
                    {
                      "type": "integer"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "has_note": {
                  "type": "boolean"
                },
                "lineup_blocked": {
                  "type": "boolean"
                },
                "is_minor": {
                  "type": "boolean"
                },
                "updated_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "player_id",
                "sport_name",
                "slug",
                "organization_id",
                "team_id",
                "team_label",
                "state",
                "recorded_status",
                "valid_until",
                "days_to_expiry",
                "has_note",
                "lineup_blocked",
                "is_minor",
                "updated_at"
              ]
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "offset": {
            "type": "integer",
            "minimum": 0
          },
          "counts": {
            "type": "object",
            "properties": {
              "eligible": {
                "type": "integer",
                "minimum": 0
              },
              "expiring": {
                "type": "integer",
                "minimum": 0
              },
              "expired": {
                "type": "integer",
                "minimum": 0
              },
              "blocked": {
                "type": "integer",
                "minimum": 0
              },
              "declared_missing": {
                "type": "integer",
                "minimum": 0
              },
              "not_recorded": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "eligible",
              "expiring",
              "expired",
              "blocked",
              "declared_missing",
              "not_recorded"
            ]
          },
          "as_of_date": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          }
        },
        "required": [
          "items",
          "total",
          "limit",
          "offset",
          "counts",
          "as_of_date"
        ]
      },
      "AdminMedicalRegistryDetail": {
        "type": "object",
        "properties": {
          "row": {
            "type": "object",
            "properties": {
              "player_id": {
                "type": "string",
                "format": "uuid"
              },
              "sport_name": {
                "type": "string",
                "minLength": 1
              },
              "slug": {
                "type": "string",
                "minLength": 2,
                "maxLength": 64,
                "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
              },
              "organization_id": {
                "type": "string",
                "format": "uuid"
              },
              "team_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "team_label": {
                "oneOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "state": {
                "type": "string",
                "enum": [
                  "eligible",
                  "expiring",
                  "expired",
                  "blocked",
                  "declared_missing",
                  "not_recorded"
                ]
              },
              "recorded_status": {
                "oneOf": [
                  {
                    "type": "string",
                    "enum": [
                      "valid",
                      "expired",
                      "suspended",
                      "missing"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "valid_until": {
                "oneOf": [
                  {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "days_to_expiry": {
                "oneOf": [
                  {
                    "type": "integer"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "has_note": {
                "type": "boolean"
              },
              "lineup_blocked": {
                "type": "boolean"
              },
              "is_minor": {
                "type": "boolean"
              },
              "updated_at": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "player_id",
              "sport_name",
              "slug",
              "organization_id",
              "team_id",
              "team_label",
              "state",
              "recorded_status",
              "valid_until",
              "days_to_expiry",
              "has_note",
              "lineup_blocked",
              "is_minor",
              "updated_at"
            ]
          },
          "note": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "as_of_date": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          }
        },
        "required": [
          "row",
          "note",
          "as_of_date"
        ]
      },
      "AdminMatchAssignmentRevoke": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          }
        },
        "required": [
          "reason"
        ]
      },
      "AdminMatchAssignmentRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "match_id": {
            "type": "string",
            "format": "uuid"
          },
          "user_id": {
            "type": "string",
            "format": "uuid"
          },
          "role": {
            "type": "string",
            "enum": [
              "referee",
              "assistant_referee",
              "scorer",
              "evaluator",
              "media_operator"
            ]
          },
          "confirmed_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "revoked_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "acceptance_deadline_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "no_show_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "no_show_reason": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "replaces_assignment_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "tenant_id",
          "match_id",
          "user_id",
          "role",
          "confirmed_at",
          "revoked_at",
          "acceptance_deadline_at",
          "no_show_at",
          "no_show_reason",
          "replaces_assignment_id",
          "created_at",
          "updated_at"
        ]
      },
      "AdminMatchAssignmentList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "tenant_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "match_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "user_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "role": {
                  "type": "string",
                  "enum": [
                    "referee",
                    "assistant_referee",
                    "scorer",
                    "evaluator",
                    "media_operator"
                  ]
                },
                "confirmed_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "revoked_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "acceptance_deadline_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "no_show_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "no_show_reason": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "replaces_assignment_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "id",
                "tenant_id",
                "match_id",
                "user_id",
                "role",
                "confirmed_at",
                "revoked_at",
                "acceptance_deadline_at",
                "no_show_at",
                "no_show_reason",
                "replaces_assignment_id",
                "created_at",
                "updated_at"
              ]
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "MeMatchAssignmentList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "tenant_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "match_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "user_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "role": {
                  "type": "string",
                  "enum": [
                    "referee",
                    "assistant_referee",
                    "scorer",
                    "evaluator",
                    "media_operator"
                  ]
                },
                "confirmed_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "revoked_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "acceptance_deadline_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "no_show_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "no_show_reason": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "replaces_assignment_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "id",
                "tenant_id",
                "match_id",
                "user_id",
                "role",
                "confirmed_at",
                "revoked_at",
                "acceptance_deadline_at",
                "no_show_at",
                "no_show_reason",
                "replaces_assignment_id",
                "created_at",
                "updated_at"
              ]
            }
          },
          "withheld": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "assignment_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "match_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "role": {
                  "type": "string",
                  "enum": [
                    "referee",
                    "assistant_referee",
                    "scorer",
                    "evaluator",
                    "media_operator"
                  ]
                },
                "reason": {
                  "type": "string",
                  "enum": [
                    "synthetic_fixture",
                    "match_not_found"
                  ]
                }
              },
              "required": [
                "assignment_id",
                "match_id",
                "role",
                "reason"
              ]
            }
          }
        },
        "required": [
          "items",
          "withheld"
        ]
      },
      "AdminMatchStateTransitionRequest": {
        "type": "object",
        "properties": {
          "state": {
            "type": "string",
            "enum": [
              "live",
              "ended"
            ]
          },
          "ended_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "state"
        ]
      },
      "FantasyStatisticsCompletenessConfirmRequest": {
        "type": "object",
        "properties": {
          "report_version_id": {
            "type": "string",
            "format": "uuid"
          },
          "includes_verified_zeros": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "verified_stats": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "penalties",
                "own_goals",
                "goalkeepers",
                "mvp",
                "assists"
              ]
            },
            "maxItems": 5
          }
        },
        "required": [
          "report_version_id",
          "includes_verified_zeros"
        ]
      },
      "FantasyStatisticsCompletenessReceipt": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "match_id": {
            "type": "string",
            "format": "uuid"
          },
          "report_version_id": {
            "type": "string",
            "format": "uuid"
          },
          "confirmed_by": {
            "type": "string",
            "format": "uuid"
          },
          "confirmed_at": {
            "type": "string",
            "format": "date-time"
          },
          "includes_verified_zeros": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "verified_stats": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "penalties",
                "own_goals",
                "goalkeepers",
                "mvp",
                "assists"
              ]
            }
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "updated_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "tenant_id",
          "match_id",
          "report_version_id",
          "confirmed_by",
          "confirmed_at",
          "includes_verified_zeros",
          "created_at",
          "updated_at",
          "created_by",
          "updated_by"
        ]
      },
      "OfficialPostMatchStartRequest": {
        "type": "object",
        "properties": {
          "ended_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": []
      },
      "OfficialPostMatchStartResponse": {
        "type": "object",
        "properties": {
          "match_id": {
            "type": "string",
            "format": "uuid"
          },
          "state": {
            "type": "string",
            "enum": [
              "ended"
            ]
          },
          "started_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "match_id",
          "state",
          "started_at"
        ]
      },
      "MatchAssignmentDecline": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          }
        },
        "required": [
          "reason"
        ]
      },
      "MatchEvent": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "match_id": {
            "type": "string",
            "format": "uuid"
          },
          "sequence": {
            "type": "integer",
            "minimum": 0
          },
          "type": {
            "type": "string",
            "enum": [
              "goal",
              "own_goal",
              "assist",
              "yellow_card",
              "red_card",
              "second_yellow",
              "substitution_in",
              "substitution_out",
              "penalty_scored",
              "penalty_missed",
              "penalty_saved",
              "goal_conceded",
              "period_start",
              "period_end",
              "match_start",
              "match_end",
              "injury_pause",
              "note"
            ]
          },
          "occurred_at": {
            "type": "string",
            "format": "date-time"
          },
          "minute": {
            "oneOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 120
              },
              {
                "type": "null"
              }
            ]
          },
          "side": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "home",
                  "away"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "primary_player_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "secondary_player_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "note": {
            "oneOf": [
              {
                "type": "string",
                "maxLength": 280
              },
              {
                "type": "null"
              }
            ]
          },
          "reason_code": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 120
              },
              {
                "type": "null"
              }
            ]
          },
          "author_user_id": {
            "type": "string",
            "format": "uuid"
          },
          "idempotency_key": {
            "type": "string",
            "minLength": 8
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "updated_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "tenant_id",
          "match_id",
          "sequence",
          "type",
          "occurred_at",
          "minute",
          "side",
          "primary_player_id",
          "secondary_player_id",
          "note",
          "author_user_id",
          "idempotency_key",
          "created_at",
          "updated_at",
          "created_by",
          "updated_by"
        ]
      },
      "MatchEventAppendRequest": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "goal",
              "own_goal",
              "assist",
              "yellow_card",
              "red_card",
              "second_yellow",
              "substitution_in",
              "substitution_out",
              "penalty_scored",
              "penalty_missed",
              "penalty_saved",
              "goal_conceded",
              "period_start",
              "period_end",
              "match_start",
              "match_end",
              "injury_pause",
              "note"
            ]
          },
          "occurred_at": {
            "type": "string",
            "format": "date-time"
          },
          "minute": {
            "oneOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 120
              },
              {
                "type": "null"
              }
            ]
          },
          "side": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "home",
                  "away"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "primary_player_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "secondary_player_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "note": {
            "oneOf": [
              {
                "type": "string",
                "maxLength": 280
              },
              {
                "type": "null"
              }
            ]
          },
          "reason_code": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 120
              },
              {
                "type": "null"
              }
            ]
          },
          "idempotency_key": {
            "type": "string",
            "minLength": 8
          }
        },
        "required": [
          "type",
          "occurred_at",
          "minute",
          "side",
          "primary_player_id",
          "secondary_player_id",
          "note",
          "idempotency_key"
        ]
      },
      "MatchEventRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "match_id": {
            "type": "string",
            "format": "uuid"
          },
          "sequence": {
            "type": "integer",
            "minimum": 0
          },
          "type": {
            "type": "string",
            "enum": [
              "goal",
              "own_goal",
              "assist",
              "yellow_card",
              "red_card",
              "second_yellow",
              "substitution_in",
              "substitution_out",
              "penalty_scored",
              "penalty_missed",
              "penalty_saved",
              "goal_conceded",
              "period_start",
              "period_end",
              "match_start",
              "match_end",
              "injury_pause",
              "note"
            ]
          },
          "occurred_at": {
            "type": "string",
            "format": "date-time"
          },
          "minute": {
            "oneOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 120
              },
              {
                "type": "null"
              }
            ]
          },
          "side": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "home",
                  "away"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "primary_player_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "secondary_player_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "note": {
            "oneOf": [
              {
                "type": "string",
                "maxLength": 280
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "match_id",
          "sequence",
          "type",
          "occurred_at",
          "minute",
          "side",
          "primary_player_id",
          "secondary_player_id",
          "note",
          "created_at"
        ]
      },
      "MatchEventList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "match_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "sequence": {
                  "type": "integer",
                  "minimum": 0
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "goal",
                    "own_goal",
                    "assist",
                    "yellow_card",
                    "red_card",
                    "second_yellow",
                    "substitution_in",
                    "substitution_out",
                    "penalty_scored",
                    "penalty_missed",
                    "penalty_saved",
                    "goal_conceded",
                    "period_start",
                    "period_end",
                    "match_start",
                    "match_end",
                    "injury_pause",
                    "note"
                  ]
                },
                "occurred_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "minute": {
                  "oneOf": [
                    {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 120
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "side": {
                  "oneOf": [
                    {
                      "type": "string",
                      "enum": [
                        "home",
                        "away"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "primary_player_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "secondary_player_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "note": {
                  "oneOf": [
                    {
                      "type": "string",
                      "maxLength": 280
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "id",
                "match_id",
                "sequence",
                "type",
                "occurred_at",
                "minute",
                "side",
                "primary_player_id",
                "secondary_player_id",
                "note",
                "created_at"
              ]
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "PublicMatchEventRow": {
        "type": "object",
        "properties": {
          "event_id": {
            "type": "string",
            "format": "uuid"
          },
          "match_id": {
            "type": "string",
            "format": "uuid"
          },
          "sequence": {
            "type": "integer",
            "minimum": 0
          },
          "type": {
            "type": "string",
            "enum": [
              "goal",
              "own_goal",
              "assist",
              "yellow_card",
              "red_card",
              "second_yellow",
              "substitution_in",
              "substitution_out",
              "penalty_scored",
              "penalty_missed",
              "penalty_saved",
              "goal_conceded",
              "period_start",
              "period_end",
              "match_start",
              "match_end",
              "injury_pause",
              "note"
            ]
          },
          "minute": {
            "oneOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 120
              },
              {
                "type": "null"
              }
            ]
          },
          "side": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "home",
                  "away"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "primary_player_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "secondary_player_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "clock_anchor_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "event_id",
          "match_id",
          "sequence",
          "type",
          "minute",
          "side",
          "primary_player_id",
          "secondary_player_id",
          "clock_anchor_at"
        ]
      },
      "PublicMatchEventList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "event_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "match_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "sequence": {
                  "type": "integer",
                  "minimum": 0
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "goal",
                    "own_goal",
                    "assist",
                    "yellow_card",
                    "red_card",
                    "second_yellow",
                    "substitution_in",
                    "substitution_out",
                    "penalty_scored",
                    "penalty_missed",
                    "penalty_saved",
                    "goal_conceded",
                    "period_start",
                    "period_end",
                    "match_start",
                    "match_end",
                    "injury_pause",
                    "note"
                  ]
                },
                "minute": {
                  "oneOf": [
                    {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 120
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "side": {
                  "oneOf": [
                    {
                      "type": "string",
                      "enum": [
                        "home",
                        "away"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "primary_player_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "secondary_player_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "clock_anchor_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "event_id",
                "match_id",
                "sequence",
                "type",
                "minute",
                "side",
                "primary_player_id",
                "secondary_player_id",
                "clock_anchor_at"
              ]
            }
          },
          "generated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "items"
        ]
      },
      "OfflineCommandSubmitRequest": {
        "type": "object",
        "properties": {
          "client_command_id": {
            "type": "string",
            "format": "uuid"
          },
          "device_id": {
            "type": "string",
            "minLength": 4,
            "maxLength": 128
          },
          "device_sequence": {
            "type": "integer",
            "minimum": 0
          },
          "base_event_sequence": {
            "oneOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "idempotency_key": {
            "type": "string",
            "minLength": 8
          },
          "kind": {
            "type": "string",
            "enum": [
              "match_event_append",
              "lineup_submit",
              "report_draft_save",
              "report_submit",
              "rating_draft_save"
            ]
          },
          "payload": {
            "type": "object",
            "additionalProperties": true
          },
          "submitted_at": {
            "type": "string",
            "format": "date-time"
          },
          "requires_review": {
            "type": "boolean"
          }
        },
        "required": [
          "client_command_id",
          "device_id",
          "device_sequence",
          "idempotency_key",
          "kind",
          "payload",
          "submitted_at"
        ]
      },
      "OfflineCommandRow": {
        "type": "object",
        "properties": {
          "client_command_id": {
            "type": "string",
            "format": "uuid"
          },
          "server_command_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "match_id": {
            "type": "string",
            "format": "uuid"
          },
          "device_id": {
            "type": "string",
            "minLength": 4,
            "maxLength": 128
          },
          "device_sequence": {
            "type": "integer",
            "minimum": 0
          },
          "base_event_sequence": {
            "oneOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "kind": {
            "type": "string",
            "enum": [
              "match_event_append",
              "lineup_submit",
              "report_draft_save",
              "report_submit",
              "rating_draft_save"
            ]
          },
          "submitted_at": {
            "type": "string",
            "format": "date-time"
          },
          "accepted_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "conflict_state": {
            "type": "string",
            "enum": [
              "none",
              "duplicate",
              "stale",
              "rejected",
              "manual_review"
            ]
          },
          "sync_status": {
            "type": "string",
            "enum": [
              "queued",
              "sent",
              "accepted",
              "rejected"
            ]
          },
          "applied_event_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "resolution": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "pending",
                  "accepted",
                  "rejected"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "resolved_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "client_command_id",
          "server_command_id",
          "match_id",
          "device_id",
          "device_sequence",
          "base_event_sequence",
          "kind",
          "submitted_at",
          "accepted_at",
          "conflict_state",
          "sync_status",
          "applied_event_id",
          "resolution",
          "resolved_at"
        ]
      },
      "OfflineCommandList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "client_command_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "server_command_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "match_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "device_id": {
                  "type": "string",
                  "minLength": 4,
                  "maxLength": 128
                },
                "device_sequence": {
                  "type": "integer",
                  "minimum": 0
                },
                "base_event_sequence": {
                  "oneOf": [
                    {
                      "type": "integer",
                      "minimum": 0
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "match_event_append",
                    "lineup_submit",
                    "report_draft_save",
                    "report_submit",
                    "rating_draft_save"
                  ]
                },
                "submitted_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "accepted_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "conflict_state": {
                  "type": "string",
                  "enum": [
                    "none",
                    "duplicate",
                    "stale",
                    "rejected",
                    "manual_review"
                  ]
                },
                "sync_status": {
                  "type": "string",
                  "enum": [
                    "queued",
                    "sent",
                    "accepted",
                    "rejected"
                  ]
                },
                "applied_event_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "resolution": {
                  "oneOf": [
                    {
                      "type": "string",
                      "enum": [
                        "pending",
                        "accepted",
                        "rejected"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "resolved_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "client_command_id",
                "server_command_id",
                "match_id",
                "device_id",
                "device_sequence",
                "base_event_sequence",
                "kind",
                "submitted_at",
                "accepted_at",
                "conflict_state",
                "sync_status",
                "applied_event_id",
                "resolution",
                "resolved_at"
              ]
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "AdminOfflineCommandResolveRequest": {
        "type": "object",
        "properties": {
          "decision": {
            "type": "string",
            "enum": [
              "accept",
              "reject"
            ]
          },
          "reason": {
            "type": "string",
            "minLength": 3,
            "maxLength": 500
          }
        },
        "required": [
          "decision",
          "reason"
        ]
      },
      "AssignedReportContext": {
        "type": "object",
        "properties": {
          "match_id": {
            "type": "string",
            "format": "uuid"
          },
          "report_version": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "match_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "version": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "draft",
                      "submitted",
                      "official",
                      "superseded"
                    ]
                  },
                  "score_home": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "score_away": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "ended_after": {
                    "type": "string",
                    "enum": [
                      "regulation",
                      "extra_time",
                      "penalties"
                    ]
                  },
                  "penalty_shootout": {
                    "type": "object",
                    "properties": {
                      "home": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "away": {
                        "type": "integer",
                        "minimum": 0
                      }
                    },
                    "required": [
                      "home",
                      "away"
                    ]
                  },
                  "event_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "source_event_sequence": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "required": [
                  "id",
                  "match_id",
                  "version",
                  "status",
                  "score_home",
                  "score_away",
                  "event_ids"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "score_home": {
            "type": "integer",
            "minimum": 0
          },
          "score_away": {
            "type": "integer",
            "minimum": 0
          },
          "ended_after": {
            "type": "string",
            "enum": [
              "regulation",
              "extra_time",
              "penalties"
            ]
          },
          "penalty_shootout": {
            "type": "object",
            "properties": {
              "home": {
                "type": "integer",
                "minimum": 0
              },
              "away": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "home",
              "away"
            ]
          },
          "event_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "event_sequence": {
            "type": "integer",
            "minimum": 0
          },
          "amendments": {
            "type": "object",
            "properties": {
              "policy": {
                "type": "object",
                "properties": {
                  "state": {
                    "type": "string",
                    "enum": [
                      "enabled",
                      "disabled"
                    ]
                  },
                  "reason": {
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "owner_gate": {
                    "type": "string",
                    "enum": [
                      "OG-18"
                    ]
                  },
                  "allowed_operations": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "add",
                        "replace",
                        "void"
                      ]
                    }
                  },
                  "window_minutes_after_homologation": {
                    "oneOf": [
                      {
                        "type": "integer",
                        "minimum": 0
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "source": {
                    "oneOf": [
                      {
                        "type": "string",
                        "enum": [
                          "competition_override",
                          "platform_default"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "closes_at": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "date-time"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "state",
                  "reason",
                  "owner_gate",
                  "allowed_operations",
                  "window_minutes_after_homologation",
                  "source",
                  "closes_at"
                ]
              },
              "own_open_requests": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "kind": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "requested_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "summary": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "kind",
                    "status",
                    "requested_at",
                    "summary"
                  ]
                }
              }
            },
            "required": [
              "policy",
              "own_open_requests"
            ]
          }
        },
        "required": [
          "match_id",
          "report_version",
          "score_home",
          "score_away",
          "event_ids",
          "event_sequence"
        ]
      },
      "EvaluatorMatchContext": {
        "type": "object",
        "properties": {
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "match_id": {
            "type": "string",
            "format": "uuid"
          },
          "state": {
            "type": "string",
            "enum": [
              "scheduled",
              "live",
              "ended",
              "report_draft",
              "report_submitted",
              "report_official",
              "corrected",
              "cancelled",
              "postponed"
            ]
          },
          "scheduled_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "schedule_precision": {
            "type": "string",
            "enum": [
              "exact",
              "date_only",
              "unknown"
            ]
          },
          "scheduled_on": {
            "oneOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ]
          },
          "score_home": {
            "oneOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "score_away": {
            "oneOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "home_team": {
            "type": "object",
            "properties": {
              "tenant_id": {
                "type": "string",
                "format": "uuid"
              },
              "team_id": {
                "type": "string",
                "format": "uuid"
              },
              "display_name": {
                "type": "string",
                "minLength": 1
              },
              "short_name": {
                "type": "string",
                "minLength": 1
              },
              "logo_url": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uri"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "tenant_id",
              "team_id",
              "display_name",
              "short_name",
              "logo_url"
            ]
          },
          "away_team": {
            "type": "object",
            "properties": {
              "tenant_id": {
                "type": "string",
                "format": "uuid"
              },
              "team_id": {
                "type": "string",
                "format": "uuid"
              },
              "display_name": {
                "type": "string",
                "minLength": 1
              },
              "short_name": {
                "type": "string",
                "minLength": 1
              },
              "logo_url": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uri"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "tenant_id",
              "team_id",
              "display_name",
              "short_name",
              "logo_url"
            ]
          },
          "players": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "tenant_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "player_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "team_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "side": {
                  "type": "string",
                  "enum": [
                    "home",
                    "away"
                  ]
                },
                "display_name": {
                  "type": "string",
                  "minLength": 1
                },
                "public_photo_url": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uri"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "avatar_head_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "enum": [
                        "head-01",
                        "head-02",
                        "head-03",
                        "head-04",
                        "head-05",
                        "head-06",
                        "head-07",
                        "head-08",
                        "head-09",
                        "head-10",
                        "head-11",
                        "head-12",
                        "head-13",
                        "head-14",
                        "head-15",
                        "head-16",
                        "head-17",
                        "head-18",
                        "head-19",
                        "head-20",
                        "head-21",
                        "head-22",
                        "head-23",
                        "head-24",
                        "head-25",
                        "head-26",
                        "head-27",
                        "head-28",
                        "head-29",
                        "head-30",
                        "head-31",
                        "head-32",
                        "head-33",
                        "head-34",
                        "head-35",
                        "head-36",
                        "head-37",
                        "head-38",
                        "head-39",
                        "head-40",
                        "head-41",
                        "head-42",
                        "head-43",
                        "head-44",
                        "head-45",
                        "head-46",
                        "head-47",
                        "head-48",
                        "head-49",
                        "head-50",
                        "head-51",
                        "head-52",
                        "head-53",
                        "head-54",
                        "head-55",
                        "head-56",
                        "head-57",
                        "head-58",
                        "head-59",
                        "head-60",
                        "head-61",
                        "head-62",
                        "head-63",
                        "head-64",
                        "head-65",
                        "head-66",
                        "head-67",
                        "head-68",
                        "head-69",
                        "head-70",
                        "head-71",
                        "head-72",
                        "head-73",
                        "head-74",
                        "head-75",
                        "head-76",
                        "head-77",
                        "head-78",
                        "head-79",
                        "head-80",
                        "head-81",
                        "head-82",
                        "head-83",
                        "head-84",
                        "head-85",
                        "head-86",
                        "head-87",
                        "head-88",
                        "head-89",
                        "head-90",
                        "head-91",
                        "head-92",
                        "head-93",
                        "head-94",
                        "head-95",
                        "head-96",
                        "head-97",
                        "head-98",
                        "head-99",
                        "head-100",
                        "head-101",
                        "head-102",
                        "head-103",
                        "head-104",
                        "head-105",
                        "head-106",
                        "head-107",
                        "head-108",
                        "head-109",
                        "head-110",
                        "head-111",
                        "head-112",
                        "head-113",
                        "head-114",
                        "head-115",
                        "head-116",
                        "head-117",
                        "head-118",
                        "head-119",
                        "head-120",
                        "head-121",
                        "head-122",
                        "head-123",
                        "head-124",
                        "head-125",
                        "head-126",
                        "head-127",
                        "head-128",
                        "head-129",
                        "head-130",
                        "head-131",
                        "head-132",
                        "head-133",
                        "head-134",
                        "head-135",
                        "head-136",
                        "head-137",
                        "head-138",
                        "head-139",
                        "head-140",
                        "head-141",
                        "head-142",
                        "head-143",
                        "head-144",
                        "head-145",
                        "head-146",
                        "head-147",
                        "head-148",
                        "head-149",
                        "head-150",
                        "head-151",
                        "head-152",
                        "head-153",
                        "head-154",
                        "head-155",
                        "head-156",
                        "head-157",
                        "head-158",
                        "head-159",
                        "head-160",
                        "head-161",
                        "head-162",
                        "head-163",
                        "head-164",
                        "head-165",
                        "head-166",
                        "head-167",
                        "head-168",
                        "head-169",
                        "head-170",
                        "head-171",
                        "head-172",
                        "head-173",
                        "head-174",
                        "head-175",
                        "head-176",
                        "head-177",
                        "head-178",
                        "head-179",
                        "head-180",
                        "head-181",
                        "head-182",
                        "head-183"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "shirt_number": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 99
                },
                "role": {
                  "oneOf": [
                    {
                      "type": "string",
                      "enum": [
                        "GK",
                        "DEF",
                        "MID",
                        "FWD"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "starting": {
                  "type": "boolean"
                },
                "captain": {
                  "type": "boolean"
                },
                "participation": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "enum": [
                            "not_listed"
                          ]
                        },
                        "lineup_entry_id": {
                          "type": "null"
                        },
                        "player_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "in_lineup": {
                          "type": "boolean",
                          "enum": [
                            false
                          ]
                        },
                        "starting": {
                          "type": "boolean",
                          "enum": [
                            false
                          ]
                        },
                        "entered": {
                          "type": "boolean",
                          "enum": [
                            false
                          ]
                        },
                        "minutes_played": {
                          "type": "number",
                          "enum": [
                            0
                          ]
                        },
                        "intervals": {
                          "type": "array",
                          "prefixItems": []
                        }
                      },
                      "required": [
                        "status",
                        "lineup_entry_id",
                        "player_id",
                        "in_lineup",
                        "starting",
                        "entered",
                        "minutes_played",
                        "intervals"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "lineup_entry_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "player_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "in_lineup": {
                          "type": "boolean",
                          "enum": [
                            true
                          ]
                        },
                        "minutes_played": {
                          "oneOf": [
                            {
                              "type": "integer",
                              "minimum": 0
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "intervals": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "entered_at": {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "period"
                                    ]
                                  },
                                  "period": {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "kind": {
                                            "type": "string",
                                            "enum": [
                                              "regulation"
                                            ]
                                          },
                                          "number": {
                                            "type": "integer",
                                            "minimum": 1,
                                            "maximum": 4
                                          }
                                        },
                                        "required": [
                                          "kind",
                                          "number"
                                        ]
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "kind": {
                                            "type": "string",
                                            "enum": [
                                              "extra_time"
                                            ]
                                          },
                                          "number": {
                                            "type": "integer",
                                            "minimum": 1,
                                            "maximum": 2
                                          }
                                        },
                                        "required": [
                                          "kind",
                                          "number"
                                        ]
                                      }
                                    ]
                                  },
                                  "minute": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "stoppage_minute": {
                                    "type": "integer",
                                    "minimum": 0
                                  }
                                },
                                "required": [
                                  "kind",
                                  "period",
                                  "minute",
                                  "stoppage_minute"
                                ]
                              },
                              "left_at": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "period"
                                        ]
                                      },
                                      "period": {
                                        "oneOf": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "kind": {
                                                "type": "string",
                                                "enum": [
                                                  "regulation"
                                                ]
                                              },
                                              "number": {
                                                "type": "integer",
                                                "minimum": 1,
                                                "maximum": 4
                                              }
                                            },
                                            "required": [
                                              "kind",
                                              "number"
                                            ]
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "kind": {
                                                "type": "string",
                                                "enum": [
                                                  "extra_time"
                                                ]
                                              },
                                              "number": {
                                                "type": "integer",
                                                "minimum": 1,
                                                "maximum": 2
                                              }
                                            },
                                            "required": [
                                              "kind",
                                              "number"
                                            ]
                                          }
                                        ]
                                      },
                                      "minute": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "stoppage_minute": {
                                        "type": "integer",
                                        "minimum": 0
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "period",
                                      "minute",
                                      "stoppage_minute"
                                    ]
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "entered_at",
                              "left_at"
                            ]
                          }
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "starter"
                          ]
                        },
                        "starting": {
                          "type": "boolean",
                          "enum": [
                            true
                          ]
                        },
                        "entered": {
                          "type": "boolean",
                          "enum": [
                            true
                          ]
                        }
                      },
                      "required": [
                        "lineup_entry_id",
                        "player_id",
                        "in_lineup",
                        "minutes_played",
                        "intervals",
                        "status",
                        "starting",
                        "entered"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "lineup_entry_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "player_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "in_lineup": {
                          "type": "boolean",
                          "enum": [
                            true
                          ]
                        },
                        "minutes_played": {
                          "oneOf": [
                            {
                              "type": "integer",
                              "minimum": 0
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "intervals": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "entered_at": {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "period"
                                    ]
                                  },
                                  "period": {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "kind": {
                                            "type": "string",
                                            "enum": [
                                              "regulation"
                                            ]
                                          },
                                          "number": {
                                            "type": "integer",
                                            "minimum": 1,
                                            "maximum": 4
                                          }
                                        },
                                        "required": [
                                          "kind",
                                          "number"
                                        ]
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "kind": {
                                            "type": "string",
                                            "enum": [
                                              "extra_time"
                                            ]
                                          },
                                          "number": {
                                            "type": "integer",
                                            "minimum": 1,
                                            "maximum": 2
                                          }
                                        },
                                        "required": [
                                          "kind",
                                          "number"
                                        ]
                                      }
                                    ]
                                  },
                                  "minute": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "stoppage_minute": {
                                    "type": "integer",
                                    "minimum": 0
                                  }
                                },
                                "required": [
                                  "kind",
                                  "period",
                                  "minute",
                                  "stoppage_minute"
                                ]
                              },
                              "left_at": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "period"
                                        ]
                                      },
                                      "period": {
                                        "oneOf": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "kind": {
                                                "type": "string",
                                                "enum": [
                                                  "regulation"
                                                ]
                                              },
                                              "number": {
                                                "type": "integer",
                                                "minimum": 1,
                                                "maximum": 4
                                              }
                                            },
                                            "required": [
                                              "kind",
                                              "number"
                                            ]
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "kind": {
                                                "type": "string",
                                                "enum": [
                                                  "extra_time"
                                                ]
                                              },
                                              "number": {
                                                "type": "integer",
                                                "minimum": 1,
                                                "maximum": 2
                                              }
                                            },
                                            "required": [
                                              "kind",
                                              "number"
                                            ]
                                          }
                                        ]
                                      },
                                      "minute": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "stoppage_minute": {
                                        "type": "integer",
                                        "minimum": 0
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "period",
                                      "minute",
                                      "stoppage_minute"
                                    ]
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "entered_at",
                              "left_at"
                            ]
                          }
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "substitute_entered"
                          ]
                        },
                        "starting": {
                          "type": "boolean",
                          "enum": [
                            false
                          ]
                        },
                        "entered": {
                          "type": "boolean",
                          "enum": [
                            true
                          ]
                        }
                      },
                      "required": [
                        "lineup_entry_id",
                        "player_id",
                        "in_lineup",
                        "minutes_played",
                        "intervals",
                        "status",
                        "starting",
                        "entered"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "lineup_entry_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "player_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "in_lineup": {
                          "type": "boolean",
                          "enum": [
                            true
                          ]
                        },
                        "minutes_played": {
                          "type": "number",
                          "enum": [
                            0
                          ]
                        },
                        "intervals": {
                          "type": "array",
                          "prefixItems": []
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "substitute_not_entered"
                          ]
                        },
                        "starting": {
                          "type": "boolean",
                          "enum": [
                            false
                          ]
                        },
                        "entered": {
                          "type": "boolean",
                          "enum": [
                            false
                          ]
                        }
                      },
                      "required": [
                        "lineup_entry_id",
                        "player_id",
                        "in_lineup",
                        "minutes_played",
                        "intervals",
                        "status",
                        "starting",
                        "entered"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "lineup_entry_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "player_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "in_lineup": {
                          "type": "boolean",
                          "enum": [
                            true
                          ]
                        },
                        "minutes_played": {
                          "type": "null"
                        },
                        "intervals": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "entered_at": {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "period"
                                    ]
                                  },
                                  "period": {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "kind": {
                                            "type": "string",
                                            "enum": [
                                              "regulation"
                                            ]
                                          },
                                          "number": {
                                            "type": "integer",
                                            "minimum": 1,
                                            "maximum": 4
                                          }
                                        },
                                        "required": [
                                          "kind",
                                          "number"
                                        ]
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "kind": {
                                            "type": "string",
                                            "enum": [
                                              "extra_time"
                                            ]
                                          },
                                          "number": {
                                            "type": "integer",
                                            "minimum": 1,
                                            "maximum": 2
                                          }
                                        },
                                        "required": [
                                          "kind",
                                          "number"
                                        ]
                                      }
                                    ]
                                  },
                                  "minute": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "stoppage_minute": {
                                    "type": "integer",
                                    "minimum": 0
                                  }
                                },
                                "required": [
                                  "kind",
                                  "period",
                                  "minute",
                                  "stoppage_minute"
                                ]
                              },
                              "left_at": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "period"
                                        ]
                                      },
                                      "period": {
                                        "oneOf": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "kind": {
                                                "type": "string",
                                                "enum": [
                                                  "regulation"
                                                ]
                                              },
                                              "number": {
                                                "type": "integer",
                                                "minimum": 1,
                                                "maximum": 4
                                              }
                                            },
                                            "required": [
                                              "kind",
                                              "number"
                                            ]
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "kind": {
                                                "type": "string",
                                                "enum": [
                                                  "extra_time"
                                                ]
                                              },
                                              "number": {
                                                "type": "integer",
                                                "minimum": 1,
                                                "maximum": 2
                                              }
                                            },
                                            "required": [
                                              "kind",
                                              "number"
                                            ]
                                          }
                                        ]
                                      },
                                      "minute": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "stoppage_minute": {
                                        "type": "integer",
                                        "minimum": 0
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "period",
                                      "minute",
                                      "stoppage_minute"
                                    ]
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "entered_at",
                              "left_at"
                            ]
                          }
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "not_verifiable"
                          ]
                        },
                        "starting": {
                          "type": "boolean"
                        },
                        "entered": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "lineup_entry_id",
                        "player_id",
                        "in_lineup",
                        "minutes_played",
                        "intervals",
                        "status",
                        "starting",
                        "entered"
                      ]
                    }
                  ]
                }
              },
              "required": [
                "tenant_id",
                "player_id",
                "team_id",
                "side",
                "display_name",
                "public_photo_url",
                "avatar_head_id",
                "shirt_number",
                "role",
                "starting",
                "captain"
              ]
            }
          },
          "generated_at": {
            "type": "string",
            "format": "date-time"
          },
          "statistics_completeness": {
            "type": "object",
            "properties": {
              "current_report_version_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "complete": {
                "type": "boolean"
              },
              "receipt": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "tenant_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "match_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "report_version_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "confirmed_by": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "confirmed_at": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "includes_verified_zeros": {
                        "type": "boolean",
                        "enum": [
                          true
                        ]
                      },
                      "verified_stats": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "penalties",
                            "own_goals",
                            "goalkeepers",
                            "mvp",
                            "assists"
                          ]
                        }
                      },
                      "created_at": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "updated_at": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "created_by": {
                        "oneOf": [
                          {
                            "type": "string",
                            "format": "uuid"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "updated_by": {
                        "oneOf": [
                          {
                            "type": "string",
                            "format": "uuid"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "id",
                      "tenant_id",
                      "match_id",
                      "report_version_id",
                      "confirmed_by",
                      "confirmed_at",
                      "includes_verified_zeros",
                      "created_at",
                      "updated_at",
                      "created_by",
                      "updated_by"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "current_report_version_id",
              "complete",
              "receipt"
            ]
          },
          "evaluation_authority": {
            "$ref": "#/components/schemas/EvaluationAuthorityV2"
          }
        },
        "required": [
          "tenant_id",
          "match_id",
          "state",
          "scheduled_at",
          "schedule_precision",
          "scheduled_on",
          "score_home",
          "score_away",
          "home_team",
          "away_team",
          "players",
          "generated_at",
          "evaluation_authority"
        ]
      },
      "ReportVersion": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "match_id": {
            "type": "string",
            "format": "uuid"
          },
          "version": {
            "type": "integer",
            "minimum": 1
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "submitted",
              "official",
              "superseded"
            ]
          },
          "score_home": {
            "type": "integer",
            "minimum": 0
          },
          "score_away": {
            "type": "integer",
            "minimum": 0
          },
          "ended_after": {
            "type": "string",
            "enum": [
              "regulation",
              "extra_time",
              "penalties"
            ]
          },
          "penalty_shootout": {
            "type": "object",
            "properties": {
              "home": {
                "type": "integer",
                "minimum": 0
              },
              "away": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "home",
              "away"
            ]
          },
          "result_origin": {
            "type": "string",
            "enum": [
              "played",
              "forfeit"
            ]
          },
          "forfeit_trigger": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "no_show",
                  "ineligible_player",
                  "roster_below_minimum",
                  "late_result_confirmation_both_secretariats"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "event_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "source_event_sequence": {
            "type": "integer",
            "minimum": 0
          },
          "submitted_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "submitted_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "approved_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "approved_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "superseded_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "superseded_by_version": {
            "oneOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "notes": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "import_provenance": {
            "type": "object",
            "properties": {
              "source_system": {
                "type": "string",
                "minLength": 1,
                "maxLength": 120
              },
              "source_id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              "source_url": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uri"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "source_note": {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              "imported_at": {
                "type": "string",
                "format": "date-time"
              },
              "imported_by": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "source_system",
              "source_id",
              "source_url",
              "source_note",
              "imported_at",
              "imported_by"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "updated_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "tenant_id",
          "match_id",
          "version",
          "status",
          "score_home",
          "score_away",
          "event_ids",
          "submitted_by",
          "submitted_at",
          "approved_by",
          "approved_at",
          "superseded_at",
          "superseded_by_version",
          "notes",
          "created_at",
          "updated_at",
          "created_by",
          "updated_by"
        ]
      },
      "ReportLifecycleState": {
        "type": "string",
        "enum": [
          "draft",
          "submitted",
          "approved",
          "homologated"
        ]
      },
      "ReportManifestV2": {
        "type": "object",
        "properties": {
          "schema_version": {
            "type": "number",
            "enum": [
              2
            ]
          },
          "match_id": {
            "type": "string",
            "format": "uuid"
          },
          "version": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "previous_version_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "previous_manifest_hash": {
            "oneOf": [
              {
                "type": "string",
                "pattern": "^[0-9a-f]{64}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "score_home": {
            "type": "integer",
            "minimum": 0
          },
          "score_away": {
            "type": "integer",
            "minimum": 0
          },
          "ended_after": {
            "type": "string",
            "enum": [
              "regulation",
              "extra_time",
              "penalties"
            ]
          },
          "penalty_shootout": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "home": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "away": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "required": [
                  "home",
                  "away"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "result_origin": {
            "type": "string",
            "enum": [
              "played",
              "forfeit"
            ]
          },
          "forfeit_trigger": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "no_show",
                  "ineligible_player",
                  "roster_below_minimum",
                  "late_result_confirmation_both_secretariats"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "event_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "lineup_snapshot_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "minItems": 2
          },
          "attachment_hashes": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[0-9a-f]{64}$"
            }
          },
          "scope": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "schema_version": {
                    "type": "number",
                    "enum": [
                      1
                    ]
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "tenant"
                    ]
                  },
                  "tenant_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "league_id": {
                    "type": "null"
                  },
                  "match_id": {
                    "type": "null"
                  }
                },
                "required": [
                  "schema_version",
                  "kind",
                  "tenant_id",
                  "league_id",
                  "match_id"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "schema_version": {
                    "type": "number",
                    "enum": [
                      1
                    ]
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "league"
                    ]
                  },
                  "tenant_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "league_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "match_id": {
                    "type": "null"
                  }
                },
                "required": [
                  "schema_version",
                  "kind",
                  "tenant_id",
                  "league_id",
                  "match_id"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "schema_version": {
                    "type": "number",
                    "enum": [
                      1
                    ]
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "match"
                    ]
                  },
                  "tenant_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "league_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "match_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "schema_version",
                  "kind",
                  "tenant_id",
                  "league_id",
                  "match_id"
                ]
              }
            ]
          },
          "ruleset": {
            "type": "object",
            "properties": {
              "schema_version": {
                "type": "number",
                "enum": [
                  1
                ]
              },
              "revision_id": {
                "type": "string",
                "format": "uuid"
              },
              "content_hash": {
                "type": "string",
                "pattern": "^[0-9a-f]{64}$"
              },
              "provenance_label": {
                "type": "string",
                "minLength": 1,
                "maxLength": 240
              },
              "signed_document": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "state": {
                        "type": "string",
                        "enum": [
                          "disabled"
                        ]
                      },
                      "reason": {
                        "type": "string",
                        "enum": [
                          "owner_input_required",
                          "provider_not_configured",
                          "bridge_not_implemented"
                        ]
                      },
                      "enabled_at": {
                        "type": "null"
                      }
                    },
                    "required": [
                      "state",
                      "reason",
                      "enabled_at"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "state": {
                        "type": "string",
                        "enum": [
                          "enabled"
                        ]
                      },
                      "configuration_revision_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "enabled_at": {
                        "type": "string",
                        "format": "date-time"
                      }
                    },
                    "required": [
                      "state",
                      "configuration_revision_id",
                      "enabled_at"
                    ]
                  }
                ]
              }
            },
            "required": [
              "schema_version",
              "revision_id",
              "content_hash",
              "provenance_label",
              "signed_document"
            ]
          },
          "ruleset_revision_id": {
            "type": "string",
            "format": "uuid"
          },
          "ruleset_content_hash": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "source_event_sequence": {
            "type": "integer",
            "minimum": 0
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "schema_version",
          "match_id",
          "version",
          "previous_version_id",
          "previous_manifest_hash",
          "score_home",
          "score_away",
          "ended_after",
          "penalty_shootout",
          "result_origin",
          "forfeit_trigger",
          "event_ids",
          "lineup_snapshot_ids",
          "attachment_hashes",
          "ruleset_revision_id",
          "ruleset_content_hash",
          "source_event_sequence",
          "created_at"
        ]
      },
      "InternalReportAttestation": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "internal"
            ]
          },
          "manifest_hash": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "previous_manifest_hash": {
            "oneOf": [
              {
                "type": "string",
                "pattern": "^[0-9a-f]{64}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "signature_algorithm": {
            "type": "string",
            "enum": [
              "ed25519",
              "ecdsa_p256_sha256"
            ]
          },
          "key_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "signature_base64": {
            "type": "string",
            "minLength": 16
          },
          "signer_user_id": {
            "type": "string",
            "format": "uuid"
          },
          "verified_session_id_hash": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "identity_assurance": {
            "type": "string",
            "enum": [
              "verified_authenticated_session"
            ]
          },
          "immutable_audit_event_id": {
            "type": "string",
            "format": "uuid"
          },
          "signed_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "kind",
          "manifest_hash",
          "previous_manifest_hash",
          "signature_algorithm",
          "key_id",
          "signature_base64",
          "signer_user_id",
          "verified_session_id_hash",
          "identity_assurance",
          "immutable_audit_event_id",
          "signed_at"
        ]
      },
      "ReportAttestationRecord": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "match_id": {
            "type": "string",
            "format": "uuid"
          },
          "report_version_id": {
            "type": "string",
            "format": "uuid"
          },
          "attestation": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "internal"
                ]
              },
              "manifest_hash": {
                "type": "string",
                "pattern": "^[0-9a-f]{64}$"
              },
              "previous_manifest_hash": {
                "oneOf": [
                  {
                    "type": "string",
                    "pattern": "^[0-9a-f]{64}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "signature_algorithm": {
                "type": "string",
                "enum": [
                  "ed25519",
                  "ecdsa_p256_sha256"
                ]
              },
              "key_id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              "signature_base64": {
                "type": "string",
                "minLength": 16
              },
              "signer_user_id": {
                "type": "string",
                "format": "uuid"
              },
              "verified_session_id_hash": {
                "type": "string",
                "pattern": "^[0-9a-f]{64}$"
              },
              "identity_assurance": {
                "type": "string",
                "enum": [
                  "verified_authenticated_session"
                ]
              },
              "immutable_audit_event_id": {
                "type": "string",
                "format": "uuid"
              },
              "signed_at": {
                "type": "string",
                "format": "date-time"
              }
            },
            "required": [
              "kind",
              "manifest_hash",
              "previous_manifest_hash",
              "signature_algorithm",
              "key_id",
              "signature_base64",
              "signer_user_id",
              "verified_session_id_hash",
              "identity_assurance",
              "immutable_audit_event_id",
              "signed_at"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "updated_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "tenant_id",
          "match_id",
          "report_version_id",
          "attestation",
          "created_at",
          "updated_at",
          "created_by",
          "updated_by"
        ]
      },
      "ReportVersionV2": {
        "type": "object",
        "properties": {
          "schema_version": {
            "type": "number",
            "enum": [
              2
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "match_id": {
            "type": "string",
            "format": "uuid"
          },
          "version": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "lifecycle_state": {
            "type": "string",
            "enum": [
              "draft",
              "submitted",
              "approved",
              "homologated"
            ]
          },
          "manifest": {
            "type": "object",
            "properties": {
              "schema_version": {
                "type": "number",
                "enum": [
                  2
                ]
              },
              "match_id": {
                "type": "string",
                "format": "uuid"
              },
              "version": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "previous_version_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "previous_manifest_hash": {
                "oneOf": [
                  {
                    "type": "string",
                    "pattern": "^[0-9a-f]{64}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "score_home": {
                "type": "integer",
                "minimum": 0
              },
              "score_away": {
                "type": "integer",
                "minimum": 0
              },
              "ended_after": {
                "type": "string",
                "enum": [
                  "regulation",
                  "extra_time",
                  "penalties"
                ]
              },
              "penalty_shootout": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "home": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "away": {
                        "type": "integer",
                        "minimum": 0
                      }
                    },
                    "required": [
                      "home",
                      "away"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "result_origin": {
                "type": "string",
                "enum": [
                  "played",
                  "forfeit"
                ]
              },
              "forfeit_trigger": {
                "oneOf": [
                  {
                    "type": "string",
                    "enum": [
                      "no_show",
                      "ineligible_player",
                      "roster_below_minimum",
                      "late_result_confirmation_both_secretariats"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "event_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "lineup_snapshot_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                },
                "minItems": 2
              },
              "attachment_hashes": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^[0-9a-f]{64}$"
                }
              },
              "scope": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "schema_version": {
                        "type": "number",
                        "enum": [
                          1
                        ]
                      },
                      "kind": {
                        "type": "string",
                        "enum": [
                          "tenant"
                        ]
                      },
                      "tenant_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "league_id": {
                        "type": "null"
                      },
                      "match_id": {
                        "type": "null"
                      }
                    },
                    "required": [
                      "schema_version",
                      "kind",
                      "tenant_id",
                      "league_id",
                      "match_id"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "schema_version": {
                        "type": "number",
                        "enum": [
                          1
                        ]
                      },
                      "kind": {
                        "type": "string",
                        "enum": [
                          "league"
                        ]
                      },
                      "tenant_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "league_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "match_id": {
                        "type": "null"
                      }
                    },
                    "required": [
                      "schema_version",
                      "kind",
                      "tenant_id",
                      "league_id",
                      "match_id"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "schema_version": {
                        "type": "number",
                        "enum": [
                          1
                        ]
                      },
                      "kind": {
                        "type": "string",
                        "enum": [
                          "match"
                        ]
                      },
                      "tenant_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "league_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "match_id": {
                        "type": "string",
                        "format": "uuid"
                      }
                    },
                    "required": [
                      "schema_version",
                      "kind",
                      "tenant_id",
                      "league_id",
                      "match_id"
                    ]
                  }
                ]
              },
              "ruleset": {
                "type": "object",
                "properties": {
                  "schema_version": {
                    "type": "number",
                    "enum": [
                      1
                    ]
                  },
                  "revision_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "content_hash": {
                    "type": "string",
                    "pattern": "^[0-9a-f]{64}$"
                  },
                  "provenance_label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 240
                  },
                  "signed_document": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "state": {
                            "type": "string",
                            "enum": [
                              "disabled"
                            ]
                          },
                          "reason": {
                            "type": "string",
                            "enum": [
                              "owner_input_required",
                              "provider_not_configured",
                              "bridge_not_implemented"
                            ]
                          },
                          "enabled_at": {
                            "type": "null"
                          }
                        },
                        "required": [
                          "state",
                          "reason",
                          "enabled_at"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "state": {
                            "type": "string",
                            "enum": [
                              "enabled"
                            ]
                          },
                          "configuration_revision_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "enabled_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "state",
                          "configuration_revision_id",
                          "enabled_at"
                        ]
                      }
                    ]
                  }
                },
                "required": [
                  "schema_version",
                  "revision_id",
                  "content_hash",
                  "provenance_label",
                  "signed_document"
                ]
              },
              "ruleset_revision_id": {
                "type": "string",
                "format": "uuid"
              },
              "ruleset_content_hash": {
                "type": "string",
                "pattern": "^[0-9a-f]{64}$"
              },
              "source_event_sequence": {
                "type": "integer",
                "minimum": 0
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              }
            },
            "required": [
              "schema_version",
              "match_id",
              "version",
              "previous_version_id",
              "previous_manifest_hash",
              "score_home",
              "score_away",
              "ended_after",
              "penalty_shootout",
              "result_origin",
              "forfeit_trigger",
              "event_ids",
              "lineup_snapshot_ids",
              "attachment_hashes",
              "ruleset_revision_id",
              "ruleset_content_hash",
              "source_event_sequence",
              "created_at"
            ]
          },
          "manifest_hash": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "internal_attestation": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "internal"
                ]
              },
              "manifest_hash": {
                "type": "string",
                "pattern": "^[0-9a-f]{64}$"
              },
              "previous_manifest_hash": {
                "oneOf": [
                  {
                    "type": "string",
                    "pattern": "^[0-9a-f]{64}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "signature_algorithm": {
                "type": "string",
                "enum": [
                  "ed25519",
                  "ecdsa_p256_sha256"
                ]
              },
              "key_id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              "signature_base64": {
                "type": "string",
                "minLength": 16
              },
              "signer_user_id": {
                "type": "string",
                "format": "uuid"
              },
              "verified_session_id_hash": {
                "type": "string",
                "pattern": "^[0-9a-f]{64}$"
              },
              "identity_assurance": {
                "type": "string",
                "enum": [
                  "verified_authenticated_session"
                ]
              },
              "immutable_audit_event_id": {
                "type": "string",
                "format": "uuid"
              },
              "signed_at": {
                "type": "string",
                "format": "date-time"
              }
            },
            "required": [
              "kind",
              "manifest_hash",
              "previous_manifest_hash",
              "signature_algorithm",
              "key_id",
              "signature_base64",
              "signer_user_id",
              "verified_session_id_hash",
              "identity_assurance",
              "immutable_audit_event_id",
              "signed_at"
            ]
          },
          "qualified_signature": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "state": {
                    "type": "string",
                    "enum": [
                      "disabled"
                    ]
                  },
                  "reason": {
                    "type": "string",
                    "enum": [
                      "provider_not_configured"
                    ]
                  },
                  "provider_id": {
                    "type": "null"
                  },
                  "provider_evidence_ref": {
                    "type": "null"
                  }
                },
                "required": [
                  "state",
                  "reason",
                  "provider_id",
                  "provider_evidence_ref"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "state": {
                    "type": "string",
                    "enum": [
                      "enabled"
                    ]
                  },
                  "provider_id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "provider_evidence_ref": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 512
                  }
                },
                "required": [
                  "state",
                  "provider_id",
                  "provider_evidence_ref"
                ]
              }
            ]
          },
          "is_sub_iudice": {
            "type": "boolean"
          },
          "sub_iudice_case": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "opened_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "opened_by": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1000
                  },
                  "proceeding_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "opened_at",
                  "opened_by",
                  "reason",
                  "proceeding_id"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "submitted_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "approved_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "homologated_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "amendment_set_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "officiality": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "schema_version": {
                    "type": "number",
                    "enum": [
                      1
                    ]
                  },
                  "state": {
                    "type": "string",
                    "enum": [
                      "provisional"
                    ]
                  },
                  "report_lifecycle": {
                    "type": "string",
                    "enum": [
                      "draft",
                      "submitted",
                      "approved"
                    ]
                  },
                  "report_version_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "report_version": {
                    "type": "integer",
                    "exclusiveMinimum": 0
                  },
                  "publication_eligible": {
                    "type": "boolean",
                    "enum": [
                      false
                    ]
                  },
                  "homologated_at": {
                    "type": "null"
                  },
                  "is_sub_iudice": {
                    "type": "boolean"
                  },
                  "reason": {
                    "type": "object",
                    "properties": {
                      "code": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "message": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 1000
                      },
                      "retryable": {
                        "type": "boolean"
                      },
                      "recovery_action": {
                        "oneOf": [
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 500
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "code",
                      "message",
                      "retryable",
                      "recovery_action"
                    ]
                  }
                },
                "required": [
                  "schema_version",
                  "state",
                  "report_lifecycle",
                  "report_version_id",
                  "report_version",
                  "publication_eligible",
                  "homologated_at",
                  "is_sub_iudice",
                  "reason"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "schema_version": {
                    "type": "number",
                    "enum": [
                      1
                    ]
                  },
                  "state": {
                    "type": "string",
                    "enum": [
                      "homologated"
                    ]
                  },
                  "report_lifecycle": {
                    "type": "string",
                    "enum": [
                      "homologated"
                    ]
                  },
                  "report_version_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "report_version": {
                    "type": "integer",
                    "exclusiveMinimum": 0
                  },
                  "publication_eligible": {
                    "type": "boolean",
                    "enum": [
                      true
                    ]
                  },
                  "homologated_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "is_sub_iudice": {
                    "type": "boolean"
                  },
                  "reason": {
                    "type": "null"
                  }
                },
                "required": [
                  "schema_version",
                  "state",
                  "report_lifecycle",
                  "report_version_id",
                  "report_version",
                  "publication_eligible",
                  "homologated_at",
                  "is_sub_iudice",
                  "reason"
                ]
              }
            ]
          },
          "freshness": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "schema_version": {
                    "type": "number",
                    "enum": [
                      1
                    ]
                  },
                  "state": {
                    "type": "string",
                    "enum": [
                      "fresh"
                    ]
                  },
                  "source_revision": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "generated_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "stale_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "invalidation_cursor": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  },
                  "reason": {
                    "type": "null"
                  }
                },
                "required": [
                  "schema_version",
                  "state",
                  "source_revision",
                  "generated_at",
                  "stale_at",
                  "expires_at",
                  "invalidation_cursor",
                  "reason"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "schema_version": {
                    "type": "number",
                    "enum": [
                      1
                    ]
                  },
                  "state": {
                    "type": "string",
                    "enum": [
                      "stale"
                    ]
                  },
                  "source_revision": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "generated_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "stale_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "invalidation_cursor": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  },
                  "reason": {
                    "type": "object",
                    "properties": {
                      "code": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "message": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 1000
                      },
                      "retryable": {
                        "type": "boolean"
                      },
                      "recovery_action": {
                        "oneOf": [
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 500
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "code",
                      "message",
                      "retryable",
                      "recovery_action"
                    ]
                  }
                },
                "required": [
                  "schema_version",
                  "state",
                  "source_revision",
                  "generated_at",
                  "stale_at",
                  "expires_at",
                  "invalidation_cursor",
                  "reason"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "schema_version": {
                    "type": "number",
                    "enum": [
                      1
                    ]
                  },
                  "state": {
                    "type": "string",
                    "enum": [
                      "expired"
                    ]
                  },
                  "source_revision": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "generated_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "stale_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "invalidation_cursor": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  },
                  "reason": {
                    "type": "object",
                    "properties": {
                      "code": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "message": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 1000
                      },
                      "retryable": {
                        "type": "boolean"
                      },
                      "recovery_action": {
                        "oneOf": [
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 500
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "code",
                      "message",
                      "retryable",
                      "recovery_action"
                    ]
                  }
                },
                "required": [
                  "schema_version",
                  "state",
                  "source_revision",
                  "generated_at",
                  "stale_at",
                  "expires_at",
                  "invalidation_cursor",
                  "reason"
                ]
              }
            ]
          },
          "receipt": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "schema_version": {
                    "type": "number",
                    "enum": [
                      1
                    ]
                  },
                  "receipt_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "entity": {
                    "type": "object",
                    "properties": {
                      "entity_type": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "entity_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "entity_version": {
                        "oneOf": [
                          {
                            "type": "integer",
                            "minimum": 0
                          },
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          }
                        ]
                      }
                    },
                    "required": [
                      "entity_type",
                      "entity_id",
                      "entity_version"
                    ]
                  },
                  "scope": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "tenant"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "null"
                          },
                          "match_id": {
                            "type": "null"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "league"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "match_id": {
                            "type": "null"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "match"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "match_id": {
                            "type": "string",
                            "format": "uuid"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      }
                    ]
                  },
                  "actor_user_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "consumers": {
                    "type": "array",
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "pending"
                              ]
                            },
                            "propagated_at": {
                              "type": "null"
                            },
                            "reason": {
                              "type": "null"
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "applied"
                              ]
                            },
                            "propagated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "reason": {
                              "type": "null"
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "failed"
                              ]
                            },
                            "propagated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "reason": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "message": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1000
                                },
                                "retryable": {
                                  "type": "boolean"
                                },
                                "recovery_action": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 500
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "code",
                                "message",
                                "retryable",
                                "recovery_action"
                              ]
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "not_applicable"
                              ]
                            },
                            "propagated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "reason": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "message": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1000
                                },
                                "retryable": {
                                  "type": "boolean"
                                },
                                "recovery_action": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 500
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "code",
                                "message",
                                "retryable",
                                "recovery_action"
                              ]
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        }
                      ]
                    }
                  },
                  "server_timestamp": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "correlation_id": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 200
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "queued"
                    ]
                  },
                  "reason": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 120
                          },
                          "message": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 1000
                          },
                          "retryable": {
                            "type": "boolean"
                          },
                          "recovery_action": {
                            "oneOf": [
                              {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 500
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "code",
                          "message",
                          "retryable",
                          "recovery_action"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "schema_version",
                  "receipt_id",
                  "entity",
                  "scope",
                  "actor_user_id",
                  "consumers",
                  "server_timestamp",
                  "correlation_id",
                  "status",
                  "reason"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "schema_version": {
                    "type": "number",
                    "enum": [
                      1
                    ]
                  },
                  "receipt_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "entity": {
                    "type": "object",
                    "properties": {
                      "entity_type": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "entity_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "entity_version": {
                        "oneOf": [
                          {
                            "type": "integer",
                            "minimum": 0
                          },
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          }
                        ]
                      }
                    },
                    "required": [
                      "entity_type",
                      "entity_id",
                      "entity_version"
                    ]
                  },
                  "scope": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "tenant"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "null"
                          },
                          "match_id": {
                            "type": "null"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "league"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "match_id": {
                            "type": "null"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "match"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "match_id": {
                            "type": "string",
                            "format": "uuid"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      }
                    ]
                  },
                  "actor_user_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "consumers": {
                    "type": "array",
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "pending"
                              ]
                            },
                            "propagated_at": {
                              "type": "null"
                            },
                            "reason": {
                              "type": "null"
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "applied"
                              ]
                            },
                            "propagated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "reason": {
                              "type": "null"
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "failed"
                              ]
                            },
                            "propagated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "reason": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "message": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1000
                                },
                                "retryable": {
                                  "type": "boolean"
                                },
                                "recovery_action": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 500
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "code",
                                "message",
                                "retryable",
                                "recovery_action"
                              ]
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "not_applicable"
                              ]
                            },
                            "propagated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "reason": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "message": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1000
                                },
                                "retryable": {
                                  "type": "boolean"
                                },
                                "recovery_action": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 500
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "code",
                                "message",
                                "retryable",
                                "recovery_action"
                              ]
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        }
                      ]
                    }
                  },
                  "server_timestamp": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "correlation_id": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 200
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "accepted"
                    ]
                  },
                  "reason": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 120
                          },
                          "message": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 1000
                          },
                          "retryable": {
                            "type": "boolean"
                          },
                          "recovery_action": {
                            "oneOf": [
                              {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 500
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "code",
                          "message",
                          "retryable",
                          "recovery_action"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "schema_version",
                  "receipt_id",
                  "entity",
                  "scope",
                  "actor_user_id",
                  "consumers",
                  "server_timestamp",
                  "correlation_id",
                  "status",
                  "reason"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "schema_version": {
                    "type": "number",
                    "enum": [
                      1
                    ]
                  },
                  "receipt_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "entity": {
                    "type": "object",
                    "properties": {
                      "entity_type": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "entity_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "entity_version": {
                        "oneOf": [
                          {
                            "type": "integer",
                            "minimum": 0
                          },
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          }
                        ]
                      }
                    },
                    "required": [
                      "entity_type",
                      "entity_id",
                      "entity_version"
                    ]
                  },
                  "scope": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "tenant"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "null"
                          },
                          "match_id": {
                            "type": "null"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "league"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "match_id": {
                            "type": "null"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "match"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "match_id": {
                            "type": "string",
                            "format": "uuid"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      }
                    ]
                  },
                  "actor_user_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "consumers": {
                    "type": "array",
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "pending"
                              ]
                            },
                            "propagated_at": {
                              "type": "null"
                            },
                            "reason": {
                              "type": "null"
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "applied"
                              ]
                            },
                            "propagated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "reason": {
                              "type": "null"
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "failed"
                              ]
                            },
                            "propagated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "reason": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "message": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1000
                                },
                                "retryable": {
                                  "type": "boolean"
                                },
                                "recovery_action": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 500
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "code",
                                "message",
                                "retryable",
                                "recovery_action"
                              ]
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "not_applicable"
                              ]
                            },
                            "propagated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "reason": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "message": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1000
                                },
                                "retryable": {
                                  "type": "boolean"
                                },
                                "recovery_action": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 500
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "code",
                                "message",
                                "retryable",
                                "recovery_action"
                              ]
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        }
                      ]
                    }
                  },
                  "server_timestamp": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "correlation_id": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 200
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "rejected"
                    ]
                  },
                  "reason": {
                    "type": "object",
                    "properties": {
                      "code": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "message": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 1000
                      },
                      "retryable": {
                        "type": "boolean"
                      },
                      "recovery_action": {
                        "oneOf": [
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 500
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "code",
                      "message",
                      "retryable",
                      "recovery_action"
                    ]
                  }
                },
                "required": [
                  "schema_version",
                  "receipt_id",
                  "entity",
                  "scope",
                  "actor_user_id",
                  "consumers",
                  "server_timestamp",
                  "correlation_id",
                  "status",
                  "reason"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "schema_version": {
                    "type": "number",
                    "enum": [
                      1
                    ]
                  },
                  "receipt_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "entity": {
                    "type": "object",
                    "properties": {
                      "entity_type": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "entity_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "entity_version": {
                        "oneOf": [
                          {
                            "type": "integer",
                            "minimum": 0
                          },
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          }
                        ]
                      }
                    },
                    "required": [
                      "entity_type",
                      "entity_id",
                      "entity_version"
                    ]
                  },
                  "scope": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "tenant"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "null"
                          },
                          "match_id": {
                            "type": "null"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "league"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "match_id": {
                            "type": "null"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "match"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "match_id": {
                            "type": "string",
                            "format": "uuid"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      }
                    ]
                  },
                  "actor_user_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "consumers": {
                    "type": "array",
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "pending"
                              ]
                            },
                            "propagated_at": {
                              "type": "null"
                            },
                            "reason": {
                              "type": "null"
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "applied"
                              ]
                            },
                            "propagated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "reason": {
                              "type": "null"
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "failed"
                              ]
                            },
                            "propagated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "reason": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "message": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1000
                                },
                                "retryable": {
                                  "type": "boolean"
                                },
                                "recovery_action": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 500
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "code",
                                "message",
                                "retryable",
                                "recovery_action"
                              ]
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "not_applicable"
                              ]
                            },
                            "propagated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "reason": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "message": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1000
                                },
                                "retryable": {
                                  "type": "boolean"
                                },
                                "recovery_action": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 500
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "code",
                                "message",
                                "retryable",
                                "recovery_action"
                              ]
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        }
                      ]
                    }
                  },
                  "server_timestamp": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "correlation_id": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 200
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "superseded"
                    ]
                  },
                  "reason": {
                    "type": "object",
                    "properties": {
                      "code": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "message": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 1000
                      },
                      "retryable": {
                        "type": "boolean"
                      },
                      "recovery_action": {
                        "oneOf": [
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 500
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "code",
                      "message",
                      "retryable",
                      "recovery_action"
                    ]
                  }
                },
                "required": [
                  "schema_version",
                  "receipt_id",
                  "entity",
                  "scope",
                  "actor_user_id",
                  "consumers",
                  "server_timestamp",
                  "correlation_id",
                  "status",
                  "reason"
                ]
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "updated_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "schema_version",
          "id",
          "tenant_id",
          "match_id",
          "version",
          "lifecycle_state",
          "manifest",
          "manifest_hash",
          "internal_attestation",
          "qualified_signature",
          "is_sub_iudice",
          "sub_iudice_case",
          "submitted_at",
          "approved_at",
          "homologated_at",
          "amendment_set_id",
          "created_at",
          "updated_at",
          "created_by",
          "updated_by"
        ]
      },
      "ReportStateTransition": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "match_id": {
            "type": "string",
            "format": "uuid"
          },
          "report_version_id": {
            "type": "string",
            "format": "uuid"
          },
          "from": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "draft",
                  "submitted",
                  "approved",
                  "homologated"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "to": {
            "type": "string",
            "enum": [
              "draft",
              "submitted",
              "approved",
              "homologated"
            ]
          },
          "actor_user_id": {
            "type": "string",
            "format": "uuid"
          },
          "occurred_at": {
            "type": "string",
            "format": "date-time"
          },
          "audit_event_id": {
            "type": "string",
            "format": "uuid"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "updated_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "tenant_id",
          "match_id",
          "report_version_id",
          "from",
          "to",
          "actor_user_id",
          "occurred_at",
          "audit_event_id",
          "created_at",
          "updated_at",
          "created_by",
          "updated_by"
        ]
      },
      "ReportAmendmentOperation": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "reason": {
                "type": "string",
                "minLength": 1,
                "maxLength": 1000
              },
              "op": {
                "type": "string",
                "enum": [
                  "add"
                ]
              },
              "event_id": {
                "type": "string",
                "format": "uuid"
              }
            },
            "required": [
              "reason",
              "op",
              "event_id"
            ]
          },
          {
            "type": "object",
            "properties": {
              "reason": {
                "type": "string",
                "minLength": 1,
                "maxLength": 1000
              },
              "op": {
                "type": "string",
                "enum": [
                  "replace"
                ]
              },
              "target_event_id": {
                "type": "string",
                "format": "uuid"
              },
              "replacement_event_id": {
                "type": "string",
                "format": "uuid"
              }
            },
            "required": [
              "reason",
              "op",
              "target_event_id",
              "replacement_event_id"
            ]
          },
          {
            "type": "object",
            "properties": {
              "reason": {
                "type": "string",
                "minLength": 1,
                "maxLength": 1000
              },
              "op": {
                "type": "string",
                "enum": [
                  "void"
                ]
              },
              "target_event_id": {
                "type": "string",
                "format": "uuid"
              }
            },
            "required": [
              "reason",
              "op",
              "target_event_id"
            ]
          }
        ]
      },
      "ReportAmendmentSet": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "match_id": {
            "type": "string",
            "format": "uuid"
          },
          "base_report_version_id": {
            "type": "string",
            "format": "uuid"
          },
          "base_manifest_hash": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "resulting_report_version_id": {
            "type": "string",
            "format": "uuid"
          },
          "operations": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "reason": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1000
                    },
                    "op": {
                      "type": "string",
                      "enum": [
                        "add"
                      ]
                    },
                    "event_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "reason",
                    "op",
                    "event_id"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "reason": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1000
                    },
                    "op": {
                      "type": "string",
                      "enum": [
                        "replace"
                      ]
                    },
                    "target_event_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "replacement_event_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "reason",
                    "op",
                    "target_event_id",
                    "replacement_event_id"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "reason": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1000
                    },
                    "op": {
                      "type": "string",
                      "enum": [
                        "void"
                      ]
                    },
                    "target_event_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "reason",
                    "op",
                    "target_event_id"
                  ]
                }
              ]
            },
            "minItems": 1
          },
          "idempotency_payload_hash": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "requested_by": {
            "type": "string",
            "format": "uuid"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "is_sub_iudice": {
            "type": "boolean"
          },
          "scope": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "schema_version": {
                    "type": "number",
                    "enum": [
                      1
                    ]
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "tenant"
                    ]
                  },
                  "tenant_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "league_id": {
                    "type": "null"
                  },
                  "match_id": {
                    "type": "null"
                  }
                },
                "required": [
                  "schema_version",
                  "kind",
                  "tenant_id",
                  "league_id",
                  "match_id"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "schema_version": {
                    "type": "number",
                    "enum": [
                      1
                    ]
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "league"
                    ]
                  },
                  "tenant_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "league_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "match_id": {
                    "type": "null"
                  }
                },
                "required": [
                  "schema_version",
                  "kind",
                  "tenant_id",
                  "league_id",
                  "match_id"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "schema_version": {
                    "type": "number",
                    "enum": [
                      1
                    ]
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "match"
                    ]
                  },
                  "tenant_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "league_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "match_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "schema_version",
                  "kind",
                  "tenant_id",
                  "league_id",
                  "match_id"
                ]
              }
            ]
          },
          "receipt": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "schema_version": {
                    "type": "number",
                    "enum": [
                      1
                    ]
                  },
                  "receipt_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "entity": {
                    "type": "object",
                    "properties": {
                      "entity_type": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "entity_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "entity_version": {
                        "oneOf": [
                          {
                            "type": "integer",
                            "minimum": 0
                          },
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          }
                        ]
                      }
                    },
                    "required": [
                      "entity_type",
                      "entity_id",
                      "entity_version"
                    ]
                  },
                  "scope": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "tenant"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "null"
                          },
                          "match_id": {
                            "type": "null"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "league"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "match_id": {
                            "type": "null"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "match"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "match_id": {
                            "type": "string",
                            "format": "uuid"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      }
                    ]
                  },
                  "actor_user_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "consumers": {
                    "type": "array",
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "pending"
                              ]
                            },
                            "propagated_at": {
                              "type": "null"
                            },
                            "reason": {
                              "type": "null"
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "applied"
                              ]
                            },
                            "propagated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "reason": {
                              "type": "null"
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "failed"
                              ]
                            },
                            "propagated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "reason": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "message": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1000
                                },
                                "retryable": {
                                  "type": "boolean"
                                },
                                "recovery_action": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 500
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "code",
                                "message",
                                "retryable",
                                "recovery_action"
                              ]
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "not_applicable"
                              ]
                            },
                            "propagated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "reason": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "message": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1000
                                },
                                "retryable": {
                                  "type": "boolean"
                                },
                                "recovery_action": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 500
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "code",
                                "message",
                                "retryable",
                                "recovery_action"
                              ]
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        }
                      ]
                    }
                  },
                  "server_timestamp": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "correlation_id": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 200
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "queued"
                    ]
                  },
                  "reason": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 120
                          },
                          "message": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 1000
                          },
                          "retryable": {
                            "type": "boolean"
                          },
                          "recovery_action": {
                            "oneOf": [
                              {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 500
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "code",
                          "message",
                          "retryable",
                          "recovery_action"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "schema_version",
                  "receipt_id",
                  "entity",
                  "scope",
                  "actor_user_id",
                  "consumers",
                  "server_timestamp",
                  "correlation_id",
                  "status",
                  "reason"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "schema_version": {
                    "type": "number",
                    "enum": [
                      1
                    ]
                  },
                  "receipt_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "entity": {
                    "type": "object",
                    "properties": {
                      "entity_type": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "entity_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "entity_version": {
                        "oneOf": [
                          {
                            "type": "integer",
                            "minimum": 0
                          },
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          }
                        ]
                      }
                    },
                    "required": [
                      "entity_type",
                      "entity_id",
                      "entity_version"
                    ]
                  },
                  "scope": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "tenant"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "null"
                          },
                          "match_id": {
                            "type": "null"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "league"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "match_id": {
                            "type": "null"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "match"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "match_id": {
                            "type": "string",
                            "format": "uuid"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      }
                    ]
                  },
                  "actor_user_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "consumers": {
                    "type": "array",
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "pending"
                              ]
                            },
                            "propagated_at": {
                              "type": "null"
                            },
                            "reason": {
                              "type": "null"
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "applied"
                              ]
                            },
                            "propagated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "reason": {
                              "type": "null"
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "failed"
                              ]
                            },
                            "propagated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "reason": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "message": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1000
                                },
                                "retryable": {
                                  "type": "boolean"
                                },
                                "recovery_action": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 500
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "code",
                                "message",
                                "retryable",
                                "recovery_action"
                              ]
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "not_applicable"
                              ]
                            },
                            "propagated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "reason": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "message": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1000
                                },
                                "retryable": {
                                  "type": "boolean"
                                },
                                "recovery_action": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 500
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "code",
                                "message",
                                "retryable",
                                "recovery_action"
                              ]
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        }
                      ]
                    }
                  },
                  "server_timestamp": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "correlation_id": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 200
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "accepted"
                    ]
                  },
                  "reason": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 120
                          },
                          "message": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 1000
                          },
                          "retryable": {
                            "type": "boolean"
                          },
                          "recovery_action": {
                            "oneOf": [
                              {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 500
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "code",
                          "message",
                          "retryable",
                          "recovery_action"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "schema_version",
                  "receipt_id",
                  "entity",
                  "scope",
                  "actor_user_id",
                  "consumers",
                  "server_timestamp",
                  "correlation_id",
                  "status",
                  "reason"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "schema_version": {
                    "type": "number",
                    "enum": [
                      1
                    ]
                  },
                  "receipt_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "entity": {
                    "type": "object",
                    "properties": {
                      "entity_type": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "entity_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "entity_version": {
                        "oneOf": [
                          {
                            "type": "integer",
                            "minimum": 0
                          },
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          }
                        ]
                      }
                    },
                    "required": [
                      "entity_type",
                      "entity_id",
                      "entity_version"
                    ]
                  },
                  "scope": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "tenant"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "null"
                          },
                          "match_id": {
                            "type": "null"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "league"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "match_id": {
                            "type": "null"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "match"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "match_id": {
                            "type": "string",
                            "format": "uuid"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      }
                    ]
                  },
                  "actor_user_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "consumers": {
                    "type": "array",
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "pending"
                              ]
                            },
                            "propagated_at": {
                              "type": "null"
                            },
                            "reason": {
                              "type": "null"
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "applied"
                              ]
                            },
                            "propagated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "reason": {
                              "type": "null"
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "failed"
                              ]
                            },
                            "propagated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "reason": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "message": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1000
                                },
                                "retryable": {
                                  "type": "boolean"
                                },
                                "recovery_action": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 500
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "code",
                                "message",
                                "retryable",
                                "recovery_action"
                              ]
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "not_applicable"
                              ]
                            },
                            "propagated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "reason": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "message": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1000
                                },
                                "retryable": {
                                  "type": "boolean"
                                },
                                "recovery_action": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 500
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "code",
                                "message",
                                "retryable",
                                "recovery_action"
                              ]
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        }
                      ]
                    }
                  },
                  "server_timestamp": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "correlation_id": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 200
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "rejected"
                    ]
                  },
                  "reason": {
                    "type": "object",
                    "properties": {
                      "code": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "message": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 1000
                      },
                      "retryable": {
                        "type": "boolean"
                      },
                      "recovery_action": {
                        "oneOf": [
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 500
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "code",
                      "message",
                      "retryable",
                      "recovery_action"
                    ]
                  }
                },
                "required": [
                  "schema_version",
                  "receipt_id",
                  "entity",
                  "scope",
                  "actor_user_id",
                  "consumers",
                  "server_timestamp",
                  "correlation_id",
                  "status",
                  "reason"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "schema_version": {
                    "type": "number",
                    "enum": [
                      1
                    ]
                  },
                  "receipt_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "entity": {
                    "type": "object",
                    "properties": {
                      "entity_type": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "entity_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "entity_version": {
                        "oneOf": [
                          {
                            "type": "integer",
                            "minimum": 0
                          },
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          }
                        ]
                      }
                    },
                    "required": [
                      "entity_type",
                      "entity_id",
                      "entity_version"
                    ]
                  },
                  "scope": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "tenant"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "null"
                          },
                          "match_id": {
                            "type": "null"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "league"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "match_id": {
                            "type": "null"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "match"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "match_id": {
                            "type": "string",
                            "format": "uuid"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      }
                    ]
                  },
                  "actor_user_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "consumers": {
                    "type": "array",
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "pending"
                              ]
                            },
                            "propagated_at": {
                              "type": "null"
                            },
                            "reason": {
                              "type": "null"
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "applied"
                              ]
                            },
                            "propagated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "reason": {
                              "type": "null"
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "failed"
                              ]
                            },
                            "propagated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "reason": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "message": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1000
                                },
                                "retryable": {
                                  "type": "boolean"
                                },
                                "recovery_action": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 500
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "code",
                                "message",
                                "retryable",
                                "recovery_action"
                              ]
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "not_applicable"
                              ]
                            },
                            "propagated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "reason": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "message": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1000
                                },
                                "retryable": {
                                  "type": "boolean"
                                },
                                "recovery_action": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 500
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "code",
                                "message",
                                "retryable",
                                "recovery_action"
                              ]
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        }
                      ]
                    }
                  },
                  "server_timestamp": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "correlation_id": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 200
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "superseded"
                    ]
                  },
                  "reason": {
                    "type": "object",
                    "properties": {
                      "code": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "message": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 1000
                      },
                      "retryable": {
                        "type": "boolean"
                      },
                      "recovery_action": {
                        "oneOf": [
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 500
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "code",
                      "message",
                      "retryable",
                      "recovery_action"
                    ]
                  }
                },
                "required": [
                  "schema_version",
                  "receipt_id",
                  "entity",
                  "scope",
                  "actor_user_id",
                  "consumers",
                  "server_timestamp",
                  "correlation_id",
                  "status",
                  "reason"
                ]
              }
            ]
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "updated_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "tenant_id",
          "match_id",
          "base_report_version_id",
          "base_manifest_hash",
          "resulting_report_version_id",
          "operations",
          "requested_by",
          "created_at",
          "is_sub_iudice",
          "updated_at",
          "created_by",
          "updated_by"
        ]
      },
      "OfficialMatchEventV2": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "tenant_id": {
                "type": "string",
                "format": "uuid"
              },
              "match_id": {
                "type": "string",
                "format": "uuid"
              },
              "sequence": {
                "type": "integer",
                "minimum": 0
              },
              "occurred_at": {
                "type": "string",
                "format": "date-time"
              },
              "side": {
                "oneOf": [
                  {
                    "type": "string",
                    "enum": [
                      "home",
                      "away"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "subject": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "player"
                        ]
                      },
                      "lineup_entry_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "player_id": {
                        "oneOf": [
                          {
                            "type": "string",
                            "format": "uuid"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "kind",
                      "lineup_entry_id",
                      "player_id"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "team_official"
                        ]
                      },
                      "lineup_official_id": {
                        "type": "string",
                        "format": "uuid"
                      }
                    },
                    "required": [
                      "kind",
                      "lineup_official_id"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "team"
                        ]
                      },
                      "team_id": {
                        "type": "string",
                        "format": "uuid"
                      }
                    },
                    "required": [
                      "kind",
                      "team_id"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "spectator"
                        ]
                      },
                      "incident_subject_ref": {
                        "type": "string",
                        "format": "uuid"
                      }
                    },
                    "required": [
                      "kind",
                      "incident_subject_ref"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "venue"
                        ]
                      },
                      "field_id": {
                        "type": "string",
                        "format": "uuid"
                      }
                    },
                    "required": [
                      "kind",
                      "field_id"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "match"
                        ]
                      },
                      "match_id": {
                        "type": "string",
                        "format": "uuid"
                      }
                    },
                    "required": [
                      "kind",
                      "match_id"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "none"
                        ]
                      }
                    },
                    "required": [
                      "kind"
                    ]
                  }
                ]
              },
              "author_user_id": {
                "type": "string",
                "format": "uuid"
              },
              "idempotency_key": {
                "type": "string",
                "minLength": 8,
                "maxLength": 200
              },
              "note": {
                "oneOf": [
                  {
                    "type": "string",
                    "maxLength": 2000
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "created_by": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "updated_by": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "kind": {
                "type": "string",
                "enum": [
                  "sport"
                ]
              },
              "event_type": {
                "type": "string",
                "enum": [
                  "goal",
                  "own_goal",
                  "assist",
                  "substitution_in",
                  "substitution_out",
                  "injury_pause",
                  "period_start",
                  "period_end",
                  "match_start",
                  "match_end"
                ]
              },
              "clock": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "period"
                    ]
                  },
                  "period": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "regulation"
                            ]
                          },
                          "number": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 4
                          }
                        },
                        "required": [
                          "kind",
                          "number"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "extra_time"
                            ]
                          },
                          "number": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 2
                          }
                        },
                        "required": [
                          "kind",
                          "number"
                        ]
                      }
                    ]
                  },
                  "minute": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "stoppage_minute": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "required": [
                  "kind",
                  "period",
                  "minute",
                  "stoppage_minute"
                ]
              },
              "related_subject": {
                "oneOf": [
                  {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "player"
                            ]
                          },
                          "lineup_entry_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "player_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "kind",
                          "lineup_entry_id",
                          "player_id"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "team_official"
                            ]
                          },
                          "lineup_official_id": {
                            "type": "string",
                            "format": "uuid"
                          }
                        },
                        "required": [
                          "kind",
                          "lineup_official_id"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "team"
                            ]
                          },
                          "team_id": {
                            "type": "string",
                            "format": "uuid"
                          }
                        },
                        "required": [
                          "kind",
                          "team_id"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "spectator"
                            ]
                          },
                          "incident_subject_ref": {
                            "type": "string",
                            "format": "uuid"
                          }
                        },
                        "required": [
                          "kind",
                          "incident_subject_ref"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "venue"
                            ]
                          },
                          "field_id": {
                            "type": "string",
                            "format": "uuid"
                          }
                        },
                        "required": [
                          "kind",
                          "field_id"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "match"
                            ]
                          },
                          "match_id": {
                            "type": "string",
                            "format": "uuid"
                          }
                        },
                        "required": [
                          "kind",
                          "match_id"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "none"
                            ]
                          }
                        },
                        "required": [
                          "kind"
                        ]
                      }
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "id",
              "tenant_id",
              "match_id",
              "sequence",
              "occurred_at",
              "side",
              "subject",
              "author_user_id",
              "idempotency_key",
              "note",
              "created_at",
              "updated_at",
              "created_by",
              "updated_by",
              "kind",
              "event_type",
              "clock",
              "related_subject"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "tenant_id": {
                "type": "string",
                "format": "uuid"
              },
              "match_id": {
                "type": "string",
                "format": "uuid"
              },
              "sequence": {
                "type": "integer",
                "minimum": 0
              },
              "occurred_at": {
                "type": "string",
                "format": "date-time"
              },
              "side": {
                "oneOf": [
                  {
                    "type": "string",
                    "enum": [
                      "home",
                      "away"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "subject": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "player"
                        ]
                      },
                      "lineup_entry_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "player_id": {
                        "oneOf": [
                          {
                            "type": "string",
                            "format": "uuid"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "kind",
                      "lineup_entry_id",
                      "player_id"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "team_official"
                        ]
                      },
                      "lineup_official_id": {
                        "type": "string",
                        "format": "uuid"
                      }
                    },
                    "required": [
                      "kind",
                      "lineup_official_id"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "team"
                        ]
                      },
                      "team_id": {
                        "type": "string",
                        "format": "uuid"
                      }
                    },
                    "required": [
                      "kind",
                      "team_id"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "spectator"
                        ]
                      },
                      "incident_subject_ref": {
                        "type": "string",
                        "format": "uuid"
                      }
                    },
                    "required": [
                      "kind",
                      "incident_subject_ref"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "venue"
                        ]
                      },
                      "field_id": {
                        "type": "string",
                        "format": "uuid"
                      }
                    },
                    "required": [
                      "kind",
                      "field_id"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "match"
                        ]
                      },
                      "match_id": {
                        "type": "string",
                        "format": "uuid"
                      }
                    },
                    "required": [
                      "kind",
                      "match_id"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "none"
                        ]
                      }
                    },
                    "required": [
                      "kind"
                    ]
                  }
                ]
              },
              "author_user_id": {
                "type": "string",
                "format": "uuid"
              },
              "idempotency_key": {
                "type": "string",
                "minLength": 8,
                "maxLength": 200
              },
              "note": {
                "oneOf": [
                  {
                    "type": "string",
                    "maxLength": 2000
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "created_by": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "updated_by": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "kind": {
                "type": "string",
                "enum": [
                  "disciplinary"
                ]
              },
              "event_type": {
                "type": "string",
                "enum": [
                  "yellow_card",
                  "second_yellow",
                  "red_card"
                ]
              },
              "clock": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "period"
                    ]
                  },
                  "period": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "regulation"
                            ]
                          },
                          "number": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 4
                          }
                        },
                        "required": [
                          "kind",
                          "number"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "extra_time"
                            ]
                          },
                          "number": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 2
                          }
                        },
                        "required": [
                          "kind",
                          "number"
                        ]
                      }
                    ]
                  },
                  "minute": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "stoppage_minute": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "required": [
                  "kind",
                  "period",
                  "minute",
                  "stoppage_minute"
                ]
              },
              "reason_code": {
                "type": "string",
                "minLength": 1,
                "maxLength": 120
              },
              "related_event_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                },
                "maxItems": 2
              }
            },
            "required": [
              "id",
              "tenant_id",
              "match_id",
              "sequence",
              "occurred_at",
              "side",
              "subject",
              "author_user_id",
              "idempotency_key",
              "note",
              "created_at",
              "updated_at",
              "created_by",
              "updated_by",
              "kind",
              "event_type",
              "clock",
              "reason_code",
              "related_event_ids"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "tenant_id": {
                "type": "string",
                "format": "uuid"
              },
              "match_id": {
                "type": "string",
                "format": "uuid"
              },
              "sequence": {
                "type": "integer",
                "minimum": 0
              },
              "occurred_at": {
                "type": "string",
                "format": "date-time"
              },
              "side": {
                "oneOf": [
                  {
                    "type": "string",
                    "enum": [
                      "home",
                      "away"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "subject": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "player"
                        ]
                      },
                      "lineup_entry_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "player_id": {
                        "oneOf": [
                          {
                            "type": "string",
                            "format": "uuid"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "kind",
                      "lineup_entry_id",
                      "player_id"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "team_official"
                        ]
                      },
                      "lineup_official_id": {
                        "type": "string",
                        "format": "uuid"
                      }
                    },
                    "required": [
                      "kind",
                      "lineup_official_id"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "team"
                        ]
                      },
                      "team_id": {
                        "type": "string",
                        "format": "uuid"
                      }
                    },
                    "required": [
                      "kind",
                      "team_id"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "spectator"
                        ]
                      },
                      "incident_subject_ref": {
                        "type": "string",
                        "format": "uuid"
                      }
                    },
                    "required": [
                      "kind",
                      "incident_subject_ref"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "venue"
                        ]
                      },
                      "field_id": {
                        "type": "string",
                        "format": "uuid"
                      }
                    },
                    "required": [
                      "kind",
                      "field_id"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "match"
                        ]
                      },
                      "match_id": {
                        "type": "string",
                        "format": "uuid"
                      }
                    },
                    "required": [
                      "kind",
                      "match_id"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "none"
                        ]
                      }
                    },
                    "required": [
                      "kind"
                    ]
                  }
                ]
              },
              "author_user_id": {
                "type": "string",
                "format": "uuid"
              },
              "idempotency_key": {
                "type": "string",
                "minLength": 8,
                "maxLength": 200
              },
              "note": {
                "oneOf": [
                  {
                    "type": "string",
                    "maxLength": 2000
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "created_by": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "updated_by": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "kind": {
                "type": "string",
                "enum": [
                  "shootout_attempt"
                ]
              },
              "clock": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "shootout"
                    ]
                  },
                  "attempt_number": {
                    "type": "integer",
                    "exclusiveMinimum": 0
                  },
                  "side": {
                    "type": "string",
                    "enum": [
                      "home",
                      "away"
                    ]
                  },
                  "sudden_death": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "kind",
                  "attempt_number",
                  "side",
                  "sudden_death"
                ]
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "scored",
                  "missed",
                  "saved"
                ]
              }
            },
            "required": [
              "id",
              "tenant_id",
              "match_id",
              "sequence",
              "occurred_at",
              "side",
              "subject",
              "author_user_id",
              "idempotency_key",
              "note",
              "created_at",
              "updated_at",
              "created_by",
              "updated_by",
              "kind",
              "clock",
              "outcome"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "tenant_id": {
                "type": "string",
                "format": "uuid"
              },
              "match_id": {
                "type": "string",
                "format": "uuid"
              },
              "sequence": {
                "type": "integer",
                "minimum": 0
              },
              "occurred_at": {
                "type": "string",
                "format": "date-time"
              },
              "side": {
                "oneOf": [
                  {
                    "type": "string",
                    "enum": [
                      "home",
                      "away"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "subject": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "player"
                        ]
                      },
                      "lineup_entry_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "player_id": {
                        "oneOf": [
                          {
                            "type": "string",
                            "format": "uuid"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "kind",
                      "lineup_entry_id",
                      "player_id"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "team_official"
                        ]
                      },
                      "lineup_official_id": {
                        "type": "string",
                        "format": "uuid"
                      }
                    },
                    "required": [
                      "kind",
                      "lineup_official_id"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "team"
                        ]
                      },
                      "team_id": {
                        "type": "string",
                        "format": "uuid"
                      }
                    },
                    "required": [
                      "kind",
                      "team_id"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "spectator"
                        ]
                      },
                      "incident_subject_ref": {
                        "type": "string",
                        "format": "uuid"
                      }
                    },
                    "required": [
                      "kind",
                      "incident_subject_ref"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "venue"
                        ]
                      },
                      "field_id": {
                        "type": "string",
                        "format": "uuid"
                      }
                    },
                    "required": [
                      "kind",
                      "field_id"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "match"
                        ]
                      },
                      "match_id": {
                        "type": "string",
                        "format": "uuid"
                      }
                    },
                    "required": [
                      "kind",
                      "match_id"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "none"
                        ]
                      }
                    },
                    "required": [
                      "kind"
                    ]
                  }
                ]
              },
              "author_user_id": {
                "type": "string",
                "format": "uuid"
              },
              "idempotency_key": {
                "type": "string",
                "minLength": 8,
                "maxLength": 200
              },
              "note": {
                "oneOf": [
                  {
                    "type": "string",
                    "maxLength": 2000
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "created_by": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "updated_by": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "kind": {
                "type": "string",
                "enum": [
                  "incident"
                ]
              },
              "incident_type": {
                "type": "string",
                "enum": [
                  "delay",
                  "suspension",
                  "abandonment",
                  "pitch_invasion",
                  "unsafe_venue",
                  "other"
                ]
              },
              "clock": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "period"
                        ]
                      },
                      "period": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "regulation"
                                ]
                              },
                              "number": {
                                "type": "integer",
                                "minimum": 1,
                                "maximum": 4
                              }
                            },
                            "required": [
                              "kind",
                              "number"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "extra_time"
                                ]
                              },
                              "number": {
                                "type": "integer",
                                "minimum": 1,
                                "maximum": 2
                              }
                            },
                            "required": [
                              "kind",
                              "number"
                            ]
                          }
                        ]
                      },
                      "minute": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "stoppage_minute": {
                        "type": "integer",
                        "minimum": 0
                      }
                    },
                    "required": [
                      "kind",
                      "period",
                      "minute",
                      "stoppage_minute"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "noted",
                  "temporarily_suspended",
                  "abandoned"
                ]
              }
            },
            "required": [
              "id",
              "tenant_id",
              "match_id",
              "sequence",
              "occurred_at",
              "side",
              "subject",
              "author_user_id",
              "idempotency_key",
              "note",
              "created_at",
              "updated_at",
              "created_by",
              "updated_by",
              "kind",
              "incident_type",
              "clock",
              "outcome"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "tenant_id": {
                "type": "string",
                "format": "uuid"
              },
              "match_id": {
                "type": "string",
                "format": "uuid"
              },
              "sequence": {
                "type": "integer",
                "minimum": 0
              },
              "occurred_at": {
                "type": "string",
                "format": "date-time"
              },
              "side": {
                "oneOf": [
                  {
                    "type": "string",
                    "enum": [
                      "home",
                      "away"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "subject": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "team"
                        ]
                      },
                      "team_id": {
                        "type": "string",
                        "format": "uuid"
                      }
                    },
                    "required": [
                      "kind",
                      "team_id"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "match"
                        ]
                      },
                      "match_id": {
                        "type": "string",
                        "format": "uuid"
                      }
                    },
                    "required": [
                      "kind",
                      "match_id"
                    ]
                  }
                ]
              },
              "author_user_id": {
                "type": "string",
                "format": "uuid"
              },
              "idempotency_key": {
                "type": "string",
                "minLength": 8,
                "maxLength": 200
              },
              "note": {
                "oneOf": [
                  {
                    "type": "string",
                    "maxLength": 2000
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "created_by": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "updated_by": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "kind": {
                "type": "string",
                "enum": [
                  "administrative"
                ]
              },
              "event_type": {
                "type": "string",
                "enum": [
                  "no_show_recorded",
                  "forfeit_proposed",
                  "forfeit_awarded",
                  "sub_iudice_opened",
                  "sub_iudice_closed"
                ]
              },
              "clock": {
                "type": "null"
              },
              "reason_code": {
                "type": "string",
                "minLength": 1,
                "maxLength": 120
              },
              "proceeding_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "id",
              "tenant_id",
              "match_id",
              "sequence",
              "occurred_at",
              "side",
              "subject",
              "author_user_id",
              "idempotency_key",
              "note",
              "created_at",
              "updated_at",
              "created_by",
              "updated_by",
              "kind",
              "event_type",
              "clock",
              "reason_code",
              "proceeding_id"
            ]
          }
        ]
      },
      "MatchParticipation": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "not_listed"
                ]
              },
              "lineup_entry_id": {
                "type": "null"
              },
              "player_id": {
                "type": "string",
                "format": "uuid"
              },
              "in_lineup": {
                "type": "boolean",
                "enum": [
                  false
                ]
              },
              "starting": {
                "type": "boolean",
                "enum": [
                  false
                ]
              },
              "entered": {
                "type": "boolean",
                "enum": [
                  false
                ]
              },
              "minutes_played": {
                "type": "number",
                "enum": [
                  0
                ]
              },
              "intervals": {
                "type": "array",
                "prefixItems": []
              }
            },
            "required": [
              "status",
              "lineup_entry_id",
              "player_id",
              "in_lineup",
              "starting",
              "entered",
              "minutes_played",
              "intervals"
            ]
          },
          {
            "type": "object",
            "properties": {
              "lineup_entry_id": {
                "type": "string",
                "format": "uuid"
              },
              "player_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "in_lineup": {
                "type": "boolean",
                "enum": [
                  true
                ]
              },
              "minutes_played": {
                "oneOf": [
                  {
                    "type": "integer",
                    "minimum": 0
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "intervals": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "entered_at": {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "enum": [
                            "period"
                          ]
                        },
                        "period": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "regulation"
                                  ]
                                },
                                "number": {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 4
                                }
                              },
                              "required": [
                                "kind",
                                "number"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "extra_time"
                                  ]
                                },
                                "number": {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 2
                                }
                              },
                              "required": [
                                "kind",
                                "number"
                              ]
                            }
                          ]
                        },
                        "minute": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "stoppage_minute": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "kind",
                        "period",
                        "minute",
                        "stoppage_minute"
                      ]
                    },
                    "left_at": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "period"
                              ]
                            },
                            "period": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "kind": {
                                      "type": "string",
                                      "enum": [
                                        "regulation"
                                      ]
                                    },
                                    "number": {
                                      "type": "integer",
                                      "minimum": 1,
                                      "maximum": 4
                                    }
                                  },
                                  "required": [
                                    "kind",
                                    "number"
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "kind": {
                                      "type": "string",
                                      "enum": [
                                        "extra_time"
                                      ]
                                    },
                                    "number": {
                                      "type": "integer",
                                      "minimum": 1,
                                      "maximum": 2
                                    }
                                  },
                                  "required": [
                                    "kind",
                                    "number"
                                  ]
                                }
                              ]
                            },
                            "minute": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "stoppage_minute": {
                              "type": "integer",
                              "minimum": 0
                            }
                          },
                          "required": [
                            "kind",
                            "period",
                            "minute",
                            "stoppage_minute"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "entered_at",
                    "left_at"
                  ]
                }
              },
              "status": {
                "type": "string",
                "enum": [
                  "starter"
                ]
              },
              "starting": {
                "type": "boolean",
                "enum": [
                  true
                ]
              },
              "entered": {
                "type": "boolean",
                "enum": [
                  true
                ]
              }
            },
            "required": [
              "lineup_entry_id",
              "player_id",
              "in_lineup",
              "minutes_played",
              "intervals",
              "status",
              "starting",
              "entered"
            ]
          },
          {
            "type": "object",
            "properties": {
              "lineup_entry_id": {
                "type": "string",
                "format": "uuid"
              },
              "player_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "in_lineup": {
                "type": "boolean",
                "enum": [
                  true
                ]
              },
              "minutes_played": {
                "oneOf": [
                  {
                    "type": "integer",
                    "minimum": 0
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "intervals": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "entered_at": {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "enum": [
                            "period"
                          ]
                        },
                        "period": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "regulation"
                                  ]
                                },
                                "number": {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 4
                                }
                              },
                              "required": [
                                "kind",
                                "number"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "extra_time"
                                  ]
                                },
                                "number": {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 2
                                }
                              },
                              "required": [
                                "kind",
                                "number"
                              ]
                            }
                          ]
                        },
                        "minute": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "stoppage_minute": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "kind",
                        "period",
                        "minute",
                        "stoppage_minute"
                      ]
                    },
                    "left_at": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "period"
                              ]
                            },
                            "period": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "kind": {
                                      "type": "string",
                                      "enum": [
                                        "regulation"
                                      ]
                                    },
                                    "number": {
                                      "type": "integer",
                                      "minimum": 1,
                                      "maximum": 4
                                    }
                                  },
                                  "required": [
                                    "kind",
                                    "number"
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "kind": {
                                      "type": "string",
                                      "enum": [
                                        "extra_time"
                                      ]
                                    },
                                    "number": {
                                      "type": "integer",
                                      "minimum": 1,
                                      "maximum": 2
                                    }
                                  },
                                  "required": [
                                    "kind",
                                    "number"
                                  ]
                                }
                              ]
                            },
                            "minute": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "stoppage_minute": {
                              "type": "integer",
                              "minimum": 0
                            }
                          },
                          "required": [
                            "kind",
                            "period",
                            "minute",
                            "stoppage_minute"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "entered_at",
                    "left_at"
                  ]
                }
              },
              "status": {
                "type": "string",
                "enum": [
                  "substitute_entered"
                ]
              },
              "starting": {
                "type": "boolean",
                "enum": [
                  false
                ]
              },
              "entered": {
                "type": "boolean",
                "enum": [
                  true
                ]
              }
            },
            "required": [
              "lineup_entry_id",
              "player_id",
              "in_lineup",
              "minutes_played",
              "intervals",
              "status",
              "starting",
              "entered"
            ]
          },
          {
            "type": "object",
            "properties": {
              "lineup_entry_id": {
                "type": "string",
                "format": "uuid"
              },
              "player_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "in_lineup": {
                "type": "boolean",
                "enum": [
                  true
                ]
              },
              "minutes_played": {
                "type": "number",
                "enum": [
                  0
                ]
              },
              "intervals": {
                "type": "array",
                "prefixItems": []
              },
              "status": {
                "type": "string",
                "enum": [
                  "substitute_not_entered"
                ]
              },
              "starting": {
                "type": "boolean",
                "enum": [
                  false
                ]
              },
              "entered": {
                "type": "boolean",
                "enum": [
                  false
                ]
              }
            },
            "required": [
              "lineup_entry_id",
              "player_id",
              "in_lineup",
              "minutes_played",
              "intervals",
              "status",
              "starting",
              "entered"
            ]
          },
          {
            "type": "object",
            "properties": {
              "lineup_entry_id": {
                "type": "string",
                "format": "uuid"
              },
              "player_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "in_lineup": {
                "type": "boolean",
                "enum": [
                  true
                ]
              },
              "minutes_played": {
                "type": "null"
              },
              "intervals": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "entered_at": {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "enum": [
                            "period"
                          ]
                        },
                        "period": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "regulation"
                                  ]
                                },
                                "number": {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 4
                                }
                              },
                              "required": [
                                "kind",
                                "number"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "extra_time"
                                  ]
                                },
                                "number": {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 2
                                }
                              },
                              "required": [
                                "kind",
                                "number"
                              ]
                            }
                          ]
                        },
                        "minute": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "stoppage_minute": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "kind",
                        "period",
                        "minute",
                        "stoppage_minute"
                      ]
                    },
                    "left_at": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "period"
                              ]
                            },
                            "period": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "kind": {
                                      "type": "string",
                                      "enum": [
                                        "regulation"
                                      ]
                                    },
                                    "number": {
                                      "type": "integer",
                                      "minimum": 1,
                                      "maximum": 4
                                    }
                                  },
                                  "required": [
                                    "kind",
                                    "number"
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "kind": {
                                      "type": "string",
                                      "enum": [
                                        "extra_time"
                                      ]
                                    },
                                    "number": {
                                      "type": "integer",
                                      "minimum": 1,
                                      "maximum": 2
                                    }
                                  },
                                  "required": [
                                    "kind",
                                    "number"
                                  ]
                                }
                              ]
                            },
                            "minute": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "stoppage_minute": {
                              "type": "integer",
                              "minimum": 0
                            }
                          },
                          "required": [
                            "kind",
                            "period",
                            "minute",
                            "stoppage_minute"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "entered_at",
                    "left_at"
                  ]
                }
              },
              "status": {
                "type": "string",
                "enum": [
                  "not_verifiable"
                ]
              },
              "starting": {
                "type": "boolean"
              },
              "entered": {
                "type": "boolean"
              }
            },
            "required": [
              "lineup_entry_id",
              "player_id",
              "in_lineup",
              "minutes_played",
              "intervals",
              "status",
              "starting",
              "entered"
            ]
          }
        ]
      },
      "MatchParticipationRecord": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "match_id": {
            "type": "string",
            "format": "uuid"
          },
          "report_version_id": {
            "type": "string",
            "format": "uuid"
          },
          "participation": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "not_listed"
                    ]
                  },
                  "lineup_entry_id": {
                    "type": "null"
                  },
                  "player_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "in_lineup": {
                    "type": "boolean",
                    "enum": [
                      false
                    ]
                  },
                  "starting": {
                    "type": "boolean",
                    "enum": [
                      false
                    ]
                  },
                  "entered": {
                    "type": "boolean",
                    "enum": [
                      false
                    ]
                  },
                  "minutes_played": {
                    "type": "number",
                    "enum": [
                      0
                    ]
                  },
                  "intervals": {
                    "type": "array",
                    "prefixItems": []
                  }
                },
                "required": [
                  "status",
                  "lineup_entry_id",
                  "player_id",
                  "in_lineup",
                  "starting",
                  "entered",
                  "minutes_played",
                  "intervals"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "lineup_entry_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "player_id": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "in_lineup": {
                    "type": "boolean",
                    "enum": [
                      true
                    ]
                  },
                  "minutes_played": {
                    "oneOf": [
                      {
                        "type": "integer",
                        "minimum": 0
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "intervals": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "entered_at": {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "period"
                              ]
                            },
                            "period": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "kind": {
                                      "type": "string",
                                      "enum": [
                                        "regulation"
                                      ]
                                    },
                                    "number": {
                                      "type": "integer",
                                      "minimum": 1,
                                      "maximum": 4
                                    }
                                  },
                                  "required": [
                                    "kind",
                                    "number"
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "kind": {
                                      "type": "string",
                                      "enum": [
                                        "extra_time"
                                      ]
                                    },
                                    "number": {
                                      "type": "integer",
                                      "minimum": 1,
                                      "maximum": 2
                                    }
                                  },
                                  "required": [
                                    "kind",
                                    "number"
                                  ]
                                }
                              ]
                            },
                            "minute": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "stoppage_minute": {
                              "type": "integer",
                              "minimum": 0
                            }
                          },
                          "required": [
                            "kind",
                            "period",
                            "minute",
                            "stoppage_minute"
                          ]
                        },
                        "left_at": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "period"
                                  ]
                                },
                                "period": {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "kind": {
                                          "type": "string",
                                          "enum": [
                                            "regulation"
                                          ]
                                        },
                                        "number": {
                                          "type": "integer",
                                          "minimum": 1,
                                          "maximum": 4
                                        }
                                      },
                                      "required": [
                                        "kind",
                                        "number"
                                      ]
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "kind": {
                                          "type": "string",
                                          "enum": [
                                            "extra_time"
                                          ]
                                        },
                                        "number": {
                                          "type": "integer",
                                          "minimum": 1,
                                          "maximum": 2
                                        }
                                      },
                                      "required": [
                                        "kind",
                                        "number"
                                      ]
                                    }
                                  ]
                                },
                                "minute": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "stoppage_minute": {
                                  "type": "integer",
                                  "minimum": 0
                                }
                              },
                              "required": [
                                "kind",
                                "period",
                                "minute",
                                "stoppage_minute"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "entered_at",
                        "left_at"
                      ]
                    }
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "starter"
                    ]
                  },
                  "starting": {
                    "type": "boolean",
                    "enum": [
                      true
                    ]
                  },
                  "entered": {
                    "type": "boolean",
                    "enum": [
                      true
                    ]
                  }
                },
                "required": [
                  "lineup_entry_id",
                  "player_id",
                  "in_lineup",
                  "minutes_played",
                  "intervals",
                  "status",
                  "starting",
                  "entered"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "lineup_entry_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "player_id": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "in_lineup": {
                    "type": "boolean",
                    "enum": [
                      true
                    ]
                  },
                  "minutes_played": {
                    "oneOf": [
                      {
                        "type": "integer",
                        "minimum": 0
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "intervals": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "entered_at": {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "period"
                              ]
                            },
                            "period": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "kind": {
                                      "type": "string",
                                      "enum": [
                                        "regulation"
                                      ]
                                    },
                                    "number": {
                                      "type": "integer",
                                      "minimum": 1,
                                      "maximum": 4
                                    }
                                  },
                                  "required": [
                                    "kind",
                                    "number"
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "kind": {
                                      "type": "string",
                                      "enum": [
                                        "extra_time"
                                      ]
                                    },
                                    "number": {
                                      "type": "integer",
                                      "minimum": 1,
                                      "maximum": 2
                                    }
                                  },
                                  "required": [
                                    "kind",
                                    "number"
                                  ]
                                }
                              ]
                            },
                            "minute": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "stoppage_minute": {
                              "type": "integer",
                              "minimum": 0
                            }
                          },
                          "required": [
                            "kind",
                            "period",
                            "minute",
                            "stoppage_minute"
                          ]
                        },
                        "left_at": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "period"
                                  ]
                                },
                                "period": {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "kind": {
                                          "type": "string",
                                          "enum": [
                                            "regulation"
                                          ]
                                        },
                                        "number": {
                                          "type": "integer",
                                          "minimum": 1,
                                          "maximum": 4
                                        }
                                      },
                                      "required": [
                                        "kind",
                                        "number"
                                      ]
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "kind": {
                                          "type": "string",
                                          "enum": [
                                            "extra_time"
                                          ]
                                        },
                                        "number": {
                                          "type": "integer",
                                          "minimum": 1,
                                          "maximum": 2
                                        }
                                      },
                                      "required": [
                                        "kind",
                                        "number"
                                      ]
                                    }
                                  ]
                                },
                                "minute": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "stoppage_minute": {
                                  "type": "integer",
                                  "minimum": 0
                                }
                              },
                              "required": [
                                "kind",
                                "period",
                                "minute",
                                "stoppage_minute"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "entered_at",
                        "left_at"
                      ]
                    }
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "substitute_entered"
                    ]
                  },
                  "starting": {
                    "type": "boolean",
                    "enum": [
                      false
                    ]
                  },
                  "entered": {
                    "type": "boolean",
                    "enum": [
                      true
                    ]
                  }
                },
                "required": [
                  "lineup_entry_id",
                  "player_id",
                  "in_lineup",
                  "minutes_played",
                  "intervals",
                  "status",
                  "starting",
                  "entered"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "lineup_entry_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "player_id": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "in_lineup": {
                    "type": "boolean",
                    "enum": [
                      true
                    ]
                  },
                  "minutes_played": {
                    "type": "number",
                    "enum": [
                      0
                    ]
                  },
                  "intervals": {
                    "type": "array",
                    "prefixItems": []
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "substitute_not_entered"
                    ]
                  },
                  "starting": {
                    "type": "boolean",
                    "enum": [
                      false
                    ]
                  },
                  "entered": {
                    "type": "boolean",
                    "enum": [
                      false
                    ]
                  }
                },
                "required": [
                  "lineup_entry_id",
                  "player_id",
                  "in_lineup",
                  "minutes_played",
                  "intervals",
                  "status",
                  "starting",
                  "entered"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "lineup_entry_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "player_id": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "in_lineup": {
                    "type": "boolean",
                    "enum": [
                      true
                    ]
                  },
                  "minutes_played": {
                    "type": "null"
                  },
                  "intervals": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "entered_at": {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "period"
                              ]
                            },
                            "period": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "kind": {
                                      "type": "string",
                                      "enum": [
                                        "regulation"
                                      ]
                                    },
                                    "number": {
                                      "type": "integer",
                                      "minimum": 1,
                                      "maximum": 4
                                    }
                                  },
                                  "required": [
                                    "kind",
                                    "number"
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "kind": {
                                      "type": "string",
                                      "enum": [
                                        "extra_time"
                                      ]
                                    },
                                    "number": {
                                      "type": "integer",
                                      "minimum": 1,
                                      "maximum": 2
                                    }
                                  },
                                  "required": [
                                    "kind",
                                    "number"
                                  ]
                                }
                              ]
                            },
                            "minute": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "stoppage_minute": {
                              "type": "integer",
                              "minimum": 0
                            }
                          },
                          "required": [
                            "kind",
                            "period",
                            "minute",
                            "stoppage_minute"
                          ]
                        },
                        "left_at": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "period"
                                  ]
                                },
                                "period": {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "kind": {
                                          "type": "string",
                                          "enum": [
                                            "regulation"
                                          ]
                                        },
                                        "number": {
                                          "type": "integer",
                                          "minimum": 1,
                                          "maximum": 4
                                        }
                                      },
                                      "required": [
                                        "kind",
                                        "number"
                                      ]
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "kind": {
                                          "type": "string",
                                          "enum": [
                                            "extra_time"
                                          ]
                                        },
                                        "number": {
                                          "type": "integer",
                                          "minimum": 1,
                                          "maximum": 2
                                        }
                                      },
                                      "required": [
                                        "kind",
                                        "number"
                                      ]
                                    }
                                  ]
                                },
                                "minute": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "stoppage_minute": {
                                  "type": "integer",
                                  "minimum": 0
                                }
                              },
                              "required": [
                                "kind",
                                "period",
                                "minute",
                                "stoppage_minute"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "entered_at",
                        "left_at"
                      ]
                    }
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "not_verifiable"
                    ]
                  },
                  "starting": {
                    "type": "boolean"
                  },
                  "entered": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "lineup_entry_id",
                  "player_id",
                  "in_lineup",
                  "minutes_played",
                  "intervals",
                  "status",
                  "starting",
                  "entered"
                ]
              }
            ]
          },
          "scope": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "schema_version": {
                    "type": "number",
                    "enum": [
                      1
                    ]
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "tenant"
                    ]
                  },
                  "tenant_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "league_id": {
                    "type": "null"
                  },
                  "match_id": {
                    "type": "null"
                  }
                },
                "required": [
                  "schema_version",
                  "kind",
                  "tenant_id",
                  "league_id",
                  "match_id"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "schema_version": {
                    "type": "number",
                    "enum": [
                      1
                    ]
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "league"
                    ]
                  },
                  "tenant_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "league_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "match_id": {
                    "type": "null"
                  }
                },
                "required": [
                  "schema_version",
                  "kind",
                  "tenant_id",
                  "league_id",
                  "match_id"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "schema_version": {
                    "type": "number",
                    "enum": [
                      1
                    ]
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "match"
                    ]
                  },
                  "tenant_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "league_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "match_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "schema_version",
                  "kind",
                  "tenant_id",
                  "league_id",
                  "match_id"
                ]
              }
            ]
          },
          "officiality": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "schema_version": {
                    "type": "number",
                    "enum": [
                      1
                    ]
                  },
                  "state": {
                    "type": "string",
                    "enum": [
                      "provisional"
                    ]
                  },
                  "report_lifecycle": {
                    "type": "string",
                    "enum": [
                      "draft",
                      "submitted",
                      "approved"
                    ]
                  },
                  "report_version_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "report_version": {
                    "type": "integer",
                    "exclusiveMinimum": 0
                  },
                  "publication_eligible": {
                    "type": "boolean",
                    "enum": [
                      false
                    ]
                  },
                  "homologated_at": {
                    "type": "null"
                  },
                  "is_sub_iudice": {
                    "type": "boolean"
                  },
                  "reason": {
                    "type": "object",
                    "properties": {
                      "code": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "message": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 1000
                      },
                      "retryable": {
                        "type": "boolean"
                      },
                      "recovery_action": {
                        "oneOf": [
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 500
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "code",
                      "message",
                      "retryable",
                      "recovery_action"
                    ]
                  }
                },
                "required": [
                  "schema_version",
                  "state",
                  "report_lifecycle",
                  "report_version_id",
                  "report_version",
                  "publication_eligible",
                  "homologated_at",
                  "is_sub_iudice",
                  "reason"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "schema_version": {
                    "type": "number",
                    "enum": [
                      1
                    ]
                  },
                  "state": {
                    "type": "string",
                    "enum": [
                      "homologated"
                    ]
                  },
                  "report_lifecycle": {
                    "type": "string",
                    "enum": [
                      "homologated"
                    ]
                  },
                  "report_version_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "report_version": {
                    "type": "integer",
                    "exclusiveMinimum": 0
                  },
                  "publication_eligible": {
                    "type": "boolean",
                    "enum": [
                      true
                    ]
                  },
                  "homologated_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "is_sub_iudice": {
                    "type": "boolean"
                  },
                  "reason": {
                    "type": "null"
                  }
                },
                "required": [
                  "schema_version",
                  "state",
                  "report_lifecycle",
                  "report_version_id",
                  "report_version",
                  "publication_eligible",
                  "homologated_at",
                  "is_sub_iudice",
                  "reason"
                ]
              }
            ]
          },
          "ruleset": {
            "type": "object",
            "properties": {
              "schema_version": {
                "type": "number",
                "enum": [
                  1
                ]
              },
              "revision_id": {
                "type": "string",
                "format": "uuid"
              },
              "content_hash": {
                "type": "string",
                "pattern": "^[0-9a-f]{64}$"
              },
              "provenance_label": {
                "type": "string",
                "minLength": 1,
                "maxLength": 240
              },
              "signed_document": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "state": {
                        "type": "string",
                        "enum": [
                          "disabled"
                        ]
                      },
                      "reason": {
                        "type": "string",
                        "enum": [
                          "owner_input_required",
                          "provider_not_configured",
                          "bridge_not_implemented"
                        ]
                      },
                      "enabled_at": {
                        "type": "null"
                      }
                    },
                    "required": [
                      "state",
                      "reason",
                      "enabled_at"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "state": {
                        "type": "string",
                        "enum": [
                          "enabled"
                        ]
                      },
                      "configuration_revision_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "enabled_at": {
                        "type": "string",
                        "format": "date-time"
                      }
                    },
                    "required": [
                      "state",
                      "configuration_revision_id",
                      "enabled_at"
                    ]
                  }
                ]
              }
            },
            "required": [
              "schema_version",
              "revision_id",
              "content_hash",
              "provenance_label",
              "signed_document"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "updated_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "tenant_id",
          "match_id",
          "report_version_id",
          "participation",
          "created_at",
          "updated_at",
          "created_by",
          "updated_by"
        ]
      },
      "PlayerEvaluationOutcome": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "graded"
                ]
              },
              "value": {
                "type": "number",
                "minimum": 1,
                "maximum": 10
              }
            },
            "required": [
              "kind",
              "value"
            ]
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "no_grade"
                ]
              },
              "reason": {
                "type": "string",
                "enum": [
                  "not_entered",
                  "not_listed",
                  "insufficient_observation",
                  "match_not_played",
                  "not_verifiable"
                ]
              }
            },
            "required": [
              "kind",
              "reason"
            ]
          }
        ]
      },
      "CompetitionPhase": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "tournament_id": {
            "type": "string",
            "format": "uuid"
          },
          "label": {
            "type": "string",
            "minLength": 1
          },
          "order_index": {
            "type": "integer",
            "minimum": 0
          },
          "kind": {
            "type": "string",
            "enum": [
              "group_stage",
              "league",
              "knockout",
              "placement"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "active",
              "closed"
            ]
          },
          "starts_on": {
            "oneOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ]
          },
          "ends_on": {
            "oneOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "updated_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "tenant_id",
          "tournament_id",
          "label",
          "order_index",
          "kind",
          "status",
          "starts_on",
          "ends_on",
          "created_at",
          "updated_at",
          "created_by",
          "updated_by"
        ]
      },
      "TournamentGroupTeam": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "tournament_id": {
            "type": "string",
            "format": "uuid"
          },
          "phase_id": {
            "type": "string",
            "format": "uuid"
          },
          "group_id": {
            "type": "string",
            "format": "uuid"
          },
          "team_id": {
            "type": "string",
            "format": "uuid"
          },
          "membership_revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "effective_from_round_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "active": {
            "type": "boolean"
          },
          "previous_membership_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "source_membership_event_id": {
            "type": "string",
            "format": "uuid"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "updated_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "tenant_id",
          "tournament_id",
          "phase_id",
          "group_id",
          "team_id",
          "membership_revision",
          "effective_from_round_id",
          "active",
          "previous_membership_id",
          "source_membership_event_id",
          "created_at",
          "updated_at",
          "created_by",
          "updated_by"
        ]
      },
      "TournamentGroupMembershipEvent": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "tournament_id": {
            "type": "string",
            "format": "uuid"
          },
          "phase_id": {
            "type": "string",
            "format": "uuid"
          },
          "group_id": {
            "type": "string",
            "format": "uuid"
          },
          "team_id": {
            "type": "string",
            "format": "uuid"
          },
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "previous_event_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "action": {
            "type": "string",
            "enum": [
              "add",
              "remove"
            ]
          },
          "effective_from_round_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "reason": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1000
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "updated_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "tenant_id",
          "tournament_id",
          "phase_id",
          "group_id",
          "team_id",
          "revision",
          "previous_event_id",
          "action",
          "effective_from_round_id",
          "reason",
          "created_at",
          "updated_at",
          "created_by",
          "updated_by"
        ]
      },
      "CompetitionRulesetRevision": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "tournament_id": {
            "type": "string",
            "format": "uuid"
          },
          "players_per_side": {
            "type": "integer",
            "minimum": 5,
            "maximum": 11
          },
          "minimum_players_to_start": {
            "type": "integer",
            "minimum": 1,
            "maximum": 11
          },
          "match_duration_minutes": {
            "type": "integer",
            "minimum": 20,
            "maximum": 120
          },
          "periods": {
            "type": "integer",
            "minimum": 1,
            "maximum": 4
          },
          "stoppage_time_policy": {
            "type": "string",
            "enum": [
              "referee_declared",
              "none"
            ]
          },
          "substitution_policy": {
            "type": "string",
            "enum": [
              "rolling",
              "limited",
              "none"
            ]
          },
          "max_subs_per_team": {
            "type": "integer",
            "minimum": 0,
            "maximum": 20
          },
          "max_bench_players": {
            "type": "integer",
            "minimum": 0,
            "maximum": 20
          },
          "max_roster_players": {
            "type": "integer",
            "minimum": 1,
            "maximum": 50
          },
          "minimum_player_age": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100
          },
          "minimum_player_age_reference": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "registration_effective_date",
                  "tournament_start",
                  "season_start"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "forfeit_score_home": {
            "type": "integer",
            "minimum": 0,
            "maximum": 20
          },
          "forfeit_score_away": {
            "type": "integer",
            "minimum": 0,
            "maximum": 20
          },
          "forfeit_points_penalty": {
            "type": "integer",
            "maximum": -1
          },
          "forfeit_triggers": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "no_show",
                    "ineligible_player",
                    "roster_below_minimum",
                    "late_result_confirmation_both_secretariats"
                  ]
                },
                "enabled": {
                  "type": "boolean"
                },
                "after_days": {
                  "oneOf": [
                    {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 30
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "kind",
                "enabled",
                "after_days"
              ]
            },
            "minItems": 1,
            "maxItems": 4
          },
          "points": {
            "type": "object",
            "properties": {
              "win": {
                "type": "integer",
                "minimum": 0,
                "maximum": 10
              },
              "draw": {
                "type": "integer",
                "minimum": 0,
                "maximum": 10
              },
              "loss": {
                "type": "integer",
                "minimum": 0,
                "maximum": 10
              },
              "shootout": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "winner": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 10
                      },
                      "loser": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 10
                      }
                    },
                    "required": [
                      "winner",
                      "loser"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "win",
              "draw",
              "loss"
            ]
          },
          "tiebreakers": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "points",
                "goal_difference",
                "goals_for",
                "head_to_head",
                "head_to_head_goals_for",
                "wins",
                "disciplinary",
                "draw",
                "team_id_asc"
              ]
            },
            "minItems": 1
          },
          "yellow_cards_to_suspension": {
            "type": "integer",
            "minimum": 0,
            "maximum": 20
          },
          "red_card_immediate_ban_matches": {
            "type": "integer",
            "minimum": 0,
            "maximum": 10
          },
          "yellow_cards_to_diffida": {
            "type": "integer",
            "minimum": 0,
            "maximum": 20
          },
          "second_yellow_ban_matches": {
            "type": "integer",
            "minimum": 0,
            "maximum": 10
          },
          "matchday_deadline_offsets": {
            "type": "object",
            "properties": {
              "availability_minutes_before_kickoff": {
                "type": "integer",
                "minimum": 0,
                "maximum": 20160
              },
              "callup_minutes_before_kickoff": {
                "type": "integer",
                "minimum": 0,
                "maximum": 20160
              },
              "lineup_minutes_before_kickoff": {
                "type": "integer",
                "minimum": 0,
                "maximum": 20160
              }
            },
            "required": [
              "availability_minutes_before_kickoff",
              "callup_minutes_before_kickoff",
              "lineup_minutes_before_kickoff"
            ]
          },
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "previous_revision_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "lifecycle_status": {
            "type": "string",
            "enum": [
              "draft",
              "published",
              "superseded"
            ]
          },
          "effective_from_phase_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "effective_from_round_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "content_hash": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "published_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "frozen_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "updated_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "tenant_id",
          "tournament_id",
          "players_per_side",
          "minimum_players_to_start",
          "match_duration_minutes",
          "periods",
          "stoppage_time_policy",
          "substitution_policy",
          "max_subs_per_team",
          "max_bench_players",
          "forfeit_score_home",
          "forfeit_score_away",
          "forfeit_points_penalty",
          "forfeit_triggers",
          "points",
          "tiebreakers",
          "yellow_cards_to_suspension",
          "red_card_immediate_ban_matches",
          "revision",
          "previous_revision_id",
          "lifecycle_status",
          "effective_from_phase_id",
          "effective_from_round_id",
          "content_hash",
          "published_at",
          "frozen_at",
          "created_at",
          "updated_at",
          "created_by",
          "updated_by"
        ]
      },
      "StandingsDimension": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "scope": {
                "type": "string",
                "enum": [
                  "competition"
                ]
              },
              "tournament_id": {
                "type": "string",
                "format": "uuid"
              },
              "phase_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "group_id": {
                "type": "null"
              }
            },
            "required": [
              "scope",
              "tournament_id",
              "phase_id",
              "group_id"
            ]
          },
          {
            "type": "object",
            "properties": {
              "scope": {
                "type": "string",
                "enum": [
                  "group"
                ]
              },
              "tournament_id": {
                "type": "string",
                "format": "uuid"
              },
              "phase_id": {
                "type": "string",
                "format": "uuid"
              },
              "group_id": {
                "type": "string",
                "format": "uuid"
              }
            },
            "required": [
              "scope",
              "tournament_id",
              "phase_id",
              "group_id"
            ]
          }
        ]
      },
      "DimensionalStanding": {
        "type": "object",
        "properties": {
          "dimension": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "scope": {
                    "type": "string",
                    "enum": [
                      "competition"
                    ]
                  },
                  "tournament_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "phase_id": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "group_id": {
                    "type": "null"
                  }
                },
                "required": [
                  "scope",
                  "tournament_id",
                  "phase_id",
                  "group_id"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "scope": {
                    "type": "string",
                    "enum": [
                      "group"
                    ]
                  },
                  "tournament_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "phase_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "group_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "scope",
                  "tournament_id",
                  "phase_id",
                  "group_id"
                ]
              }
            ]
          },
          "team_id": {
            "type": "string",
            "format": "uuid"
          },
          "played": {
            "type": "integer",
            "minimum": 0
          },
          "won": {
            "type": "integer",
            "minimum": 0
          },
          "drawn": {
            "type": "integer",
            "minimum": 0
          },
          "lost": {
            "type": "integer",
            "minimum": 0
          },
          "goals_for": {
            "type": "integer",
            "minimum": 0
          },
          "goals_against": {
            "type": "integer",
            "minimum": 0
          },
          "goal_difference": {
            "type": "integer"
          },
          "points_on_field": {
            "type": "integer"
          },
          "points_adjustment": {
            "type": "integer"
          },
          "points": {
            "type": "integer"
          },
          "position": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "ranking_status": {
            "type": "string",
            "enum": [
              "resolved",
              "pending_resolution"
            ]
          },
          "projection_revision_id": {
            "type": "string",
            "format": "uuid"
          },
          "ruleset_revision_id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "dimension",
          "team_id",
          "played",
          "won",
          "drawn",
          "lost",
          "goals_for",
          "goals_against",
          "goal_difference",
          "points_on_field",
          "points_adjustment",
          "points",
          "position",
          "ranking_status",
          "projection_revision_id",
          "ruleset_revision_id"
        ]
      },
      "ProjectionRevision": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "source_report_version_id": {
            "type": "string",
            "format": "uuid"
          },
          "source_manifest_hash": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "ruleset_revision_id": {
            "type": "string",
            "format": "uuid"
          },
          "previous_projection_revision_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "kinds": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "standings",
                "discipline",
                "bracket",
                "season",
                "fantasy",
                "feed"
              ]
            },
            "minItems": 1
          },
          "projected_at": {
            "type": "string",
            "format": "date-time"
          },
          "scope": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "schema_version": {
                    "type": "number",
                    "enum": [
                      1
                    ]
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "tenant"
                    ]
                  },
                  "tenant_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "league_id": {
                    "type": "null"
                  },
                  "match_id": {
                    "type": "null"
                  }
                },
                "required": [
                  "schema_version",
                  "kind",
                  "tenant_id",
                  "league_id",
                  "match_id"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "schema_version": {
                    "type": "number",
                    "enum": [
                      1
                    ]
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "league"
                    ]
                  },
                  "tenant_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "league_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "match_id": {
                    "type": "null"
                  }
                },
                "required": [
                  "schema_version",
                  "kind",
                  "tenant_id",
                  "league_id",
                  "match_id"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "schema_version": {
                    "type": "number",
                    "enum": [
                      1
                    ]
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "match"
                    ]
                  },
                  "tenant_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "league_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "match_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "schema_version",
                  "kind",
                  "tenant_id",
                  "league_id",
                  "match_id"
                ]
              }
            ]
          },
          "officiality": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "schema_version": {
                    "type": "number",
                    "enum": [
                      1
                    ]
                  },
                  "state": {
                    "type": "string",
                    "enum": [
                      "provisional"
                    ]
                  },
                  "report_lifecycle": {
                    "type": "string",
                    "enum": [
                      "draft",
                      "submitted",
                      "approved"
                    ]
                  },
                  "report_version_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "report_version": {
                    "type": "integer",
                    "exclusiveMinimum": 0
                  },
                  "publication_eligible": {
                    "type": "boolean",
                    "enum": [
                      false
                    ]
                  },
                  "homologated_at": {
                    "type": "null"
                  },
                  "is_sub_iudice": {
                    "type": "boolean"
                  },
                  "reason": {
                    "type": "object",
                    "properties": {
                      "code": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "message": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 1000
                      },
                      "retryable": {
                        "type": "boolean"
                      },
                      "recovery_action": {
                        "oneOf": [
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 500
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "code",
                      "message",
                      "retryable",
                      "recovery_action"
                    ]
                  }
                },
                "required": [
                  "schema_version",
                  "state",
                  "report_lifecycle",
                  "report_version_id",
                  "report_version",
                  "publication_eligible",
                  "homologated_at",
                  "is_sub_iudice",
                  "reason"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "schema_version": {
                    "type": "number",
                    "enum": [
                      1
                    ]
                  },
                  "state": {
                    "type": "string",
                    "enum": [
                      "homologated"
                    ]
                  },
                  "report_lifecycle": {
                    "type": "string",
                    "enum": [
                      "homologated"
                    ]
                  },
                  "report_version_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "report_version": {
                    "type": "integer",
                    "exclusiveMinimum": 0
                  },
                  "publication_eligible": {
                    "type": "boolean",
                    "enum": [
                      true
                    ]
                  },
                  "homologated_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "is_sub_iudice": {
                    "type": "boolean"
                  },
                  "reason": {
                    "type": "null"
                  }
                },
                "required": [
                  "schema_version",
                  "state",
                  "report_lifecycle",
                  "report_version_id",
                  "report_version",
                  "publication_eligible",
                  "homologated_at",
                  "is_sub_iudice",
                  "reason"
                ]
              }
            ]
          },
          "freshness": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "schema_version": {
                    "type": "number",
                    "enum": [
                      1
                    ]
                  },
                  "state": {
                    "type": "string",
                    "enum": [
                      "fresh"
                    ]
                  },
                  "source_revision": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "generated_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "stale_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "invalidation_cursor": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  },
                  "reason": {
                    "type": "null"
                  }
                },
                "required": [
                  "schema_version",
                  "state",
                  "source_revision",
                  "generated_at",
                  "stale_at",
                  "expires_at",
                  "invalidation_cursor",
                  "reason"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "schema_version": {
                    "type": "number",
                    "enum": [
                      1
                    ]
                  },
                  "state": {
                    "type": "string",
                    "enum": [
                      "stale"
                    ]
                  },
                  "source_revision": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "generated_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "stale_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "invalidation_cursor": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  },
                  "reason": {
                    "type": "object",
                    "properties": {
                      "code": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "message": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 1000
                      },
                      "retryable": {
                        "type": "boolean"
                      },
                      "recovery_action": {
                        "oneOf": [
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 500
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "code",
                      "message",
                      "retryable",
                      "recovery_action"
                    ]
                  }
                },
                "required": [
                  "schema_version",
                  "state",
                  "source_revision",
                  "generated_at",
                  "stale_at",
                  "expires_at",
                  "invalidation_cursor",
                  "reason"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "schema_version": {
                    "type": "number",
                    "enum": [
                      1
                    ]
                  },
                  "state": {
                    "type": "string",
                    "enum": [
                      "expired"
                    ]
                  },
                  "source_revision": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "generated_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "stale_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "invalidation_cursor": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  },
                  "reason": {
                    "type": "object",
                    "properties": {
                      "code": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "message": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 1000
                      },
                      "retryable": {
                        "type": "boolean"
                      },
                      "recovery_action": {
                        "oneOf": [
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 500
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "code",
                      "message",
                      "retryable",
                      "recovery_action"
                    ]
                  }
                },
                "required": [
                  "schema_version",
                  "state",
                  "source_revision",
                  "generated_at",
                  "stale_at",
                  "expires_at",
                  "invalidation_cursor",
                  "reason"
                ]
              }
            ]
          },
          "cache_event": {
            "type": "object",
            "properties": {
              "schema_version": {
                "type": "number",
                "enum": [
                  1
                ]
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "tenant_id": {
                "type": "string",
                "format": "uuid"
              },
              "scope": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "schema_version": {
                        "type": "number",
                        "enum": [
                          1
                        ]
                      },
                      "kind": {
                        "type": "string",
                        "enum": [
                          "tenant"
                        ]
                      },
                      "tenant_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "league_id": {
                        "type": "null"
                      },
                      "match_id": {
                        "type": "null"
                      }
                    },
                    "required": [
                      "schema_version",
                      "kind",
                      "tenant_id",
                      "league_id",
                      "match_id"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "schema_version": {
                        "type": "number",
                        "enum": [
                          1
                        ]
                      },
                      "kind": {
                        "type": "string",
                        "enum": [
                          "league"
                        ]
                      },
                      "tenant_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "league_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "match_id": {
                        "type": "null"
                      }
                    },
                    "required": [
                      "schema_version",
                      "kind",
                      "tenant_id",
                      "league_id",
                      "match_id"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "schema_version": {
                        "type": "number",
                        "enum": [
                          1
                        ]
                      },
                      "kind": {
                        "type": "string",
                        "enum": [
                          "match"
                        ]
                      },
                      "tenant_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "league_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "match_id": {
                        "type": "string",
                        "format": "uuid"
                      }
                    },
                    "required": [
                      "schema_version",
                      "kind",
                      "tenant_id",
                      "league_id",
                      "match_id"
                    ]
                  }
                ]
              },
              "entity": {
                "type": "object",
                "properties": {
                  "entity_type": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "entity_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "entity_version": {
                    "oneOf": [
                      {
                        "type": "integer",
                        "minimum": 0
                      },
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 200
                      }
                    ]
                  }
                },
                "required": [
                  "entity_type",
                  "entity_id",
                  "entity_version"
                ]
              },
              "invalidation_cursor": {
                "type": "string",
                "minLength": 1,
                "maxLength": 300
              },
              "consumers": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120
                },
                "minItems": 1
              },
              "server_timestamp": {
                "type": "string",
                "format": "date-time"
              },
              "correlation_id": {
                "type": "string",
                "minLength": 8,
                "maxLength": 200
              }
            },
            "required": [
              "schema_version",
              "id",
              "tenant_id",
              "scope",
              "entity",
              "invalidation_cursor",
              "consumers",
              "server_timestamp",
              "correlation_id"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "updated_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "tenant_id",
          "revision",
          "source_report_version_id",
          "source_manifest_hash",
          "ruleset_revision_id",
          "previous_projection_revision_id",
          "kinds",
          "projected_at",
          "created_at",
          "updated_at",
          "created_by",
          "updated_by"
        ]
      },
      "DisciplinarySanction": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "tenant_id": {
                "type": "string",
                "format": "uuid"
              },
              "tournament_id": {
                "type": "string",
                "format": "uuid"
              },
              "phase_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "cause": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "public_reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1000
                  },
                  "source": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "report_event"
                            ]
                          },
                          "report_version_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "event_id": {
                            "type": "string",
                            "format": "uuid"
                          }
                        },
                        "required": [
                          "kind",
                          "report_version_id",
                          "event_id"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "committee_decision"
                            ]
                          },
                          "decision_document_id": {
                            "type": "string",
                            "format": "uuid"
                          }
                        },
                        "required": [
                          "kind",
                          "decision_document_id"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "appeal_decision"
                            ]
                          },
                          "proceeding_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "supersedes_sanction_id": {
                            "type": "string",
                            "format": "uuid"
                          }
                        },
                        "required": [
                          "kind",
                          "proceeding_id",
                          "supersedes_sanction_id"
                        ]
                      }
                    ]
                  }
                },
                "required": [
                  "code",
                  "public_reason",
                  "source"
                ]
              },
              "decided_by": {
                "type": "string",
                "format": "uuid"
              },
              "decided_at": {
                "type": "string",
                "format": "date-time"
              },
              "effective_from_round_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "pending",
                  "confirmed",
                  "superseded",
                  "revoked"
                ]
              },
              "ruleset_revision_id": {
                "type": "string",
                "format": "uuid"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "created_by": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "updated_by": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "kind": {
                "type": "string",
                "enum": [
                  "match_suspension"
                ]
              },
              "player_id": {
                "type": "string",
                "format": "uuid"
              },
              "matches_count": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "consumption_tournament_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                },
                "minItems": 1
              },
              "served_by_match_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "next_eligible_match_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "id",
              "tenant_id",
              "tournament_id",
              "phase_id",
              "cause",
              "decided_by",
              "decided_at",
              "effective_from_round_id",
              "status",
              "ruleset_revision_id",
              "created_at",
              "updated_at",
              "created_by",
              "updated_by",
              "kind",
              "player_id",
              "matches_count",
              "consumption_tournament_ids",
              "served_by_match_ids",
              "next_eligible_match_id"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "tenant_id": {
                "type": "string",
                "format": "uuid"
              },
              "tournament_id": {
                "type": "string",
                "format": "uuid"
              },
              "phase_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "cause": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "public_reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1000
                  },
                  "source": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "report_event"
                            ]
                          },
                          "report_version_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "event_id": {
                            "type": "string",
                            "format": "uuid"
                          }
                        },
                        "required": [
                          "kind",
                          "report_version_id",
                          "event_id"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "committee_decision"
                            ]
                          },
                          "decision_document_id": {
                            "type": "string",
                            "format": "uuid"
                          }
                        },
                        "required": [
                          "kind",
                          "decision_document_id"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "appeal_decision"
                            ]
                          },
                          "proceeding_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "supersedes_sanction_id": {
                            "type": "string",
                            "format": "uuid"
                          }
                        },
                        "required": [
                          "kind",
                          "proceeding_id",
                          "supersedes_sanction_id"
                        ]
                      }
                    ]
                  }
                },
                "required": [
                  "code",
                  "public_reason",
                  "source"
                ]
              },
              "decided_by": {
                "type": "string",
                "format": "uuid"
              },
              "decided_at": {
                "type": "string",
                "format": "date-time"
              },
              "effective_from_round_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "pending",
                  "confirmed",
                  "superseded",
                  "revoked"
                ]
              },
              "ruleset_revision_id": {
                "type": "string",
                "format": "uuid"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "created_by": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "updated_by": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "kind": {
                "type": "string",
                "enum": [
                  "standings_penalty"
                ]
              },
              "team_id": {
                "type": "string",
                "format": "uuid"
              },
              "group_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "points_delta": {
                "type": "integer",
                "maximum": -1
              }
            },
            "required": [
              "id",
              "tenant_id",
              "tournament_id",
              "phase_id",
              "cause",
              "decided_by",
              "decided_at",
              "effective_from_round_id",
              "status",
              "ruleset_revision_id",
              "created_at",
              "updated_at",
              "created_by",
              "updated_by",
              "kind",
              "team_id",
              "group_id",
              "points_delta"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "tenant_id": {
                "type": "string",
                "format": "uuid"
              },
              "tournament_id": {
                "type": "string",
                "format": "uuid"
              },
              "phase_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "cause": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "public_reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1000
                  },
                  "source": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "report_event"
                            ]
                          },
                          "report_version_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "event_id": {
                            "type": "string",
                            "format": "uuid"
                          }
                        },
                        "required": [
                          "kind",
                          "report_version_id",
                          "event_id"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "committee_decision"
                            ]
                          },
                          "decision_document_id": {
                            "type": "string",
                            "format": "uuid"
                          }
                        },
                        "required": [
                          "kind",
                          "decision_document_id"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "appeal_decision"
                            ]
                          },
                          "proceeding_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "supersedes_sanction_id": {
                            "type": "string",
                            "format": "uuid"
                          }
                        },
                        "required": [
                          "kind",
                          "proceeding_id",
                          "supersedes_sanction_id"
                        ]
                      }
                    ]
                  }
                },
                "required": [
                  "code",
                  "public_reason",
                  "source"
                ]
              },
              "decided_by": {
                "type": "string",
                "format": "uuid"
              },
              "decided_at": {
                "type": "string",
                "format": "date-time"
              },
              "effective_from_round_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "pending",
                  "confirmed",
                  "superseded",
                  "revoked"
                ]
              },
              "ruleset_revision_id": {
                "type": "string",
                "format": "uuid"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "created_by": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "updated_by": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "kind": {
                "type": "string",
                "enum": [
                  "card_annulment"
                ]
              },
              "player_id": {
                "type": "string",
                "format": "uuid"
              },
              "source_event_id": {
                "type": "string",
                "format": "uuid"
              },
              "replay_from_report_version_id": {
                "type": "string",
                "format": "uuid"
              }
            },
            "required": [
              "id",
              "tenant_id",
              "tournament_id",
              "phase_id",
              "cause",
              "decided_by",
              "decided_at",
              "effective_from_round_id",
              "status",
              "ruleset_revision_id",
              "created_at",
              "updated_at",
              "created_by",
              "updated_by",
              "kind",
              "player_id",
              "source_event_id",
              "replay_from_report_version_id"
            ]
          }
        ]
      },
      "ForfeitProposalV2": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "tournament_id": {
            "type": "string",
            "format": "uuid"
          },
          "match_id": {
            "type": "string",
            "format": "uuid"
          },
          "trigger": {
            "type": "string",
            "enum": [
              "no_show",
              "ineligible_player",
              "roster_below_minimum",
              "late_result_confirmation_both_secretariats"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "submitted",
              "dismissed",
              "decided"
            ]
          },
          "proposed_against_team_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "evidence_refs": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "proposed_by": {
            "type": "string",
            "format": "uuid"
          },
          "resulting_report_version_id": {
            "type": "null"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "updated_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "tenant_id",
          "tournament_id",
          "match_id",
          "trigger",
          "status",
          "proposed_against_team_id",
          "evidence_refs",
          "proposed_by",
          "resulting_report_version_id",
          "created_at",
          "updated_at",
          "created_by",
          "updated_by"
        ]
      },
      "ForfeitDecision": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "tenant_id": {
                "type": "string",
                "format": "uuid"
              },
              "tournament_id": {
                "type": "string",
                "format": "uuid"
              },
              "match_id": {
                "type": "string",
                "format": "uuid"
              },
              "proposal_id": {
                "type": "string",
                "format": "uuid"
              },
              "decided_by": {
                "type": "string",
                "format": "uuid"
              },
              "decided_at": {
                "type": "string",
                "format": "date-time"
              },
              "reason": {
                "type": "string",
                "minLength": 1,
                "maxLength": 1000
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "created_by": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "updated_by": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "decision": {
                "type": "string",
                "enum": [
                  "dismissed"
                ]
              }
            },
            "required": [
              "id",
              "tenant_id",
              "tournament_id",
              "match_id",
              "proposal_id",
              "decided_by",
              "decided_at",
              "reason",
              "created_at",
              "updated_at",
              "created_by",
              "updated_by",
              "decision"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "tenant_id": {
                "type": "string",
                "format": "uuid"
              },
              "tournament_id": {
                "type": "string",
                "format": "uuid"
              },
              "match_id": {
                "type": "string",
                "format": "uuid"
              },
              "proposal_id": {
                "type": "string",
                "format": "uuid"
              },
              "decided_by": {
                "type": "string",
                "format": "uuid"
              },
              "decided_at": {
                "type": "string",
                "format": "date-time"
              },
              "reason": {
                "type": "string",
                "minLength": 1,
                "maxLength": 1000
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "created_by": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "updated_by": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "decision": {
                "type": "string",
                "enum": [
                  "awarded"
                ]
              },
              "against_team_id": {
                "type": "string",
                "format": "uuid"
              },
              "winner_score": {
                "type": "integer",
                "minimum": 0
              },
              "loser_score": {
                "type": "integer",
                "minimum": 0
              },
              "standings_penalty_points": {
                "type": "integer",
                "maximum": -1
              },
              "report_version_id": {
                "type": "string",
                "format": "uuid"
              }
            },
            "required": [
              "id",
              "tenant_id",
              "tournament_id",
              "match_id",
              "proposal_id",
              "decided_by",
              "decided_at",
              "reason",
              "created_at",
              "updated_at",
              "created_by",
              "updated_by",
              "decision",
              "against_team_id",
              "winner_score",
              "loser_score",
              "standings_penalty_points",
              "report_version_id"
            ]
          }
        ]
      },
      "BracketRevision": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "tournament_id": {
            "type": "string",
            "format": "uuid"
          },
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "previous_revision_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "projection_revision_id": {
            "type": "string",
            "format": "uuid"
          },
          "source_standings_revision_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "source_report_version_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "content_hash": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "published",
              "superseded"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "updated_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "tenant_id",
          "tournament_id",
          "revision",
          "previous_revision_id",
          "projection_revision_id",
          "source_standings_revision_ids",
          "source_report_version_ids",
          "content_hash",
          "status",
          "created_at",
          "updated_at",
          "created_by",
          "updated_by"
        ]
      },
      "SeasonRevision": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "season_id": {
            "type": "string",
            "format": "uuid"
          },
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "previous_revision_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "lifecycle_state": {
            "type": "string",
            "enum": [
              "draft",
              "active",
              "closed",
              "archived"
            ]
          },
          "snapshot_hash": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "projection_revision_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "carry_over_preview_hash": {
            "oneOf": [
              {
                "type": "string",
                "pattern": "^[0-9a-f]{64}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "updated_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "tenant_id",
          "season_id",
          "revision",
          "previous_revision_id",
          "lifecycle_state",
          "snapshot_hash",
          "projection_revision_id",
          "carry_over_preview_hash",
          "created_at",
          "updated_at",
          "created_by",
          "updated_by"
        ]
      },
      "FantasyRevision": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "league_id": {
            "type": "string",
            "format": "uuid"
          },
          "round_id": {
            "type": "string",
            "format": "uuid"
          },
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "previous_revision_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "projection_revision_id": {
            "type": "string",
            "format": "uuid"
          },
          "ruleset_revision_id": {
            "type": "string",
            "format": "uuid"
          },
          "source_report_version_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "source_manifest_hashes": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[0-9a-f]{64}$"
            }
          },
          "status": {
            "type": "string",
            "enum": [
              "provisional",
              "final",
              "superseded"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "updated_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "tenant_id",
          "league_id",
          "round_id",
          "revision",
          "previous_revision_id",
          "projection_revision_id",
          "ruleset_revision_id",
          "source_report_version_ids",
          "source_manifest_hashes",
          "status",
          "created_at",
          "updated_at",
          "created_by",
          "updated_by"
        ]
      },
      "TruthModelCapabilities": {
        "type": "object",
        "properties": {
          "qualified_signature_provider": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "state": {
                    "type": "string",
                    "enum": [
                      "disabled"
                    ]
                  },
                  "reason": {
                    "type": "string",
                    "enum": [
                      "owner_input_required",
                      "provider_not_configured",
                      "bridge_not_implemented"
                    ]
                  },
                  "enabled_at": {
                    "type": "null"
                  }
                },
                "required": [
                  "state",
                  "reason",
                  "enabled_at"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "state": {
                    "type": "string",
                    "enum": [
                      "enabled"
                    ]
                  },
                  "configuration_revision_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "enabled_at": {
                    "type": "string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "state",
                  "configuration_revision_id",
                  "enabled_at"
                ]
              }
            ]
          },
          "signed_regulation_document": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "state": {
                    "type": "string",
                    "enum": [
                      "disabled"
                    ]
                  },
                  "reason": {
                    "type": "string",
                    "enum": [
                      "owner_input_required",
                      "provider_not_configured",
                      "bridge_not_implemented"
                    ]
                  },
                  "enabled_at": {
                    "type": "null"
                  }
                },
                "required": [
                  "state",
                  "reason",
                  "enabled_at"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "state": {
                    "type": "string",
                    "enum": [
                      "enabled"
                    ]
                  },
                  "configuration_revision_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "enabled_at": {
                    "type": "string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "state",
                  "configuration_revision_id",
                  "enabled_at"
                ]
              }
            ]
          },
          "custom_knockout_pairing": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "state": {
                    "type": "string",
                    "enum": [
                      "disabled"
                    ]
                  },
                  "reason": {
                    "type": "string",
                    "enum": [
                      "owner_input_required",
                      "provider_not_configured",
                      "bridge_not_implemented"
                    ]
                  },
                  "enabled_at": {
                    "type": "null"
                  }
                },
                "required": [
                  "state",
                  "reason",
                  "enabled_at"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "state": {
                    "type": "string",
                    "enum": [
                      "enabled"
                    ]
                  },
                  "configuration_revision_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "enabled_at": {
                    "type": "string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "state",
                  "configuration_revision_id",
                  "enabled_at"
                ]
              }
            ]
          },
          "fantasy_custom_rules": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "state": {
                    "type": "string",
                    "enum": [
                      "disabled"
                    ]
                  },
                  "reason": {
                    "type": "string",
                    "enum": [
                      "owner_input_required",
                      "provider_not_configured",
                      "bridge_not_implemented"
                    ]
                  },
                  "enabled_at": {
                    "type": "null"
                  }
                },
                "required": [
                  "state",
                  "reason",
                  "enabled_at"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "state": {
                    "type": "string",
                    "enum": [
                      "enabled"
                    ]
                  },
                  "configuration_revision_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "enabled_at": {
                    "type": "string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "state",
                  "configuration_revision_id",
                  "enabled_at"
                ]
              }
            ]
          },
          "official_projection_bridge": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "state": {
                    "type": "string",
                    "enum": [
                      "disabled"
                    ]
                  },
                  "reason": {
                    "type": "string",
                    "enum": [
                      "owner_input_required",
                      "provider_not_configured",
                      "bridge_not_implemented"
                    ]
                  },
                  "enabled_at": {
                    "type": "null"
                  }
                },
                "required": [
                  "state",
                  "reason",
                  "enabled_at"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "state": {
                    "type": "string",
                    "enum": [
                      "enabled"
                    ]
                  },
                  "configuration_revision_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "enabled_at": {
                    "type": "string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "state",
                  "configuration_revision_id",
                  "enabled_at"
                ]
              }
            ]
          },
          "decisions": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "schema_version": {
                      "type": "number",
                      "enum": [
                        1
                      ]
                    },
                    "capability": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 160
                    },
                    "scope": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "schema_version": {
                              "type": "number",
                              "enum": [
                                1
                              ]
                            },
                            "kind": {
                              "type": "string",
                              "enum": [
                                "tenant"
                              ]
                            },
                            "tenant_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "league_id": {
                              "type": "null"
                            },
                            "match_id": {
                              "type": "null"
                            }
                          },
                          "required": [
                            "schema_version",
                            "kind",
                            "tenant_id",
                            "league_id",
                            "match_id"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "schema_version": {
                              "type": "number",
                              "enum": [
                                1
                              ]
                            },
                            "kind": {
                              "type": "string",
                              "enum": [
                                "league"
                              ]
                            },
                            "tenant_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "league_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "match_id": {
                              "type": "null"
                            }
                          },
                          "required": [
                            "schema_version",
                            "kind",
                            "tenant_id",
                            "league_id",
                            "match_id"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "schema_version": {
                              "type": "number",
                              "enum": [
                                1
                              ]
                            },
                            "kind": {
                              "type": "string",
                              "enum": [
                                "match"
                              ]
                            },
                            "tenant_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "league_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "match_id": {
                              "type": "string",
                              "format": "uuid"
                            }
                          },
                          "required": [
                            "schema_version",
                            "kind",
                            "tenant_id",
                            "league_id",
                            "match_id"
                          ]
                        }
                      ]
                    },
                    "state": {
                      "type": "string",
                      "enum": [
                        "enabled"
                      ]
                    },
                    "authority": {
                      "type": "string",
                      "enum": [
                        "server"
                      ]
                    },
                    "configuration_revision_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "enabled_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "expires_at": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "reason": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "schema_version",
                    "capability",
                    "scope",
                    "state",
                    "authority",
                    "configuration_revision_id",
                    "enabled_at",
                    "expires_at",
                    "reason"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "schema_version": {
                      "type": "number",
                      "enum": [
                        1
                      ]
                    },
                    "capability": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 160
                    },
                    "scope": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "schema_version": {
                              "type": "number",
                              "enum": [
                                1
                              ]
                            },
                            "kind": {
                              "type": "string",
                              "enum": [
                                "tenant"
                              ]
                            },
                            "tenant_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "league_id": {
                              "type": "null"
                            },
                            "match_id": {
                              "type": "null"
                            }
                          },
                          "required": [
                            "schema_version",
                            "kind",
                            "tenant_id",
                            "league_id",
                            "match_id"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "schema_version": {
                              "type": "number",
                              "enum": [
                                1
                              ]
                            },
                            "kind": {
                              "type": "string",
                              "enum": [
                                "league"
                              ]
                            },
                            "tenant_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "league_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "match_id": {
                              "type": "null"
                            }
                          },
                          "required": [
                            "schema_version",
                            "kind",
                            "tenant_id",
                            "league_id",
                            "match_id"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "schema_version": {
                              "type": "number",
                              "enum": [
                                1
                              ]
                            },
                            "kind": {
                              "type": "string",
                              "enum": [
                                "match"
                              ]
                            },
                            "tenant_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "league_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "match_id": {
                              "type": "string",
                              "format": "uuid"
                            }
                          },
                          "required": [
                            "schema_version",
                            "kind",
                            "tenant_id",
                            "league_id",
                            "match_id"
                          ]
                        }
                      ]
                    },
                    "state": {
                      "type": "string",
                      "enum": [
                        "disabled"
                      ]
                    },
                    "authority": {
                      "type": "string",
                      "enum": [
                        "server"
                      ]
                    },
                    "configuration_revision_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "enabled_at": {
                      "type": "null"
                    },
                    "expires_at": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "reason": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 120
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 1000
                        },
                        "retryable": {
                          "type": "boolean"
                        },
                        "recovery_action": {
                          "oneOf": [
                            {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 500
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "retryable",
                        "recovery_action"
                      ]
                    }
                  },
                  "required": [
                    "schema_version",
                    "capability",
                    "scope",
                    "state",
                    "authority",
                    "configuration_revision_id",
                    "enabled_at",
                    "expires_at",
                    "reason"
                  ]
                }
              ]
            }
          }
        },
        "required": [
          "qualified_signature_provider",
          "signed_regulation_document",
          "custom_knockout_pairing",
          "fantasy_custom_rules",
          "official_projection_bridge"
        ]
      },
      "TruthScopeV1": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "schema_version": {
                "type": "number",
                "enum": [
                  1
                ]
              },
              "kind": {
                "type": "string",
                "enum": [
                  "tenant"
                ]
              },
              "tenant_id": {
                "type": "string",
                "format": "uuid"
              },
              "league_id": {
                "type": "null"
              },
              "match_id": {
                "type": "null"
              }
            },
            "required": [
              "schema_version",
              "kind",
              "tenant_id",
              "league_id",
              "match_id"
            ]
          },
          {
            "type": "object",
            "properties": {
              "schema_version": {
                "type": "number",
                "enum": [
                  1
                ]
              },
              "kind": {
                "type": "string",
                "enum": [
                  "league"
                ]
              },
              "tenant_id": {
                "type": "string",
                "format": "uuid"
              },
              "league_id": {
                "type": "string",
                "format": "uuid"
              },
              "match_id": {
                "type": "null"
              }
            },
            "required": [
              "schema_version",
              "kind",
              "tenant_id",
              "league_id",
              "match_id"
            ]
          },
          {
            "type": "object",
            "properties": {
              "schema_version": {
                "type": "number",
                "enum": [
                  1
                ]
              },
              "kind": {
                "type": "string",
                "enum": [
                  "match"
                ]
              },
              "tenant_id": {
                "type": "string",
                "format": "uuid"
              },
              "league_id": {
                "type": "string",
                "format": "uuid"
              },
              "match_id": {
                "type": "string",
                "format": "uuid"
              }
            },
            "required": [
              "schema_version",
              "kind",
              "tenant_id",
              "league_id",
              "match_id"
            ]
          }
        ]
      },
      "TruthReasonV1": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "message": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1000
          },
          "retryable": {
            "type": "boolean"
          },
          "recovery_action": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "code",
          "message",
          "retryable",
          "recovery_action"
        ]
      },
      "TruthEntityRefV1": {
        "type": "object",
        "properties": {
          "entity_type": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "entity_id": {
            "type": "string",
            "format": "uuid"
          },
          "entity_version": {
            "oneOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              }
            ]
          }
        },
        "required": [
          "entity_type",
          "entity_id",
          "entity_version"
        ]
      },
      "TruthConsumerPropagationV1": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "consumer": {
                "type": "string",
                "minLength": 1,
                "maxLength": 120
              },
              "state": {
                "type": "string",
                "enum": [
                  "pending"
                ]
              },
              "propagated_at": {
                "type": "null"
              },
              "reason": {
                "type": "null"
              }
            },
            "required": [
              "consumer",
              "state",
              "propagated_at",
              "reason"
            ]
          },
          {
            "type": "object",
            "properties": {
              "consumer": {
                "type": "string",
                "minLength": 1,
                "maxLength": 120
              },
              "state": {
                "type": "string",
                "enum": [
                  "applied"
                ]
              },
              "propagated_at": {
                "type": "string",
                "format": "date-time"
              },
              "reason": {
                "type": "null"
              }
            },
            "required": [
              "consumer",
              "state",
              "propagated_at",
              "reason"
            ]
          },
          {
            "type": "object",
            "properties": {
              "consumer": {
                "type": "string",
                "minLength": 1,
                "maxLength": 120
              },
              "state": {
                "type": "string",
                "enum": [
                  "failed"
                ]
              },
              "propagated_at": {
                "type": "string",
                "format": "date-time"
              },
              "reason": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "message": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1000
                  },
                  "retryable": {
                    "type": "boolean"
                  },
                  "recovery_action": {
                    "oneOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "code",
                  "message",
                  "retryable",
                  "recovery_action"
                ]
              }
            },
            "required": [
              "consumer",
              "state",
              "propagated_at",
              "reason"
            ]
          },
          {
            "type": "object",
            "properties": {
              "consumer": {
                "type": "string",
                "minLength": 1,
                "maxLength": 120
              },
              "state": {
                "type": "string",
                "enum": [
                  "not_applicable"
                ]
              },
              "propagated_at": {
                "type": "string",
                "format": "date-time"
              },
              "reason": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "message": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1000
                  },
                  "retryable": {
                    "type": "boolean"
                  },
                  "recovery_action": {
                    "oneOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "code",
                  "message",
                  "retryable",
                  "recovery_action"
                ]
              }
            },
            "required": [
              "consumer",
              "state",
              "propagated_at",
              "reason"
            ]
          }
        ]
      },
      "TruthReceiptV1": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "schema_version": {
                "type": "number",
                "enum": [
                  1
                ]
              },
              "receipt_id": {
                "type": "string",
                "format": "uuid"
              },
              "entity": {
                "type": "object",
                "properties": {
                  "entity_type": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "entity_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "entity_version": {
                    "oneOf": [
                      {
                        "type": "integer",
                        "minimum": 0
                      },
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 200
                      }
                    ]
                  }
                },
                "required": [
                  "entity_type",
                  "entity_id",
                  "entity_version"
                ]
              },
              "scope": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "schema_version": {
                        "type": "number",
                        "enum": [
                          1
                        ]
                      },
                      "kind": {
                        "type": "string",
                        "enum": [
                          "tenant"
                        ]
                      },
                      "tenant_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "league_id": {
                        "type": "null"
                      },
                      "match_id": {
                        "type": "null"
                      }
                    },
                    "required": [
                      "schema_version",
                      "kind",
                      "tenant_id",
                      "league_id",
                      "match_id"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "schema_version": {
                        "type": "number",
                        "enum": [
                          1
                        ]
                      },
                      "kind": {
                        "type": "string",
                        "enum": [
                          "league"
                        ]
                      },
                      "tenant_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "league_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "match_id": {
                        "type": "null"
                      }
                    },
                    "required": [
                      "schema_version",
                      "kind",
                      "tenant_id",
                      "league_id",
                      "match_id"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "schema_version": {
                        "type": "number",
                        "enum": [
                          1
                        ]
                      },
                      "kind": {
                        "type": "string",
                        "enum": [
                          "match"
                        ]
                      },
                      "tenant_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "league_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "match_id": {
                        "type": "string",
                        "format": "uuid"
                      }
                    },
                    "required": [
                      "schema_version",
                      "kind",
                      "tenant_id",
                      "league_id",
                      "match_id"
                    ]
                  }
                ]
              },
              "actor_user_id": {
                "type": "string",
                "format": "uuid"
              },
              "consumers": {
                "type": "array",
                "items": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "consumer": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 120
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "pending"
                          ]
                        },
                        "propagated_at": {
                          "type": "null"
                        },
                        "reason": {
                          "type": "null"
                        }
                      },
                      "required": [
                        "consumer",
                        "state",
                        "propagated_at",
                        "reason"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "consumer": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 120
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "applied"
                          ]
                        },
                        "propagated_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "reason": {
                          "type": "null"
                        }
                      },
                      "required": [
                        "consumer",
                        "state",
                        "propagated_at",
                        "reason"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "consumer": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 120
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "failed"
                          ]
                        },
                        "propagated_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "reason": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "message": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 1000
                            },
                            "retryable": {
                              "type": "boolean"
                            },
                            "recovery_action": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 500
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message",
                            "retryable",
                            "recovery_action"
                          ]
                        }
                      },
                      "required": [
                        "consumer",
                        "state",
                        "propagated_at",
                        "reason"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "consumer": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 120
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "not_applicable"
                          ]
                        },
                        "propagated_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "reason": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "message": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 1000
                            },
                            "retryable": {
                              "type": "boolean"
                            },
                            "recovery_action": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 500
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message",
                            "retryable",
                            "recovery_action"
                          ]
                        }
                      },
                      "required": [
                        "consumer",
                        "state",
                        "propagated_at",
                        "reason"
                      ]
                    }
                  ]
                }
              },
              "server_timestamp": {
                "type": "string",
                "format": "date-time"
              },
              "correlation_id": {
                "type": "string",
                "minLength": 8,
                "maxLength": 200
              },
              "status": {
                "type": "string",
                "enum": [
                  "queued"
                ]
              },
              "reason": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "code": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "message": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 1000
                      },
                      "retryable": {
                        "type": "boolean"
                      },
                      "recovery_action": {
                        "oneOf": [
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 500
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "code",
                      "message",
                      "retryable",
                      "recovery_action"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "schema_version",
              "receipt_id",
              "entity",
              "scope",
              "actor_user_id",
              "consumers",
              "server_timestamp",
              "correlation_id",
              "status",
              "reason"
            ]
          },
          {
            "type": "object",
            "properties": {
              "schema_version": {
                "type": "number",
                "enum": [
                  1
                ]
              },
              "receipt_id": {
                "type": "string",
                "format": "uuid"
              },
              "entity": {
                "type": "object",
                "properties": {
                  "entity_type": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "entity_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "entity_version": {
                    "oneOf": [
                      {
                        "type": "integer",
                        "minimum": 0
                      },
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 200
                      }
                    ]
                  }
                },
                "required": [
                  "entity_type",
                  "entity_id",
                  "entity_version"
                ]
              },
              "scope": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "schema_version": {
                        "type": "number",
                        "enum": [
                          1
                        ]
                      },
                      "kind": {
                        "type": "string",
                        "enum": [
                          "tenant"
                        ]
                      },
                      "tenant_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "league_id": {
                        "type": "null"
                      },
                      "match_id": {
                        "type": "null"
                      }
                    },
                    "required": [
                      "schema_version",
                      "kind",
                      "tenant_id",
                      "league_id",
                      "match_id"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "schema_version": {
                        "type": "number",
                        "enum": [
                          1
                        ]
                      },
                      "kind": {
                        "type": "string",
                        "enum": [
                          "league"
                        ]
                      },
                      "tenant_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "league_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "match_id": {
                        "type": "null"
                      }
                    },
                    "required": [
                      "schema_version",
                      "kind",
                      "tenant_id",
                      "league_id",
                      "match_id"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "schema_version": {
                        "type": "number",
                        "enum": [
                          1
                        ]
                      },
                      "kind": {
                        "type": "string",
                        "enum": [
                          "match"
                        ]
                      },
                      "tenant_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "league_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "match_id": {
                        "type": "string",
                        "format": "uuid"
                      }
                    },
                    "required": [
                      "schema_version",
                      "kind",
                      "tenant_id",
                      "league_id",
                      "match_id"
                    ]
                  }
                ]
              },
              "actor_user_id": {
                "type": "string",
                "format": "uuid"
              },
              "consumers": {
                "type": "array",
                "items": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "consumer": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 120
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "pending"
                          ]
                        },
                        "propagated_at": {
                          "type": "null"
                        },
                        "reason": {
                          "type": "null"
                        }
                      },
                      "required": [
                        "consumer",
                        "state",
                        "propagated_at",
                        "reason"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "consumer": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 120
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "applied"
                          ]
                        },
                        "propagated_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "reason": {
                          "type": "null"
                        }
                      },
                      "required": [
                        "consumer",
                        "state",
                        "propagated_at",
                        "reason"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "consumer": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 120
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "failed"
                          ]
                        },
                        "propagated_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "reason": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "message": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 1000
                            },
                            "retryable": {
                              "type": "boolean"
                            },
                            "recovery_action": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 500
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message",
                            "retryable",
                            "recovery_action"
                          ]
                        }
                      },
                      "required": [
                        "consumer",
                        "state",
                        "propagated_at",
                        "reason"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "consumer": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 120
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "not_applicable"
                          ]
                        },
                        "propagated_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "reason": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "message": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 1000
                            },
                            "retryable": {
                              "type": "boolean"
                            },
                            "recovery_action": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 500
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message",
                            "retryable",
                            "recovery_action"
                          ]
                        }
                      },
                      "required": [
                        "consumer",
                        "state",
                        "propagated_at",
                        "reason"
                      ]
                    }
                  ]
                }
              },
              "server_timestamp": {
                "type": "string",
                "format": "date-time"
              },
              "correlation_id": {
                "type": "string",
                "minLength": 8,
                "maxLength": 200
              },
              "status": {
                "type": "string",
                "enum": [
                  "accepted"
                ]
              },
              "reason": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "code": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "message": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 1000
                      },
                      "retryable": {
                        "type": "boolean"
                      },
                      "recovery_action": {
                        "oneOf": [
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 500
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "code",
                      "message",
                      "retryable",
                      "recovery_action"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "schema_version",
              "receipt_id",
              "entity",
              "scope",
              "actor_user_id",
              "consumers",
              "server_timestamp",
              "correlation_id",
              "status",
              "reason"
            ]
          },
          {
            "type": "object",
            "properties": {
              "schema_version": {
                "type": "number",
                "enum": [
                  1
                ]
              },
              "receipt_id": {
                "type": "string",
                "format": "uuid"
              },
              "entity": {
                "type": "object",
                "properties": {
                  "entity_type": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "entity_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "entity_version": {
                    "oneOf": [
                      {
                        "type": "integer",
                        "minimum": 0
                      },
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 200
                      }
                    ]
                  }
                },
                "required": [
                  "entity_type",
                  "entity_id",
                  "entity_version"
                ]
              },
              "scope": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "schema_version": {
                        "type": "number",
                        "enum": [
                          1
                        ]
                      },
                      "kind": {
                        "type": "string",
                        "enum": [
                          "tenant"
                        ]
                      },
                      "tenant_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "league_id": {
                        "type": "null"
                      },
                      "match_id": {
                        "type": "null"
                      }
                    },
                    "required": [
                      "schema_version",
                      "kind",
                      "tenant_id",
                      "league_id",
                      "match_id"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "schema_version": {
                        "type": "number",
                        "enum": [
                          1
                        ]
                      },
                      "kind": {
                        "type": "string",
                        "enum": [
                          "league"
                        ]
                      },
                      "tenant_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "league_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "match_id": {
                        "type": "null"
                      }
                    },
                    "required": [
                      "schema_version",
                      "kind",
                      "tenant_id",
                      "league_id",
                      "match_id"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "schema_version": {
                        "type": "number",
                        "enum": [
                          1
                        ]
                      },
                      "kind": {
                        "type": "string",
                        "enum": [
                          "match"
                        ]
                      },
                      "tenant_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "league_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "match_id": {
                        "type": "string",
                        "format": "uuid"
                      }
                    },
                    "required": [
                      "schema_version",
                      "kind",
                      "tenant_id",
                      "league_id",
                      "match_id"
                    ]
                  }
                ]
              },
              "actor_user_id": {
                "type": "string",
                "format": "uuid"
              },
              "consumers": {
                "type": "array",
                "items": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "consumer": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 120
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "pending"
                          ]
                        },
                        "propagated_at": {
                          "type": "null"
                        },
                        "reason": {
                          "type": "null"
                        }
                      },
                      "required": [
                        "consumer",
                        "state",
                        "propagated_at",
                        "reason"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "consumer": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 120
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "applied"
                          ]
                        },
                        "propagated_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "reason": {
                          "type": "null"
                        }
                      },
                      "required": [
                        "consumer",
                        "state",
                        "propagated_at",
                        "reason"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "consumer": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 120
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "failed"
                          ]
                        },
                        "propagated_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "reason": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "message": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 1000
                            },
                            "retryable": {
                              "type": "boolean"
                            },
                            "recovery_action": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 500
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message",
                            "retryable",
                            "recovery_action"
                          ]
                        }
                      },
                      "required": [
                        "consumer",
                        "state",
                        "propagated_at",
                        "reason"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "consumer": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 120
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "not_applicable"
                          ]
                        },
                        "propagated_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "reason": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "message": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 1000
                            },
                            "retryable": {
                              "type": "boolean"
                            },
                            "recovery_action": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 500
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message",
                            "retryable",
                            "recovery_action"
                          ]
                        }
                      },
                      "required": [
                        "consumer",
                        "state",
                        "propagated_at",
                        "reason"
                      ]
                    }
                  ]
                }
              },
              "server_timestamp": {
                "type": "string",
                "format": "date-time"
              },
              "correlation_id": {
                "type": "string",
                "minLength": 8,
                "maxLength": 200
              },
              "status": {
                "type": "string",
                "enum": [
                  "rejected"
                ]
              },
              "reason": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "message": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1000
                  },
                  "retryable": {
                    "type": "boolean"
                  },
                  "recovery_action": {
                    "oneOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "code",
                  "message",
                  "retryable",
                  "recovery_action"
                ]
              }
            },
            "required": [
              "schema_version",
              "receipt_id",
              "entity",
              "scope",
              "actor_user_id",
              "consumers",
              "server_timestamp",
              "correlation_id",
              "status",
              "reason"
            ]
          },
          {
            "type": "object",
            "properties": {
              "schema_version": {
                "type": "number",
                "enum": [
                  1
                ]
              },
              "receipt_id": {
                "type": "string",
                "format": "uuid"
              },
              "entity": {
                "type": "object",
                "properties": {
                  "entity_type": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "entity_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "entity_version": {
                    "oneOf": [
                      {
                        "type": "integer",
                        "minimum": 0
                      },
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 200
                      }
                    ]
                  }
                },
                "required": [
                  "entity_type",
                  "entity_id",
                  "entity_version"
                ]
              },
              "scope": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "schema_version": {
                        "type": "number",
                        "enum": [
                          1
                        ]
                      },
                      "kind": {
                        "type": "string",
                        "enum": [
                          "tenant"
                        ]
                      },
                      "tenant_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "league_id": {
                        "type": "null"
                      },
                      "match_id": {
                        "type": "null"
                      }
                    },
                    "required": [
                      "schema_version",
                      "kind",
                      "tenant_id",
                      "league_id",
                      "match_id"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "schema_version": {
                        "type": "number",
                        "enum": [
                          1
                        ]
                      },
                      "kind": {
                        "type": "string",
                        "enum": [
                          "league"
                        ]
                      },
                      "tenant_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "league_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "match_id": {
                        "type": "null"
                      }
                    },
                    "required": [
                      "schema_version",
                      "kind",
                      "tenant_id",
                      "league_id",
                      "match_id"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "schema_version": {
                        "type": "number",
                        "enum": [
                          1
                        ]
                      },
                      "kind": {
                        "type": "string",
                        "enum": [
                          "match"
                        ]
                      },
                      "tenant_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "league_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "match_id": {
                        "type": "string",
                        "format": "uuid"
                      }
                    },
                    "required": [
                      "schema_version",
                      "kind",
                      "tenant_id",
                      "league_id",
                      "match_id"
                    ]
                  }
                ]
              },
              "actor_user_id": {
                "type": "string",
                "format": "uuid"
              },
              "consumers": {
                "type": "array",
                "items": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "consumer": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 120
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "pending"
                          ]
                        },
                        "propagated_at": {
                          "type": "null"
                        },
                        "reason": {
                          "type": "null"
                        }
                      },
                      "required": [
                        "consumer",
                        "state",
                        "propagated_at",
                        "reason"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "consumer": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 120
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "applied"
                          ]
                        },
                        "propagated_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "reason": {
                          "type": "null"
                        }
                      },
                      "required": [
                        "consumer",
                        "state",
                        "propagated_at",
                        "reason"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "consumer": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 120
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "failed"
                          ]
                        },
                        "propagated_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "reason": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "message": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 1000
                            },
                            "retryable": {
                              "type": "boolean"
                            },
                            "recovery_action": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 500
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message",
                            "retryable",
                            "recovery_action"
                          ]
                        }
                      },
                      "required": [
                        "consumer",
                        "state",
                        "propagated_at",
                        "reason"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "consumer": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 120
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "not_applicable"
                          ]
                        },
                        "propagated_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "reason": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "message": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 1000
                            },
                            "retryable": {
                              "type": "boolean"
                            },
                            "recovery_action": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 500
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message",
                            "retryable",
                            "recovery_action"
                          ]
                        }
                      },
                      "required": [
                        "consumer",
                        "state",
                        "propagated_at",
                        "reason"
                      ]
                    }
                  ]
                }
              },
              "server_timestamp": {
                "type": "string",
                "format": "date-time"
              },
              "correlation_id": {
                "type": "string",
                "minLength": 8,
                "maxLength": 200
              },
              "status": {
                "type": "string",
                "enum": [
                  "superseded"
                ]
              },
              "reason": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "message": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1000
                  },
                  "retryable": {
                    "type": "boolean"
                  },
                  "recovery_action": {
                    "oneOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "code",
                  "message",
                  "retryable",
                  "recovery_action"
                ]
              }
            },
            "required": [
              "schema_version",
              "receipt_id",
              "entity",
              "scope",
              "actor_user_id",
              "consumers",
              "server_timestamp",
              "correlation_id",
              "status",
              "reason"
            ]
          }
        ]
      },
      "TruthOperationReceiptRecord": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "receipt": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "schema_version": {
                    "type": "number",
                    "enum": [
                      1
                    ]
                  },
                  "receipt_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "entity": {
                    "type": "object",
                    "properties": {
                      "entity_type": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "entity_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "entity_version": {
                        "oneOf": [
                          {
                            "type": "integer",
                            "minimum": 0
                          },
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          }
                        ]
                      }
                    },
                    "required": [
                      "entity_type",
                      "entity_id",
                      "entity_version"
                    ]
                  },
                  "scope": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "tenant"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "null"
                          },
                          "match_id": {
                            "type": "null"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "league"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "match_id": {
                            "type": "null"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "match"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "match_id": {
                            "type": "string",
                            "format": "uuid"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      }
                    ]
                  },
                  "actor_user_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "consumers": {
                    "type": "array",
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "pending"
                              ]
                            },
                            "propagated_at": {
                              "type": "null"
                            },
                            "reason": {
                              "type": "null"
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "applied"
                              ]
                            },
                            "propagated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "reason": {
                              "type": "null"
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "failed"
                              ]
                            },
                            "propagated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "reason": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "message": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1000
                                },
                                "retryable": {
                                  "type": "boolean"
                                },
                                "recovery_action": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 500
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "code",
                                "message",
                                "retryable",
                                "recovery_action"
                              ]
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "not_applicable"
                              ]
                            },
                            "propagated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "reason": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "message": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1000
                                },
                                "retryable": {
                                  "type": "boolean"
                                },
                                "recovery_action": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 500
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "code",
                                "message",
                                "retryable",
                                "recovery_action"
                              ]
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        }
                      ]
                    }
                  },
                  "server_timestamp": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "correlation_id": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 200
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "queued"
                    ]
                  },
                  "reason": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 120
                          },
                          "message": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 1000
                          },
                          "retryable": {
                            "type": "boolean"
                          },
                          "recovery_action": {
                            "oneOf": [
                              {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 500
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "code",
                          "message",
                          "retryable",
                          "recovery_action"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "schema_version",
                  "receipt_id",
                  "entity",
                  "scope",
                  "actor_user_id",
                  "consumers",
                  "server_timestamp",
                  "correlation_id",
                  "status",
                  "reason"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "schema_version": {
                    "type": "number",
                    "enum": [
                      1
                    ]
                  },
                  "receipt_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "entity": {
                    "type": "object",
                    "properties": {
                      "entity_type": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "entity_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "entity_version": {
                        "oneOf": [
                          {
                            "type": "integer",
                            "minimum": 0
                          },
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          }
                        ]
                      }
                    },
                    "required": [
                      "entity_type",
                      "entity_id",
                      "entity_version"
                    ]
                  },
                  "scope": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "tenant"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "null"
                          },
                          "match_id": {
                            "type": "null"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "league"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "match_id": {
                            "type": "null"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "match"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "match_id": {
                            "type": "string",
                            "format": "uuid"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      }
                    ]
                  },
                  "actor_user_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "consumers": {
                    "type": "array",
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "pending"
                              ]
                            },
                            "propagated_at": {
                              "type": "null"
                            },
                            "reason": {
                              "type": "null"
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "applied"
                              ]
                            },
                            "propagated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "reason": {
                              "type": "null"
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "failed"
                              ]
                            },
                            "propagated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "reason": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "message": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1000
                                },
                                "retryable": {
                                  "type": "boolean"
                                },
                                "recovery_action": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 500
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "code",
                                "message",
                                "retryable",
                                "recovery_action"
                              ]
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "not_applicable"
                              ]
                            },
                            "propagated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "reason": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "message": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1000
                                },
                                "retryable": {
                                  "type": "boolean"
                                },
                                "recovery_action": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 500
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "code",
                                "message",
                                "retryable",
                                "recovery_action"
                              ]
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        }
                      ]
                    }
                  },
                  "server_timestamp": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "correlation_id": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 200
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "accepted"
                    ]
                  },
                  "reason": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 120
                          },
                          "message": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 1000
                          },
                          "retryable": {
                            "type": "boolean"
                          },
                          "recovery_action": {
                            "oneOf": [
                              {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 500
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "code",
                          "message",
                          "retryable",
                          "recovery_action"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "schema_version",
                  "receipt_id",
                  "entity",
                  "scope",
                  "actor_user_id",
                  "consumers",
                  "server_timestamp",
                  "correlation_id",
                  "status",
                  "reason"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "schema_version": {
                    "type": "number",
                    "enum": [
                      1
                    ]
                  },
                  "receipt_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "entity": {
                    "type": "object",
                    "properties": {
                      "entity_type": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "entity_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "entity_version": {
                        "oneOf": [
                          {
                            "type": "integer",
                            "minimum": 0
                          },
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          }
                        ]
                      }
                    },
                    "required": [
                      "entity_type",
                      "entity_id",
                      "entity_version"
                    ]
                  },
                  "scope": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "tenant"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "null"
                          },
                          "match_id": {
                            "type": "null"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "league"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "match_id": {
                            "type": "null"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "match"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "match_id": {
                            "type": "string",
                            "format": "uuid"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      }
                    ]
                  },
                  "actor_user_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "consumers": {
                    "type": "array",
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "pending"
                              ]
                            },
                            "propagated_at": {
                              "type": "null"
                            },
                            "reason": {
                              "type": "null"
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "applied"
                              ]
                            },
                            "propagated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "reason": {
                              "type": "null"
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "failed"
                              ]
                            },
                            "propagated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "reason": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "message": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1000
                                },
                                "retryable": {
                                  "type": "boolean"
                                },
                                "recovery_action": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 500
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "code",
                                "message",
                                "retryable",
                                "recovery_action"
                              ]
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "not_applicable"
                              ]
                            },
                            "propagated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "reason": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "message": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1000
                                },
                                "retryable": {
                                  "type": "boolean"
                                },
                                "recovery_action": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 500
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "code",
                                "message",
                                "retryable",
                                "recovery_action"
                              ]
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        }
                      ]
                    }
                  },
                  "server_timestamp": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "correlation_id": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 200
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "rejected"
                    ]
                  },
                  "reason": {
                    "type": "object",
                    "properties": {
                      "code": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "message": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 1000
                      },
                      "retryable": {
                        "type": "boolean"
                      },
                      "recovery_action": {
                        "oneOf": [
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 500
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "code",
                      "message",
                      "retryable",
                      "recovery_action"
                    ]
                  }
                },
                "required": [
                  "schema_version",
                  "receipt_id",
                  "entity",
                  "scope",
                  "actor_user_id",
                  "consumers",
                  "server_timestamp",
                  "correlation_id",
                  "status",
                  "reason"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "schema_version": {
                    "type": "number",
                    "enum": [
                      1
                    ]
                  },
                  "receipt_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "entity": {
                    "type": "object",
                    "properties": {
                      "entity_type": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "entity_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "entity_version": {
                        "oneOf": [
                          {
                            "type": "integer",
                            "minimum": 0
                          },
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          }
                        ]
                      }
                    },
                    "required": [
                      "entity_type",
                      "entity_id",
                      "entity_version"
                    ]
                  },
                  "scope": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "tenant"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "null"
                          },
                          "match_id": {
                            "type": "null"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "league"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "match_id": {
                            "type": "null"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "match"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "match_id": {
                            "type": "string",
                            "format": "uuid"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      }
                    ]
                  },
                  "actor_user_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "consumers": {
                    "type": "array",
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "pending"
                              ]
                            },
                            "propagated_at": {
                              "type": "null"
                            },
                            "reason": {
                              "type": "null"
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "applied"
                              ]
                            },
                            "propagated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "reason": {
                              "type": "null"
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "failed"
                              ]
                            },
                            "propagated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "reason": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "message": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1000
                                },
                                "retryable": {
                                  "type": "boolean"
                                },
                                "recovery_action": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 500
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "code",
                                "message",
                                "retryable",
                                "recovery_action"
                              ]
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "not_applicable"
                              ]
                            },
                            "propagated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "reason": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "message": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1000
                                },
                                "retryable": {
                                  "type": "boolean"
                                },
                                "recovery_action": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 500
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "code",
                                "message",
                                "retryable",
                                "recovery_action"
                              ]
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        }
                      ]
                    }
                  },
                  "server_timestamp": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "correlation_id": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 200
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "superseded"
                    ]
                  },
                  "reason": {
                    "type": "object",
                    "properties": {
                      "code": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "message": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 1000
                      },
                      "retryable": {
                        "type": "boolean"
                      },
                      "recovery_action": {
                        "oneOf": [
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 500
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "code",
                      "message",
                      "retryable",
                      "recovery_action"
                    ]
                  }
                },
                "required": [
                  "schema_version",
                  "receipt_id",
                  "entity",
                  "scope",
                  "actor_user_id",
                  "consumers",
                  "server_timestamp",
                  "correlation_id",
                  "status",
                  "reason"
                ]
              }
            ]
          },
          "payload_hash": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "updated_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "tenant_id",
          "receipt",
          "payload_hash",
          "created_at",
          "updated_at",
          "created_by",
          "updated_by"
        ]
      },
      "TruthRulesetReferenceV1": {
        "type": "object",
        "properties": {
          "schema_version": {
            "type": "number",
            "enum": [
              1
            ]
          },
          "revision_id": {
            "type": "string",
            "format": "uuid"
          },
          "content_hash": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "provenance_label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 240
          },
          "signed_document": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "state": {
                    "type": "string",
                    "enum": [
                      "disabled"
                    ]
                  },
                  "reason": {
                    "type": "string",
                    "enum": [
                      "owner_input_required",
                      "provider_not_configured",
                      "bridge_not_implemented"
                    ]
                  },
                  "enabled_at": {
                    "type": "null"
                  }
                },
                "required": [
                  "state",
                  "reason",
                  "enabled_at"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "state": {
                    "type": "string",
                    "enum": [
                      "enabled"
                    ]
                  },
                  "configuration_revision_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "enabled_at": {
                    "type": "string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "state",
                  "configuration_revision_id",
                  "enabled_at"
                ]
              }
            ]
          }
        },
        "required": [
          "schema_version",
          "revision_id",
          "content_hash",
          "provenance_label",
          "signed_document"
        ]
      },
      "TruthOfficialityV1": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "schema_version": {
                "type": "number",
                "enum": [
                  1
                ]
              },
              "state": {
                "type": "string",
                "enum": [
                  "provisional"
                ]
              },
              "report_lifecycle": {
                "type": "string",
                "enum": [
                  "draft",
                  "submitted",
                  "approved"
                ]
              },
              "report_version_id": {
                "type": "string",
                "format": "uuid"
              },
              "report_version": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "publication_eligible": {
                "type": "boolean",
                "enum": [
                  false
                ]
              },
              "homologated_at": {
                "type": "null"
              },
              "is_sub_iudice": {
                "type": "boolean"
              },
              "reason": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "message": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1000
                  },
                  "retryable": {
                    "type": "boolean"
                  },
                  "recovery_action": {
                    "oneOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "code",
                  "message",
                  "retryable",
                  "recovery_action"
                ]
              }
            },
            "required": [
              "schema_version",
              "state",
              "report_lifecycle",
              "report_version_id",
              "report_version",
              "publication_eligible",
              "homologated_at",
              "is_sub_iudice",
              "reason"
            ]
          },
          {
            "type": "object",
            "properties": {
              "schema_version": {
                "type": "number",
                "enum": [
                  1
                ]
              },
              "state": {
                "type": "string",
                "enum": [
                  "homologated"
                ]
              },
              "report_lifecycle": {
                "type": "string",
                "enum": [
                  "homologated"
                ]
              },
              "report_version_id": {
                "type": "string",
                "format": "uuid"
              },
              "report_version": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "publication_eligible": {
                "type": "boolean",
                "enum": [
                  true
                ]
              },
              "homologated_at": {
                "type": "string",
                "format": "date-time"
              },
              "is_sub_iudice": {
                "type": "boolean"
              },
              "reason": {
                "type": "null"
              }
            },
            "required": [
              "schema_version",
              "state",
              "report_lifecycle",
              "report_version_id",
              "report_version",
              "publication_eligible",
              "homologated_at",
              "is_sub_iudice",
              "reason"
            ]
          }
        ]
      },
      "TruthFreshnessV1": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "schema_version": {
                "type": "number",
                "enum": [
                  1
                ]
              },
              "state": {
                "type": "string",
                "enum": [
                  "fresh"
                ]
              },
              "source_revision": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              "generated_at": {
                "type": "string",
                "format": "date-time"
              },
              "stale_at": {
                "type": "string",
                "format": "date-time"
              },
              "expires_at": {
                "type": "string",
                "format": "date-time"
              },
              "invalidation_cursor": {
                "type": "string",
                "minLength": 1,
                "maxLength": 300
              },
              "reason": {
                "type": "null"
              }
            },
            "required": [
              "schema_version",
              "state",
              "source_revision",
              "generated_at",
              "stale_at",
              "expires_at",
              "invalidation_cursor",
              "reason"
            ]
          },
          {
            "type": "object",
            "properties": {
              "schema_version": {
                "type": "number",
                "enum": [
                  1
                ]
              },
              "state": {
                "type": "string",
                "enum": [
                  "stale"
                ]
              },
              "source_revision": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              "generated_at": {
                "type": "string",
                "format": "date-time"
              },
              "stale_at": {
                "type": "string",
                "format": "date-time"
              },
              "expires_at": {
                "type": "string",
                "format": "date-time"
              },
              "invalidation_cursor": {
                "type": "string",
                "minLength": 1,
                "maxLength": 300
              },
              "reason": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "message": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1000
                  },
                  "retryable": {
                    "type": "boolean"
                  },
                  "recovery_action": {
                    "oneOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "code",
                  "message",
                  "retryable",
                  "recovery_action"
                ]
              }
            },
            "required": [
              "schema_version",
              "state",
              "source_revision",
              "generated_at",
              "stale_at",
              "expires_at",
              "invalidation_cursor",
              "reason"
            ]
          },
          {
            "type": "object",
            "properties": {
              "schema_version": {
                "type": "number",
                "enum": [
                  1
                ]
              },
              "state": {
                "type": "string",
                "enum": [
                  "expired"
                ]
              },
              "source_revision": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              "generated_at": {
                "type": "string",
                "format": "date-time"
              },
              "stale_at": {
                "type": "string",
                "format": "date-time"
              },
              "expires_at": {
                "type": "string",
                "format": "date-time"
              },
              "invalidation_cursor": {
                "type": "string",
                "minLength": 1,
                "maxLength": 300
              },
              "reason": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "message": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1000
                  },
                  "retryable": {
                    "type": "boolean"
                  },
                  "recovery_action": {
                    "oneOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "code",
                  "message",
                  "retryable",
                  "recovery_action"
                ]
              }
            },
            "required": [
              "schema_version",
              "state",
              "source_revision",
              "generated_at",
              "stale_at",
              "expires_at",
              "invalidation_cursor",
              "reason"
            ]
          }
        ]
      },
      "TruthCacheEventV1": {
        "type": "object",
        "properties": {
          "schema_version": {
            "type": "number",
            "enum": [
              1
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "scope": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "schema_version": {
                    "type": "number",
                    "enum": [
                      1
                    ]
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "tenant"
                    ]
                  },
                  "tenant_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "league_id": {
                    "type": "null"
                  },
                  "match_id": {
                    "type": "null"
                  }
                },
                "required": [
                  "schema_version",
                  "kind",
                  "tenant_id",
                  "league_id",
                  "match_id"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "schema_version": {
                    "type": "number",
                    "enum": [
                      1
                    ]
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "league"
                    ]
                  },
                  "tenant_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "league_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "match_id": {
                    "type": "null"
                  }
                },
                "required": [
                  "schema_version",
                  "kind",
                  "tenant_id",
                  "league_id",
                  "match_id"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "schema_version": {
                    "type": "number",
                    "enum": [
                      1
                    ]
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "match"
                    ]
                  },
                  "tenant_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "league_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "match_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "schema_version",
                  "kind",
                  "tenant_id",
                  "league_id",
                  "match_id"
                ]
              }
            ]
          },
          "entity": {
            "type": "object",
            "properties": {
              "entity_type": {
                "type": "string",
                "minLength": 1,
                "maxLength": 120
              },
              "entity_id": {
                "type": "string",
                "format": "uuid"
              },
              "entity_version": {
                "oneOf": [
                  {
                    "type": "integer",
                    "minimum": 0
                  },
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  }
                ]
              }
            },
            "required": [
              "entity_type",
              "entity_id",
              "entity_version"
            ]
          },
          "invalidation_cursor": {
            "type": "string",
            "minLength": 1,
            "maxLength": 300
          },
          "consumers": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 120
            },
            "minItems": 1
          },
          "server_timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "correlation_id": {
            "type": "string",
            "minLength": 8,
            "maxLength": 200
          }
        },
        "required": [
          "schema_version",
          "id",
          "tenant_id",
          "scope",
          "entity",
          "invalidation_cursor",
          "consumers",
          "server_timestamp",
          "correlation_id"
        ]
      },
      "TruthCapabilityV1": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "schema_version": {
                "type": "number",
                "enum": [
                  1
                ]
              },
              "capability": {
                "type": "string",
                "minLength": 1,
                "maxLength": 160
              },
              "scope": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "schema_version": {
                        "type": "number",
                        "enum": [
                          1
                        ]
                      },
                      "kind": {
                        "type": "string",
                        "enum": [
                          "tenant"
                        ]
                      },
                      "tenant_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "league_id": {
                        "type": "null"
                      },
                      "match_id": {
                        "type": "null"
                      }
                    },
                    "required": [
                      "schema_version",
                      "kind",
                      "tenant_id",
                      "league_id",
                      "match_id"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "schema_version": {
                        "type": "number",
                        "enum": [
                          1
                        ]
                      },
                      "kind": {
                        "type": "string",
                        "enum": [
                          "league"
                        ]
                      },
                      "tenant_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "league_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "match_id": {
                        "type": "null"
                      }
                    },
                    "required": [
                      "schema_version",
                      "kind",
                      "tenant_id",
                      "league_id",
                      "match_id"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "schema_version": {
                        "type": "number",
                        "enum": [
                          1
                        ]
                      },
                      "kind": {
                        "type": "string",
                        "enum": [
                          "match"
                        ]
                      },
                      "tenant_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "league_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "match_id": {
                        "type": "string",
                        "format": "uuid"
                      }
                    },
                    "required": [
                      "schema_version",
                      "kind",
                      "tenant_id",
                      "league_id",
                      "match_id"
                    ]
                  }
                ]
              },
              "state": {
                "type": "string",
                "enum": [
                  "enabled"
                ]
              },
              "authority": {
                "type": "string",
                "enum": [
                  "server"
                ]
              },
              "configuration_revision_id": {
                "type": "string",
                "format": "uuid"
              },
              "enabled_at": {
                "type": "string",
                "format": "date-time"
              },
              "expires_at": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "reason": {
                "type": "null"
              }
            },
            "required": [
              "schema_version",
              "capability",
              "scope",
              "state",
              "authority",
              "configuration_revision_id",
              "enabled_at",
              "expires_at",
              "reason"
            ]
          },
          {
            "type": "object",
            "properties": {
              "schema_version": {
                "type": "number",
                "enum": [
                  1
                ]
              },
              "capability": {
                "type": "string",
                "minLength": 1,
                "maxLength": 160
              },
              "scope": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "schema_version": {
                        "type": "number",
                        "enum": [
                          1
                        ]
                      },
                      "kind": {
                        "type": "string",
                        "enum": [
                          "tenant"
                        ]
                      },
                      "tenant_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "league_id": {
                        "type": "null"
                      },
                      "match_id": {
                        "type": "null"
                      }
                    },
                    "required": [
                      "schema_version",
                      "kind",
                      "tenant_id",
                      "league_id",
                      "match_id"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "schema_version": {
                        "type": "number",
                        "enum": [
                          1
                        ]
                      },
                      "kind": {
                        "type": "string",
                        "enum": [
                          "league"
                        ]
                      },
                      "tenant_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "league_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "match_id": {
                        "type": "null"
                      }
                    },
                    "required": [
                      "schema_version",
                      "kind",
                      "tenant_id",
                      "league_id",
                      "match_id"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "schema_version": {
                        "type": "number",
                        "enum": [
                          1
                        ]
                      },
                      "kind": {
                        "type": "string",
                        "enum": [
                          "match"
                        ]
                      },
                      "tenant_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "league_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "match_id": {
                        "type": "string",
                        "format": "uuid"
                      }
                    },
                    "required": [
                      "schema_version",
                      "kind",
                      "tenant_id",
                      "league_id",
                      "match_id"
                    ]
                  }
                ]
              },
              "state": {
                "type": "string",
                "enum": [
                  "disabled"
                ]
              },
              "authority": {
                "type": "string",
                "enum": [
                  "server"
                ]
              },
              "configuration_revision_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "enabled_at": {
                "type": "null"
              },
              "expires_at": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "reason": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "message": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1000
                  },
                  "retryable": {
                    "type": "boolean"
                  },
                  "recovery_action": {
                    "oneOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "code",
                  "message",
                  "retryable",
                  "recovery_action"
                ]
              }
            },
            "required": [
              "schema_version",
              "capability",
              "scope",
              "state",
              "authority",
              "configuration_revision_id",
              "enabled_at",
              "expires_at",
              "reason"
            ]
          }
        ]
      },
      "NextActionWaiting": {
        "type": "object",
        "properties": {
          "party": {
            "type": "string",
            "enum": [
              "league_secretariat",
              "assigned_official",
              "evaluator",
              "opponent_team",
              "own_team_players",
              "team_captain",
              "guardian",
              "system_worker",
              "owner_configuration"
            ]
          },
          "party_label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "expected_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "since": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "party",
          "party_label",
          "expected_by",
          "since"
        ]
      },
      "NextActionProgress": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "shape": {
                "type": "string",
                "enum": [
                  "none"
                ]
              }
            },
            "required": [
              "shape"
            ]
          },
          {
            "type": "object",
            "properties": {
              "shape": {
                "type": "string",
                "enum": [
                  "count"
                ]
              },
              "value": {
                "type": "integer",
                "minimum": 0
              },
              "label": {
                "type": "string",
                "minLength": 1,
                "maxLength": 80
              }
            },
            "required": [
              "shape",
              "value",
              "label"
            ]
          },
          {
            "type": "object",
            "properties": {
              "shape": {
                "type": "string",
                "enum": [
                  "n_of_m"
                ]
              },
              "done": {
                "type": "integer",
                "minimum": 0
              },
              "total": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "label": {
                "type": "string",
                "minLength": 1,
                "maxLength": 80
              }
            },
            "required": [
              "shape",
              "done",
              "total",
              "label"
            ]
          },
          {
            "type": "object",
            "properties": {
              "shape": {
                "type": "string",
                "enum": [
                  "stage"
                ]
              },
              "stages": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 40
                },
                "minItems": 2
              },
              "current_index": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "shape",
              "stages",
              "current_index"
            ]
          }
        ]
      },
      "NextActionDeadline": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "deadline_at": {
                "type": "string",
                "format": "date-time"
              },
              "server_time": {
                "type": "string",
                "format": "date-time"
              },
              "timezone": {
                "type": "string",
                "minLength": 1,
                "maxLength": 60
              },
              "state": {
                "type": "string",
                "enum": [
                  "open",
                  "due_soon",
                  "expired"
                ]
              },
              "source": {
                "type": "string",
                "enum": [
                  "competition_ruleset",
                  "league_publication",
                  "match_schedule",
                  "assignment_policy",
                  "fantasy_round",
                  "fantasy_trade_offer",
                  "platform_default"
                ]
              },
              "ruleset_revision_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "deadline_at",
              "server_time",
              "timezone",
              "state",
              "source",
              "ruleset_revision_id"
            ]
          },
          {
            "type": "null"
          }
        ]
      },
      "NextActionLink": {
        "type": "object",
        "properties": {
          "target_kind": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "href": {
            "type": "string",
            "maxLength": 300
          },
          "params": {
            "type": "object",
            "additionalProperties": true,
            "default": {}
          }
        },
        "required": [
          "target_kind",
          "href"
        ]
      },
      "NextActionState": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "state": {
                "type": "string",
                "enum": [
                  "todo"
                ]
              }
            },
            "required": [
              "state"
            ]
          },
          {
            "type": "object",
            "properties": {
              "state": {
                "type": "string",
                "enum": [
                  "waiting_for"
                ]
              },
              "waiting": {
                "type": "object",
                "properties": {
                  "party": {
                    "type": "string",
                    "enum": [
                      "league_secretariat",
                      "assigned_official",
                      "evaluator",
                      "opponent_team",
                      "own_team_players",
                      "team_captain",
                      "guardian",
                      "system_worker",
                      "owner_configuration"
                    ]
                  },
                  "party_label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "expected_by": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "date-time"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "since": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "date-time"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "party",
                  "party_label",
                  "expected_by",
                  "since"
                ]
              }
            },
            "required": [
              "state",
              "waiting"
            ]
          },
          {
            "type": "object",
            "properties": {
              "state": {
                "type": "string",
                "enum": [
                  "done"
                ]
              },
              "completed_at": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "receipt": {
                "oneOf": [
                  {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "receipt_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "entity": {
                            "type": "object",
                            "properties": {
                              "entity_type": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 120
                              },
                              "entity_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "entity_version": {
                                "oneOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 200
                                  }
                                ]
                              }
                            },
                            "required": [
                              "entity_type",
                              "entity_id",
                              "entity_version"
                            ]
                          },
                          "scope": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "schema_version": {
                                    "type": "number",
                                    "enum": [
                                      1
                                    ]
                                  },
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "tenant"
                                    ]
                                  },
                                  "tenant_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "league_id": {
                                    "type": "null"
                                  },
                                  "match_id": {
                                    "type": "null"
                                  }
                                },
                                "required": [
                                  "schema_version",
                                  "kind",
                                  "tenant_id",
                                  "league_id",
                                  "match_id"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "schema_version": {
                                    "type": "number",
                                    "enum": [
                                      1
                                    ]
                                  },
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "league"
                                    ]
                                  },
                                  "tenant_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "league_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "match_id": {
                                    "type": "null"
                                  }
                                },
                                "required": [
                                  "schema_version",
                                  "kind",
                                  "tenant_id",
                                  "league_id",
                                  "match_id"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "schema_version": {
                                    "type": "number",
                                    "enum": [
                                      1
                                    ]
                                  },
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "match"
                                    ]
                                  },
                                  "tenant_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "league_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "match_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  }
                                },
                                "required": [
                                  "schema_version",
                                  "kind",
                                  "tenant_id",
                                  "league_id",
                                  "match_id"
                                ]
                              }
                            ]
                          },
                          "actor_user_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "consumers": {
                            "type": "array",
                            "items": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "consumer": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 120
                                    },
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "pending"
                                      ]
                                    },
                                    "propagated_at": {
                                      "type": "null"
                                    },
                                    "reason": {
                                      "type": "null"
                                    }
                                  },
                                  "required": [
                                    "consumer",
                                    "state",
                                    "propagated_at",
                                    "reason"
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "consumer": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 120
                                    },
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "applied"
                                      ]
                                    },
                                    "propagated_at": {
                                      "type": "string",
                                      "format": "date-time"
                                    },
                                    "reason": {
                                      "type": "null"
                                    }
                                  },
                                  "required": [
                                    "consumer",
                                    "state",
                                    "propagated_at",
                                    "reason"
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "consumer": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 120
                                    },
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "failed"
                                      ]
                                    },
                                    "propagated_at": {
                                      "type": "string",
                                      "format": "date-time"
                                    },
                                    "reason": {
                                      "type": "object",
                                      "properties": {
                                        "code": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 120
                                        },
                                        "message": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 1000
                                        },
                                        "retryable": {
                                          "type": "boolean"
                                        },
                                        "recovery_action": {
                                          "oneOf": [
                                            {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 500
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      },
                                      "required": [
                                        "code",
                                        "message",
                                        "retryable",
                                        "recovery_action"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "consumer",
                                    "state",
                                    "propagated_at",
                                    "reason"
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "consumer": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 120
                                    },
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "not_applicable"
                                      ]
                                    },
                                    "propagated_at": {
                                      "type": "string",
                                      "format": "date-time"
                                    },
                                    "reason": {
                                      "type": "object",
                                      "properties": {
                                        "code": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 120
                                        },
                                        "message": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 1000
                                        },
                                        "retryable": {
                                          "type": "boolean"
                                        },
                                        "recovery_action": {
                                          "oneOf": [
                                            {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 500
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      },
                                      "required": [
                                        "code",
                                        "message",
                                        "retryable",
                                        "recovery_action"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "consumer",
                                    "state",
                                    "propagated_at",
                                    "reason"
                                  ]
                                }
                              ]
                            }
                          },
                          "server_timestamp": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "correlation_id": {
                            "type": "string",
                            "minLength": 8,
                            "maxLength": 200
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "queued"
                            ]
                          },
                          "reason": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "code": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 120
                                  },
                                  "message": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 1000
                                  },
                                  "retryable": {
                                    "type": "boolean"
                                  },
                                  "recovery_action": {
                                    "oneOf": [
                                      {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 500
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "code",
                                  "message",
                                  "retryable",
                                  "recovery_action"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "schema_version",
                          "receipt_id",
                          "entity",
                          "scope",
                          "actor_user_id",
                          "consumers",
                          "server_timestamp",
                          "correlation_id",
                          "status",
                          "reason"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "receipt_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "entity": {
                            "type": "object",
                            "properties": {
                              "entity_type": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 120
                              },
                              "entity_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "entity_version": {
                                "oneOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 200
                                  }
                                ]
                              }
                            },
                            "required": [
                              "entity_type",
                              "entity_id",
                              "entity_version"
                            ]
                          },
                          "scope": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "schema_version": {
                                    "type": "number",
                                    "enum": [
                                      1
                                    ]
                                  },
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "tenant"
                                    ]
                                  },
                                  "tenant_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "league_id": {
                                    "type": "null"
                                  },
                                  "match_id": {
                                    "type": "null"
                                  }
                                },
                                "required": [
                                  "schema_version",
                                  "kind",
                                  "tenant_id",
                                  "league_id",
                                  "match_id"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "schema_version": {
                                    "type": "number",
                                    "enum": [
                                      1
                                    ]
                                  },
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "league"
                                    ]
                                  },
                                  "tenant_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "league_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "match_id": {
                                    "type": "null"
                                  }
                                },
                                "required": [
                                  "schema_version",
                                  "kind",
                                  "tenant_id",
                                  "league_id",
                                  "match_id"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "schema_version": {
                                    "type": "number",
                                    "enum": [
                                      1
                                    ]
                                  },
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "match"
                                    ]
                                  },
                                  "tenant_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "league_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "match_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  }
                                },
                                "required": [
                                  "schema_version",
                                  "kind",
                                  "tenant_id",
                                  "league_id",
                                  "match_id"
                                ]
                              }
                            ]
                          },
                          "actor_user_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "consumers": {
                            "type": "array",
                            "items": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "consumer": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 120
                                    },
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "pending"
                                      ]
                                    },
                                    "propagated_at": {
                                      "type": "null"
                                    },
                                    "reason": {
                                      "type": "null"
                                    }
                                  },
                                  "required": [
                                    "consumer",
                                    "state",
                                    "propagated_at",
                                    "reason"
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "consumer": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 120
                                    },
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "applied"
                                      ]
                                    },
                                    "propagated_at": {
                                      "type": "string",
                                      "format": "date-time"
                                    },
                                    "reason": {
                                      "type": "null"
                                    }
                                  },
                                  "required": [
                                    "consumer",
                                    "state",
                                    "propagated_at",
                                    "reason"
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "consumer": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 120
                                    },
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "failed"
                                      ]
                                    },
                                    "propagated_at": {
                                      "type": "string",
                                      "format": "date-time"
                                    },
                                    "reason": {
                                      "type": "object",
                                      "properties": {
                                        "code": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 120
                                        },
                                        "message": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 1000
                                        },
                                        "retryable": {
                                          "type": "boolean"
                                        },
                                        "recovery_action": {
                                          "oneOf": [
                                            {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 500
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      },
                                      "required": [
                                        "code",
                                        "message",
                                        "retryable",
                                        "recovery_action"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "consumer",
                                    "state",
                                    "propagated_at",
                                    "reason"
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "consumer": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 120
                                    },
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "not_applicable"
                                      ]
                                    },
                                    "propagated_at": {
                                      "type": "string",
                                      "format": "date-time"
                                    },
                                    "reason": {
                                      "type": "object",
                                      "properties": {
                                        "code": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 120
                                        },
                                        "message": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 1000
                                        },
                                        "retryable": {
                                          "type": "boolean"
                                        },
                                        "recovery_action": {
                                          "oneOf": [
                                            {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 500
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      },
                                      "required": [
                                        "code",
                                        "message",
                                        "retryable",
                                        "recovery_action"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "consumer",
                                    "state",
                                    "propagated_at",
                                    "reason"
                                  ]
                                }
                              ]
                            }
                          },
                          "server_timestamp": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "correlation_id": {
                            "type": "string",
                            "minLength": 8,
                            "maxLength": 200
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "accepted"
                            ]
                          },
                          "reason": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "code": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 120
                                  },
                                  "message": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 1000
                                  },
                                  "retryable": {
                                    "type": "boolean"
                                  },
                                  "recovery_action": {
                                    "oneOf": [
                                      {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 500
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "code",
                                  "message",
                                  "retryable",
                                  "recovery_action"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "schema_version",
                          "receipt_id",
                          "entity",
                          "scope",
                          "actor_user_id",
                          "consumers",
                          "server_timestamp",
                          "correlation_id",
                          "status",
                          "reason"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "receipt_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "entity": {
                            "type": "object",
                            "properties": {
                              "entity_type": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 120
                              },
                              "entity_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "entity_version": {
                                "oneOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 200
                                  }
                                ]
                              }
                            },
                            "required": [
                              "entity_type",
                              "entity_id",
                              "entity_version"
                            ]
                          },
                          "scope": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "schema_version": {
                                    "type": "number",
                                    "enum": [
                                      1
                                    ]
                                  },
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "tenant"
                                    ]
                                  },
                                  "tenant_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "league_id": {
                                    "type": "null"
                                  },
                                  "match_id": {
                                    "type": "null"
                                  }
                                },
                                "required": [
                                  "schema_version",
                                  "kind",
                                  "tenant_id",
                                  "league_id",
                                  "match_id"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "schema_version": {
                                    "type": "number",
                                    "enum": [
                                      1
                                    ]
                                  },
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "league"
                                    ]
                                  },
                                  "tenant_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "league_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "match_id": {
                                    "type": "null"
                                  }
                                },
                                "required": [
                                  "schema_version",
                                  "kind",
                                  "tenant_id",
                                  "league_id",
                                  "match_id"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "schema_version": {
                                    "type": "number",
                                    "enum": [
                                      1
                                    ]
                                  },
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "match"
                                    ]
                                  },
                                  "tenant_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "league_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "match_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  }
                                },
                                "required": [
                                  "schema_version",
                                  "kind",
                                  "tenant_id",
                                  "league_id",
                                  "match_id"
                                ]
                              }
                            ]
                          },
                          "actor_user_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "consumers": {
                            "type": "array",
                            "items": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "consumer": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 120
                                    },
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "pending"
                                      ]
                                    },
                                    "propagated_at": {
                                      "type": "null"
                                    },
                                    "reason": {
                                      "type": "null"
                                    }
                                  },
                                  "required": [
                                    "consumer",
                                    "state",
                                    "propagated_at",
                                    "reason"
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "consumer": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 120
                                    },
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "applied"
                                      ]
                                    },
                                    "propagated_at": {
                                      "type": "string",
                                      "format": "date-time"
                                    },
                                    "reason": {
                                      "type": "null"
                                    }
                                  },
                                  "required": [
                                    "consumer",
                                    "state",
                                    "propagated_at",
                                    "reason"
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "consumer": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 120
                                    },
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "failed"
                                      ]
                                    },
                                    "propagated_at": {
                                      "type": "string",
                                      "format": "date-time"
                                    },
                                    "reason": {
                                      "type": "object",
                                      "properties": {
                                        "code": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 120
                                        },
                                        "message": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 1000
                                        },
                                        "retryable": {
                                          "type": "boolean"
                                        },
                                        "recovery_action": {
                                          "oneOf": [
                                            {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 500
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      },
                                      "required": [
                                        "code",
                                        "message",
                                        "retryable",
                                        "recovery_action"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "consumer",
                                    "state",
                                    "propagated_at",
                                    "reason"
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "consumer": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 120
                                    },
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "not_applicable"
                                      ]
                                    },
                                    "propagated_at": {
                                      "type": "string",
                                      "format": "date-time"
                                    },
                                    "reason": {
                                      "type": "object",
                                      "properties": {
                                        "code": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 120
                                        },
                                        "message": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 1000
                                        },
                                        "retryable": {
                                          "type": "boolean"
                                        },
                                        "recovery_action": {
                                          "oneOf": [
                                            {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 500
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      },
                                      "required": [
                                        "code",
                                        "message",
                                        "retryable",
                                        "recovery_action"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "consumer",
                                    "state",
                                    "propagated_at",
                                    "reason"
                                  ]
                                }
                              ]
                            }
                          },
                          "server_timestamp": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "correlation_id": {
                            "type": "string",
                            "minLength": 8,
                            "maxLength": 200
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "rejected"
                            ]
                          },
                          "reason": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 120
                              },
                              "message": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1000
                              },
                              "retryable": {
                                "type": "boolean"
                              },
                              "recovery_action": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 500
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "code",
                              "message",
                              "retryable",
                              "recovery_action"
                            ]
                          }
                        },
                        "required": [
                          "schema_version",
                          "receipt_id",
                          "entity",
                          "scope",
                          "actor_user_id",
                          "consumers",
                          "server_timestamp",
                          "correlation_id",
                          "status",
                          "reason"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "receipt_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "entity": {
                            "type": "object",
                            "properties": {
                              "entity_type": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 120
                              },
                              "entity_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "entity_version": {
                                "oneOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 200
                                  }
                                ]
                              }
                            },
                            "required": [
                              "entity_type",
                              "entity_id",
                              "entity_version"
                            ]
                          },
                          "scope": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "schema_version": {
                                    "type": "number",
                                    "enum": [
                                      1
                                    ]
                                  },
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "tenant"
                                    ]
                                  },
                                  "tenant_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "league_id": {
                                    "type": "null"
                                  },
                                  "match_id": {
                                    "type": "null"
                                  }
                                },
                                "required": [
                                  "schema_version",
                                  "kind",
                                  "tenant_id",
                                  "league_id",
                                  "match_id"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "schema_version": {
                                    "type": "number",
                                    "enum": [
                                      1
                                    ]
                                  },
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "league"
                                    ]
                                  },
                                  "tenant_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "league_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "match_id": {
                                    "type": "null"
                                  }
                                },
                                "required": [
                                  "schema_version",
                                  "kind",
                                  "tenant_id",
                                  "league_id",
                                  "match_id"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "schema_version": {
                                    "type": "number",
                                    "enum": [
                                      1
                                    ]
                                  },
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "match"
                                    ]
                                  },
                                  "tenant_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "league_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "match_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  }
                                },
                                "required": [
                                  "schema_version",
                                  "kind",
                                  "tenant_id",
                                  "league_id",
                                  "match_id"
                                ]
                              }
                            ]
                          },
                          "actor_user_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "consumers": {
                            "type": "array",
                            "items": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "consumer": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 120
                                    },
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "pending"
                                      ]
                                    },
                                    "propagated_at": {
                                      "type": "null"
                                    },
                                    "reason": {
                                      "type": "null"
                                    }
                                  },
                                  "required": [
                                    "consumer",
                                    "state",
                                    "propagated_at",
                                    "reason"
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "consumer": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 120
                                    },
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "applied"
                                      ]
                                    },
                                    "propagated_at": {
                                      "type": "string",
                                      "format": "date-time"
                                    },
                                    "reason": {
                                      "type": "null"
                                    }
                                  },
                                  "required": [
                                    "consumer",
                                    "state",
                                    "propagated_at",
                                    "reason"
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "consumer": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 120
                                    },
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "failed"
                                      ]
                                    },
                                    "propagated_at": {
                                      "type": "string",
                                      "format": "date-time"
                                    },
                                    "reason": {
                                      "type": "object",
                                      "properties": {
                                        "code": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 120
                                        },
                                        "message": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 1000
                                        },
                                        "retryable": {
                                          "type": "boolean"
                                        },
                                        "recovery_action": {
                                          "oneOf": [
                                            {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 500
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      },
                                      "required": [
                                        "code",
                                        "message",
                                        "retryable",
                                        "recovery_action"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "consumer",
                                    "state",
                                    "propagated_at",
                                    "reason"
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "consumer": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 120
                                    },
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "not_applicable"
                                      ]
                                    },
                                    "propagated_at": {
                                      "type": "string",
                                      "format": "date-time"
                                    },
                                    "reason": {
                                      "type": "object",
                                      "properties": {
                                        "code": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 120
                                        },
                                        "message": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 1000
                                        },
                                        "retryable": {
                                          "type": "boolean"
                                        },
                                        "recovery_action": {
                                          "oneOf": [
                                            {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 500
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      },
                                      "required": [
                                        "code",
                                        "message",
                                        "retryable",
                                        "recovery_action"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "consumer",
                                    "state",
                                    "propagated_at",
                                    "reason"
                                  ]
                                }
                              ]
                            }
                          },
                          "server_timestamp": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "correlation_id": {
                            "type": "string",
                            "minLength": 8,
                            "maxLength": 200
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "superseded"
                            ]
                          },
                          "reason": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 120
                              },
                              "message": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1000
                              },
                              "retryable": {
                                "type": "boolean"
                              },
                              "recovery_action": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 500
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "code",
                              "message",
                              "retryable",
                              "recovery_action"
                            ]
                          }
                        },
                        "required": [
                          "schema_version",
                          "receipt_id",
                          "entity",
                          "scope",
                          "actor_user_id",
                          "consumers",
                          "server_timestamp",
                          "correlation_id",
                          "status",
                          "reason"
                        ]
                      }
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "state",
              "completed_at",
              "receipt"
            ]
          },
          {
            "type": "object",
            "properties": {
              "state": {
                "type": "string",
                "enum": [
                  "blocked"
                ]
              },
              "reason": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "message": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1000
                  },
                  "retryable": {
                    "type": "boolean"
                  },
                  "recovery_action": {
                    "oneOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "code",
                  "message",
                  "retryable",
                  "recovery_action"
                ]
              },
              "owner_gate": {
                "oneOf": [
                  {
                    "type": "string",
                    "pattern": "^(OG-\\d{2}|OWNER-[A-Z]{2,6}-\\d{2})$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "blocks_on": {
                "oneOf": [
                  {
                    "type": "string",
                    "pattern": "^[a-z_]+(\\.[a-z_]+){2}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "state",
              "reason",
              "owner_gate",
              "blocks_on"
            ]
          },
          {
            "type": "object",
            "properties": {
              "state": {
                "type": "string",
                "enum": [
                  "not_applicable"
                ]
              },
              "reason": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "message": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1000
                  },
                  "retryable": {
                    "type": "boolean"
                  },
                  "recovery_action": {
                    "oneOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "code",
                  "message",
                  "retryable",
                  "recovery_action"
                ]
              }
            },
            "required": [
              "state",
              "reason"
            ]
          }
        ]
      },
      "NextActionCopy": {
        "type": "object",
        "properties": {
          "overline": {
            "oneOf": [
              {
                "type": "string",
                "maxLength": 40
              },
              {
                "type": "null"
              }
            ]
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "body": {
            "oneOf": [
              {
                "type": "string",
                "maxLength": 240
              },
              {
                "type": "null"
              }
            ]
          },
          "cta": {
            "type": "string",
            "minLength": 1,
            "maxLength": 40
          },
          "secondary_cta": {
            "oneOf": [
              {
                "type": "string",
                "maxLength": 40
              },
              {
                "type": "null"
              }
            ]
          },
          "footnote": {
            "oneOf": [
              {
                "type": "string",
                "maxLength": 160
              },
              {
                "type": "null"
              }
            ]
          },
          "technical_details": {
            "oneOf": [
              {
                "type": "string",
                "maxLength": 400
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "overline",
          "title",
          "body",
          "cta",
          "secondary_cta",
          "footnote",
          "technical_details"
        ]
      },
      "NextActionV1": {
        "type": "object",
        "properties": {
          "schema_version": {
            "type": "number",
            "enum": [
              1
            ]
          },
          "id": {
            "type": "string",
            "pattern": "^[a-z_]+(\\.[a-z_]+){2}$"
          },
          "role": {
            "type": "string",
            "enum": [
              "public_user",
              "player",
              "team_member",
              "team_captain",
              "team_coach",
              "team_staff",
              "official",
              "evaluator",
              "fantasy",
              "guardian",
              "journalist",
              "hostess",
              "photographer",
              "org_operator",
              "org_admin"
            ]
          },
          "role_label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 60
          },
          "object": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "season",
                  "tournament",
                  "round",
                  "match",
                  "team",
                  "player",
                  "assignment",
                  "report_version",
                  "report_submission",
                  "rating_batch",
                  "correction_request",
                  "communication",
                  "transfer_request",
                  "fantasy_league",
                  "fantasy_team",
                  "fantasy_round",
                  "fantasy_auction",
                  "consent",
                  "invitation",
                  "player_claim",
                  "privacy_request",
                  "account"
                ]
              },
              "id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "label": {
                "type": "string",
                "minLength": 1,
                "maxLength": 120
              }
            },
            "required": [
              "kind",
              "id",
              "label"
            ]
          },
          "lifecycle": {
            "type": "string",
            "enum": [
              "onboarding",
              "stagione",
              "giornata",
              "pre_gara",
              "gara_live",
              "referto",
              "omologazione",
              "rettifica",
              "designazione",
              "valutazione",
              "mercato",
              "fantasy_giornata",
              "tesseramento",
              "privacy"
            ]
          },
          "status": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "state": {
                    "type": "string",
                    "enum": [
                      "todo"
                    ]
                  }
                },
                "required": [
                  "state"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "state": {
                    "type": "string",
                    "enum": [
                      "waiting_for"
                    ]
                  },
                  "waiting": {
                    "type": "object",
                    "properties": {
                      "party": {
                        "type": "string",
                        "enum": [
                          "league_secretariat",
                          "assigned_official",
                          "evaluator",
                          "opponent_team",
                          "own_team_players",
                          "team_captain",
                          "guardian",
                          "system_worker",
                          "owner_configuration"
                        ]
                      },
                      "party_label": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 80
                      },
                      "expected_by": {
                        "oneOf": [
                          {
                            "type": "string",
                            "format": "date-time"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "since": {
                        "oneOf": [
                          {
                            "type": "string",
                            "format": "date-time"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "party",
                      "party_label",
                      "expected_by",
                      "since"
                    ]
                  }
                },
                "required": [
                  "state",
                  "waiting"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "state": {
                    "type": "string",
                    "enum": [
                      "done"
                    ]
                  },
                  "completed_at": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "date-time"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "receipt": {
                    "oneOf": [
                      {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "schema_version": {
                                "type": "number",
                                "enum": [
                                  1
                                ]
                              },
                              "receipt_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "entity": {
                                "type": "object",
                                "properties": {
                                  "entity_type": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 120
                                  },
                                  "entity_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "entity_version": {
                                    "oneOf": [
                                      {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 200
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "entity_type",
                                  "entity_id",
                                  "entity_version"
                                ]
                              },
                              "scope": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "schema_version": {
                                        "type": "number",
                                        "enum": [
                                          1
                                        ]
                                      },
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "tenant"
                                        ]
                                      },
                                      "tenant_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "league_id": {
                                        "type": "null"
                                      },
                                      "match_id": {
                                        "type": "null"
                                      }
                                    },
                                    "required": [
                                      "schema_version",
                                      "kind",
                                      "tenant_id",
                                      "league_id",
                                      "match_id"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "schema_version": {
                                        "type": "number",
                                        "enum": [
                                          1
                                        ]
                                      },
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "league"
                                        ]
                                      },
                                      "tenant_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "league_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "match_id": {
                                        "type": "null"
                                      }
                                    },
                                    "required": [
                                      "schema_version",
                                      "kind",
                                      "tenant_id",
                                      "league_id",
                                      "match_id"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "schema_version": {
                                        "type": "number",
                                        "enum": [
                                          1
                                        ]
                                      },
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "match"
                                        ]
                                      },
                                      "tenant_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "league_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "match_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      }
                                    },
                                    "required": [
                                      "schema_version",
                                      "kind",
                                      "tenant_id",
                                      "league_id",
                                      "match_id"
                                    ]
                                  }
                                ]
                              },
                              "actor_user_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "consumers": {
                                "type": "array",
                                "items": {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "consumer": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 120
                                        },
                                        "state": {
                                          "type": "string",
                                          "enum": [
                                            "pending"
                                          ]
                                        },
                                        "propagated_at": {
                                          "type": "null"
                                        },
                                        "reason": {
                                          "type": "null"
                                        }
                                      },
                                      "required": [
                                        "consumer",
                                        "state",
                                        "propagated_at",
                                        "reason"
                                      ]
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "consumer": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 120
                                        },
                                        "state": {
                                          "type": "string",
                                          "enum": [
                                            "applied"
                                          ]
                                        },
                                        "propagated_at": {
                                          "type": "string",
                                          "format": "date-time"
                                        },
                                        "reason": {
                                          "type": "null"
                                        }
                                      },
                                      "required": [
                                        "consumer",
                                        "state",
                                        "propagated_at",
                                        "reason"
                                      ]
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "consumer": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 120
                                        },
                                        "state": {
                                          "type": "string",
                                          "enum": [
                                            "failed"
                                          ]
                                        },
                                        "propagated_at": {
                                          "type": "string",
                                          "format": "date-time"
                                        },
                                        "reason": {
                                          "type": "object",
                                          "properties": {
                                            "code": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 120
                                            },
                                            "message": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 1000
                                            },
                                            "retryable": {
                                              "type": "boolean"
                                            },
                                            "recovery_action": {
                                              "oneOf": [
                                                {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 500
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "code",
                                            "message",
                                            "retryable",
                                            "recovery_action"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "consumer",
                                        "state",
                                        "propagated_at",
                                        "reason"
                                      ]
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "consumer": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 120
                                        },
                                        "state": {
                                          "type": "string",
                                          "enum": [
                                            "not_applicable"
                                          ]
                                        },
                                        "propagated_at": {
                                          "type": "string",
                                          "format": "date-time"
                                        },
                                        "reason": {
                                          "type": "object",
                                          "properties": {
                                            "code": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 120
                                            },
                                            "message": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 1000
                                            },
                                            "retryable": {
                                              "type": "boolean"
                                            },
                                            "recovery_action": {
                                              "oneOf": [
                                                {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 500
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "code",
                                            "message",
                                            "retryable",
                                            "recovery_action"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "consumer",
                                        "state",
                                        "propagated_at",
                                        "reason"
                                      ]
                                    }
                                  ]
                                }
                              },
                              "server_timestamp": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "correlation_id": {
                                "type": "string",
                                "minLength": 8,
                                "maxLength": 200
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "queued"
                                ]
                              },
                              "reason": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "code": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 120
                                      },
                                      "message": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 1000
                                      },
                                      "retryable": {
                                        "type": "boolean"
                                      },
                                      "recovery_action": {
                                        "oneOf": [
                                          {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 500
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "code",
                                      "message",
                                      "retryable",
                                      "recovery_action"
                                    ]
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "schema_version",
                              "receipt_id",
                              "entity",
                              "scope",
                              "actor_user_id",
                              "consumers",
                              "server_timestamp",
                              "correlation_id",
                              "status",
                              "reason"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "schema_version": {
                                "type": "number",
                                "enum": [
                                  1
                                ]
                              },
                              "receipt_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "entity": {
                                "type": "object",
                                "properties": {
                                  "entity_type": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 120
                                  },
                                  "entity_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "entity_version": {
                                    "oneOf": [
                                      {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 200
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "entity_type",
                                  "entity_id",
                                  "entity_version"
                                ]
                              },
                              "scope": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "schema_version": {
                                        "type": "number",
                                        "enum": [
                                          1
                                        ]
                                      },
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "tenant"
                                        ]
                                      },
                                      "tenant_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "league_id": {
                                        "type": "null"
                                      },
                                      "match_id": {
                                        "type": "null"
                                      }
                                    },
                                    "required": [
                                      "schema_version",
                                      "kind",
                                      "tenant_id",
                                      "league_id",
                                      "match_id"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "schema_version": {
                                        "type": "number",
                                        "enum": [
                                          1
                                        ]
                                      },
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "league"
                                        ]
                                      },
                                      "tenant_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "league_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "match_id": {
                                        "type": "null"
                                      }
                                    },
                                    "required": [
                                      "schema_version",
                                      "kind",
                                      "tenant_id",
                                      "league_id",
                                      "match_id"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "schema_version": {
                                        "type": "number",
                                        "enum": [
                                          1
                                        ]
                                      },
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "match"
                                        ]
                                      },
                                      "tenant_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "league_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "match_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      }
                                    },
                                    "required": [
                                      "schema_version",
                                      "kind",
                                      "tenant_id",
                                      "league_id",
                                      "match_id"
                                    ]
                                  }
                                ]
                              },
                              "actor_user_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "consumers": {
                                "type": "array",
                                "items": {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "consumer": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 120
                                        },
                                        "state": {
                                          "type": "string",
                                          "enum": [
                                            "pending"
                                          ]
                                        },
                                        "propagated_at": {
                                          "type": "null"
                                        },
                                        "reason": {
                                          "type": "null"
                                        }
                                      },
                                      "required": [
                                        "consumer",
                                        "state",
                                        "propagated_at",
                                        "reason"
                                      ]
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "consumer": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 120
                                        },
                                        "state": {
                                          "type": "string",
                                          "enum": [
                                            "applied"
                                          ]
                                        },
                                        "propagated_at": {
                                          "type": "string",
                                          "format": "date-time"
                                        },
                                        "reason": {
                                          "type": "null"
                                        }
                                      },
                                      "required": [
                                        "consumer",
                                        "state",
                                        "propagated_at",
                                        "reason"
                                      ]
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "consumer": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 120
                                        },
                                        "state": {
                                          "type": "string",
                                          "enum": [
                                            "failed"
                                          ]
                                        },
                                        "propagated_at": {
                                          "type": "string",
                                          "format": "date-time"
                                        },
                                        "reason": {
                                          "type": "object",
                                          "properties": {
                                            "code": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 120
                                            },
                                            "message": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 1000
                                            },
                                            "retryable": {
                                              "type": "boolean"
                                            },
                                            "recovery_action": {
                                              "oneOf": [
                                                {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 500
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "code",
                                            "message",
                                            "retryable",
                                            "recovery_action"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "consumer",
                                        "state",
                                        "propagated_at",
                                        "reason"
                                      ]
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "consumer": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 120
                                        },
                                        "state": {
                                          "type": "string",
                                          "enum": [
                                            "not_applicable"
                                          ]
                                        },
                                        "propagated_at": {
                                          "type": "string",
                                          "format": "date-time"
                                        },
                                        "reason": {
                                          "type": "object",
                                          "properties": {
                                            "code": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 120
                                            },
                                            "message": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 1000
                                            },
                                            "retryable": {
                                              "type": "boolean"
                                            },
                                            "recovery_action": {
                                              "oneOf": [
                                                {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 500
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "code",
                                            "message",
                                            "retryable",
                                            "recovery_action"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "consumer",
                                        "state",
                                        "propagated_at",
                                        "reason"
                                      ]
                                    }
                                  ]
                                }
                              },
                              "server_timestamp": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "correlation_id": {
                                "type": "string",
                                "minLength": 8,
                                "maxLength": 200
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "accepted"
                                ]
                              },
                              "reason": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "code": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 120
                                      },
                                      "message": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 1000
                                      },
                                      "retryable": {
                                        "type": "boolean"
                                      },
                                      "recovery_action": {
                                        "oneOf": [
                                          {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 500
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "code",
                                      "message",
                                      "retryable",
                                      "recovery_action"
                                    ]
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "schema_version",
                              "receipt_id",
                              "entity",
                              "scope",
                              "actor_user_id",
                              "consumers",
                              "server_timestamp",
                              "correlation_id",
                              "status",
                              "reason"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "schema_version": {
                                "type": "number",
                                "enum": [
                                  1
                                ]
                              },
                              "receipt_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "entity": {
                                "type": "object",
                                "properties": {
                                  "entity_type": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 120
                                  },
                                  "entity_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "entity_version": {
                                    "oneOf": [
                                      {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 200
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "entity_type",
                                  "entity_id",
                                  "entity_version"
                                ]
                              },
                              "scope": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "schema_version": {
                                        "type": "number",
                                        "enum": [
                                          1
                                        ]
                                      },
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "tenant"
                                        ]
                                      },
                                      "tenant_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "league_id": {
                                        "type": "null"
                                      },
                                      "match_id": {
                                        "type": "null"
                                      }
                                    },
                                    "required": [
                                      "schema_version",
                                      "kind",
                                      "tenant_id",
                                      "league_id",
                                      "match_id"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "schema_version": {
                                        "type": "number",
                                        "enum": [
                                          1
                                        ]
                                      },
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "league"
                                        ]
                                      },
                                      "tenant_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "league_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "match_id": {
                                        "type": "null"
                                      }
                                    },
                                    "required": [
                                      "schema_version",
                                      "kind",
                                      "tenant_id",
                                      "league_id",
                                      "match_id"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "schema_version": {
                                        "type": "number",
                                        "enum": [
                                          1
                                        ]
                                      },
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "match"
                                        ]
                                      },
                                      "tenant_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "league_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "match_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      }
                                    },
                                    "required": [
                                      "schema_version",
                                      "kind",
                                      "tenant_id",
                                      "league_id",
                                      "match_id"
                                    ]
                                  }
                                ]
                              },
                              "actor_user_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "consumers": {
                                "type": "array",
                                "items": {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "consumer": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 120
                                        },
                                        "state": {
                                          "type": "string",
                                          "enum": [
                                            "pending"
                                          ]
                                        },
                                        "propagated_at": {
                                          "type": "null"
                                        },
                                        "reason": {
                                          "type": "null"
                                        }
                                      },
                                      "required": [
                                        "consumer",
                                        "state",
                                        "propagated_at",
                                        "reason"
                                      ]
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "consumer": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 120
                                        },
                                        "state": {
                                          "type": "string",
                                          "enum": [
                                            "applied"
                                          ]
                                        },
                                        "propagated_at": {
                                          "type": "string",
                                          "format": "date-time"
                                        },
                                        "reason": {
                                          "type": "null"
                                        }
                                      },
                                      "required": [
                                        "consumer",
                                        "state",
                                        "propagated_at",
                                        "reason"
                                      ]
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "consumer": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 120
                                        },
                                        "state": {
                                          "type": "string",
                                          "enum": [
                                            "failed"
                                          ]
                                        },
                                        "propagated_at": {
                                          "type": "string",
                                          "format": "date-time"
                                        },
                                        "reason": {
                                          "type": "object",
                                          "properties": {
                                            "code": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 120
                                            },
                                            "message": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 1000
                                            },
                                            "retryable": {
                                              "type": "boolean"
                                            },
                                            "recovery_action": {
                                              "oneOf": [
                                                {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 500
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "code",
                                            "message",
                                            "retryable",
                                            "recovery_action"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "consumer",
                                        "state",
                                        "propagated_at",
                                        "reason"
                                      ]
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "consumer": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 120
                                        },
                                        "state": {
                                          "type": "string",
                                          "enum": [
                                            "not_applicable"
                                          ]
                                        },
                                        "propagated_at": {
                                          "type": "string",
                                          "format": "date-time"
                                        },
                                        "reason": {
                                          "type": "object",
                                          "properties": {
                                            "code": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 120
                                            },
                                            "message": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 1000
                                            },
                                            "retryable": {
                                              "type": "boolean"
                                            },
                                            "recovery_action": {
                                              "oneOf": [
                                                {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 500
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "code",
                                            "message",
                                            "retryable",
                                            "recovery_action"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "consumer",
                                        "state",
                                        "propagated_at",
                                        "reason"
                                      ]
                                    }
                                  ]
                                }
                              },
                              "server_timestamp": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "correlation_id": {
                                "type": "string",
                                "minLength": 8,
                                "maxLength": 200
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "rejected"
                                ]
                              },
                              "reason": {
                                "type": "object",
                                "properties": {
                                  "code": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 120
                                  },
                                  "message": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 1000
                                  },
                                  "retryable": {
                                    "type": "boolean"
                                  },
                                  "recovery_action": {
                                    "oneOf": [
                                      {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 500
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "code",
                                  "message",
                                  "retryable",
                                  "recovery_action"
                                ]
                              }
                            },
                            "required": [
                              "schema_version",
                              "receipt_id",
                              "entity",
                              "scope",
                              "actor_user_id",
                              "consumers",
                              "server_timestamp",
                              "correlation_id",
                              "status",
                              "reason"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "schema_version": {
                                "type": "number",
                                "enum": [
                                  1
                                ]
                              },
                              "receipt_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "entity": {
                                "type": "object",
                                "properties": {
                                  "entity_type": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 120
                                  },
                                  "entity_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "entity_version": {
                                    "oneOf": [
                                      {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 200
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "entity_type",
                                  "entity_id",
                                  "entity_version"
                                ]
                              },
                              "scope": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "schema_version": {
                                        "type": "number",
                                        "enum": [
                                          1
                                        ]
                                      },
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "tenant"
                                        ]
                                      },
                                      "tenant_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "league_id": {
                                        "type": "null"
                                      },
                                      "match_id": {
                                        "type": "null"
                                      }
                                    },
                                    "required": [
                                      "schema_version",
                                      "kind",
                                      "tenant_id",
                                      "league_id",
                                      "match_id"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "schema_version": {
                                        "type": "number",
                                        "enum": [
                                          1
                                        ]
                                      },
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "league"
                                        ]
                                      },
                                      "tenant_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "league_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "match_id": {
                                        "type": "null"
                                      }
                                    },
                                    "required": [
                                      "schema_version",
                                      "kind",
                                      "tenant_id",
                                      "league_id",
                                      "match_id"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "schema_version": {
                                        "type": "number",
                                        "enum": [
                                          1
                                        ]
                                      },
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "match"
                                        ]
                                      },
                                      "tenant_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "league_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "match_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      }
                                    },
                                    "required": [
                                      "schema_version",
                                      "kind",
                                      "tenant_id",
                                      "league_id",
                                      "match_id"
                                    ]
                                  }
                                ]
                              },
                              "actor_user_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "consumers": {
                                "type": "array",
                                "items": {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "consumer": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 120
                                        },
                                        "state": {
                                          "type": "string",
                                          "enum": [
                                            "pending"
                                          ]
                                        },
                                        "propagated_at": {
                                          "type": "null"
                                        },
                                        "reason": {
                                          "type": "null"
                                        }
                                      },
                                      "required": [
                                        "consumer",
                                        "state",
                                        "propagated_at",
                                        "reason"
                                      ]
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "consumer": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 120
                                        },
                                        "state": {
                                          "type": "string",
                                          "enum": [
                                            "applied"
                                          ]
                                        },
                                        "propagated_at": {
                                          "type": "string",
                                          "format": "date-time"
                                        },
                                        "reason": {
                                          "type": "null"
                                        }
                                      },
                                      "required": [
                                        "consumer",
                                        "state",
                                        "propagated_at",
                                        "reason"
                                      ]
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "consumer": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 120
                                        },
                                        "state": {
                                          "type": "string",
                                          "enum": [
                                            "failed"
                                          ]
                                        },
                                        "propagated_at": {
                                          "type": "string",
                                          "format": "date-time"
                                        },
                                        "reason": {
                                          "type": "object",
                                          "properties": {
                                            "code": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 120
                                            },
                                            "message": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 1000
                                            },
                                            "retryable": {
                                              "type": "boolean"
                                            },
                                            "recovery_action": {
                                              "oneOf": [
                                                {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 500
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "code",
                                            "message",
                                            "retryable",
                                            "recovery_action"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "consumer",
                                        "state",
                                        "propagated_at",
                                        "reason"
                                      ]
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "consumer": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 120
                                        },
                                        "state": {
                                          "type": "string",
                                          "enum": [
                                            "not_applicable"
                                          ]
                                        },
                                        "propagated_at": {
                                          "type": "string",
                                          "format": "date-time"
                                        },
                                        "reason": {
                                          "type": "object",
                                          "properties": {
                                            "code": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 120
                                            },
                                            "message": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 1000
                                            },
                                            "retryable": {
                                              "type": "boolean"
                                            },
                                            "recovery_action": {
                                              "oneOf": [
                                                {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 500
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "code",
                                            "message",
                                            "retryable",
                                            "recovery_action"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "consumer",
                                        "state",
                                        "propagated_at",
                                        "reason"
                                      ]
                                    }
                                  ]
                                }
                              },
                              "server_timestamp": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "correlation_id": {
                                "type": "string",
                                "minLength": 8,
                                "maxLength": 200
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "superseded"
                                ]
                              },
                              "reason": {
                                "type": "object",
                                "properties": {
                                  "code": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 120
                                  },
                                  "message": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 1000
                                  },
                                  "retryable": {
                                    "type": "boolean"
                                  },
                                  "recovery_action": {
                                    "oneOf": [
                                      {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 500
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "code",
                                  "message",
                                  "retryable",
                                  "recovery_action"
                                ]
                              }
                            },
                            "required": [
                              "schema_version",
                              "receipt_id",
                              "entity",
                              "scope",
                              "actor_user_id",
                              "consumers",
                              "server_timestamp",
                              "correlation_id",
                              "status",
                              "reason"
                            ]
                          }
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "state",
                  "completed_at",
                  "receipt"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "state": {
                    "type": "string",
                    "enum": [
                      "blocked"
                    ]
                  },
                  "reason": {
                    "type": "object",
                    "properties": {
                      "code": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "message": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 1000
                      },
                      "retryable": {
                        "type": "boolean"
                      },
                      "recovery_action": {
                        "oneOf": [
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 500
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "code",
                      "message",
                      "retryable",
                      "recovery_action"
                    ]
                  },
                  "owner_gate": {
                    "oneOf": [
                      {
                        "type": "string",
                        "pattern": "^(OG-\\d{2}|OWNER-[A-Z]{2,6}-\\d{2})$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "blocks_on": {
                    "oneOf": [
                      {
                        "type": "string",
                        "pattern": "^[a-z_]+(\\.[a-z_]+){2}$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "state",
                  "reason",
                  "owner_gate",
                  "blocks_on"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "state": {
                    "type": "string",
                    "enum": [
                      "not_applicable"
                    ]
                  },
                  "reason": {
                    "type": "object",
                    "properties": {
                      "code": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "message": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 1000
                      },
                      "retryable": {
                        "type": "boolean"
                      },
                      "recovery_action": {
                        "oneOf": [
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 500
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "code",
                      "message",
                      "retryable",
                      "recovery_action"
                    ]
                  }
                },
                "required": [
                  "state",
                  "reason"
                ]
              }
            ]
          },
          "priority_band": {
            "type": "integer",
            "minimum": 0,
            "maximum": 60
          },
          "copy": {
            "type": "object",
            "properties": {
              "overline": {
                "oneOf": [
                  {
                    "type": "string",
                    "maxLength": 40
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "title": {
                "type": "string",
                "minLength": 1,
                "maxLength": 80
              },
              "body": {
                "oneOf": [
                  {
                    "type": "string",
                    "maxLength": 240
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "cta": {
                "type": "string",
                "minLength": 1,
                "maxLength": 40
              },
              "secondary_cta": {
                "oneOf": [
                  {
                    "type": "string",
                    "maxLength": 40
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "footnote": {
                "oneOf": [
                  {
                    "type": "string",
                    "maxLength": 160
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "technical_details": {
                "oneOf": [
                  {
                    "type": "string",
                    "maxLength": 400
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "overline",
              "title",
              "body",
              "cta",
              "secondary_cta",
              "footnote",
              "technical_details"
            ]
          },
          "deadline": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "deadline_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "server_time": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "timezone": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 60
                  },
                  "state": {
                    "type": "string",
                    "enum": [
                      "open",
                      "due_soon",
                      "expired"
                    ]
                  },
                  "source": {
                    "type": "string",
                    "enum": [
                      "competition_ruleset",
                      "league_publication",
                      "match_schedule",
                      "assignment_policy",
                      "fantasy_round",
                      "fantasy_trade_offer",
                      "platform_default"
                    ]
                  },
                  "ruleset_revision_id": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "deadline_at",
                  "server_time",
                  "timezone",
                  "state",
                  "source",
                  "ruleset_revision_id"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "progress": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "shape": {
                    "type": "string",
                    "enum": [
                      "none"
                    ]
                  }
                },
                "required": [
                  "shape"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "shape": {
                    "type": "string",
                    "enum": [
                      "count"
                    ]
                  },
                  "value": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  }
                },
                "required": [
                  "shape",
                  "value",
                  "label"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "shape": {
                    "type": "string",
                    "enum": [
                      "n_of_m"
                    ]
                  },
                  "done": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "total": {
                    "type": "integer",
                    "exclusiveMinimum": 0
                  },
                  "label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  }
                },
                "required": [
                  "shape",
                  "done",
                  "total",
                  "label"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "shape": {
                    "type": "string",
                    "enum": [
                      "stage"
                    ]
                  },
                  "stages": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 40
                    },
                    "minItems": 2
                  },
                  "current_index": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "required": [
                  "shape",
                  "stages",
                  "current_index"
                ]
              }
            ]
          },
          "link": {
            "type": "object",
            "properties": {
              "target_kind": {
                "type": "string",
                "minLength": 1,
                "maxLength": 80
              },
              "href": {
                "type": "string",
                "maxLength": 300
              },
              "params": {
                "type": "object",
                "additionalProperties": true,
                "default": {}
              }
            },
            "required": [
              "target_kind",
              "href"
            ]
          },
          "optional": {
            "type": "boolean",
            "default": false
          },
          "source": {
            "type": "string",
            "enum": [
              "server",
              "device"
            ],
            "default": "server"
          },
          "authority": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "schema_version": {
                    "type": "number",
                    "enum": [
                      1
                    ]
                  },
                  "capability": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 160
                  },
                  "scope": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "tenant"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "null"
                          },
                          "match_id": {
                            "type": "null"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "league"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "match_id": {
                            "type": "null"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "match"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "match_id": {
                            "type": "string",
                            "format": "uuid"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      }
                    ]
                  },
                  "state": {
                    "type": "string",
                    "enum": [
                      "enabled"
                    ]
                  },
                  "authority": {
                    "type": "string",
                    "enum": [
                      "server"
                    ]
                  },
                  "configuration_revision_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "enabled_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "expires_at": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "date-time"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "reason": {
                    "type": "null"
                  }
                },
                "required": [
                  "schema_version",
                  "capability",
                  "scope",
                  "state",
                  "authority",
                  "configuration_revision_id",
                  "enabled_at",
                  "expires_at",
                  "reason"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "schema_version": {
                    "type": "number",
                    "enum": [
                      1
                    ]
                  },
                  "capability": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 160
                  },
                  "scope": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "tenant"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "null"
                          },
                          "match_id": {
                            "type": "null"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "league"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "match_id": {
                            "type": "null"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "match"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "match_id": {
                            "type": "string",
                            "format": "uuid"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      }
                    ]
                  },
                  "state": {
                    "type": "string",
                    "enum": [
                      "disabled"
                    ]
                  },
                  "authority": {
                    "type": "string",
                    "enum": [
                      "server"
                    ]
                  },
                  "configuration_revision_id": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "enabled_at": {
                    "type": "null"
                  },
                  "expires_at": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "date-time"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "reason": {
                    "type": "object",
                    "properties": {
                      "code": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "message": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 1000
                      },
                      "retryable": {
                        "type": "boolean"
                      },
                      "recovery_action": {
                        "oneOf": [
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 500
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "code",
                      "message",
                      "retryable",
                      "recovery_action"
                    ]
                  }
                },
                "required": [
                  "schema_version",
                  "capability",
                  "scope",
                  "state",
                  "authority",
                  "configuration_revision_id",
                  "enabled_at",
                  "expires_at",
                  "reason"
                ]
              }
            ]
          }
        },
        "required": [
          "schema_version",
          "id",
          "role",
          "role_label",
          "object",
          "lifecycle",
          "status",
          "priority_band",
          "copy",
          "deadline",
          "progress",
          "link"
        ]
      },
      "NextActionOwnerGateNotice": {
        "type": "object",
        "properties": {
          "owner_gate": {
            "type": "string",
            "pattern": "^(OG-\\d{2}|OWNER-[A-Z]{2,6}-\\d{2})$"
          },
          "message": {
            "type": "string",
            "minLength": 1,
            "maxLength": 240
          },
          "blocked_count": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "action_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[a-z_]+(\\.[a-z_]+){2}$"
            },
            "minItems": 1
          }
        },
        "required": [
          "owner_gate",
          "message",
          "blocked_count",
          "action_ids"
        ]
      },
      "NextActionsSummary": {
        "type": "object",
        "properties": {
          "todo": {
            "type": "integer",
            "minimum": 0
          },
          "waiting": {
            "type": "integer",
            "minimum": 0
          },
          "blocked": {
            "type": "integer",
            "minimum": 0
          },
          "done_recent": {
            "type": "integer",
            "minimum": 0
          },
          "owner_gates": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "owner_gate": {
                  "type": "string",
                  "pattern": "^(OG-\\d{2}|OWNER-[A-Z]{2,6}-\\d{2})$"
                },
                "message": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 240
                },
                "blocked_count": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "action_ids": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "pattern": "^[a-z_]+(\\.[a-z_]+){2}$"
                  },
                  "minItems": 1
                }
              },
              "required": [
                "owner_gate",
                "message",
                "blocked_count",
                "action_ids"
              ]
            },
            "default": []
          }
        },
        "required": [
          "todo",
          "waiting",
          "blocked",
          "done_recent"
        ]
      },
      "NextActionsResponseV1": {
        "type": "object",
        "properties": {
          "schema_version": {
            "type": "number",
            "enum": [
              1
            ]
          },
          "server_time": {
            "type": "string",
            "format": "date-time"
          },
          "timezone": {
            "type": "string",
            "minLength": 1,
            "maxLength": 60
          },
          "scope": {
            "type": "object",
            "properties": {
              "tenant_id": {
                "type": "string",
                "format": "uuid"
              },
              "actor_user_id": {
                "type": "string",
                "format": "uuid"
              },
              "tournament_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "team_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "tenant_id",
              "actor_user_id",
              "tournament_id",
              "team_id"
            ]
          },
          "roles": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "role": {
                  "type": "string",
                  "enum": [
                    "public_user",
                    "player",
                    "team_member",
                    "team_captain",
                    "team_coach",
                    "team_staff",
                    "official",
                    "evaluator",
                    "fantasy",
                    "guardian",
                    "journalist",
                    "hostess",
                    "photographer",
                    "org_operator",
                    "org_admin"
                  ]
                },
                "label": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 60
                }
              },
              "required": [
                "role",
                "label"
              ]
            }
          },
          "primary": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "schema_version": {
                    "type": "number",
                    "enum": [
                      1
                    ]
                  },
                  "id": {
                    "type": "string",
                    "pattern": "^[a-z_]+(\\.[a-z_]+){2}$"
                  },
                  "role": {
                    "type": "string",
                    "enum": [
                      "public_user",
                      "player",
                      "team_member",
                      "team_captain",
                      "team_coach",
                      "team_staff",
                      "official",
                      "evaluator",
                      "fantasy",
                      "guardian",
                      "journalist",
                      "hostess",
                      "photographer",
                      "org_operator",
                      "org_admin"
                    ]
                  },
                  "role_label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 60
                  },
                  "object": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "season",
                          "tournament",
                          "round",
                          "match",
                          "team",
                          "player",
                          "assignment",
                          "report_version",
                          "report_submission",
                          "rating_batch",
                          "correction_request",
                          "communication",
                          "transfer_request",
                          "fantasy_league",
                          "fantasy_team",
                          "fantasy_round",
                          "fantasy_auction",
                          "consent",
                          "invitation",
                          "player_claim",
                          "privacy_request",
                          "account"
                        ]
                      },
                      "id": {
                        "oneOf": [
                          {
                            "type": "string",
                            "format": "uuid"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "label": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      }
                    },
                    "required": [
                      "kind",
                      "id",
                      "label"
                    ]
                  },
                  "lifecycle": {
                    "type": "string",
                    "enum": [
                      "onboarding",
                      "stagione",
                      "giornata",
                      "pre_gara",
                      "gara_live",
                      "referto",
                      "omologazione",
                      "rettifica",
                      "designazione",
                      "valutazione",
                      "mercato",
                      "fantasy_giornata",
                      "tesseramento",
                      "privacy"
                    ]
                  },
                  "status": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "state": {
                            "type": "string",
                            "enum": [
                              "todo"
                            ]
                          }
                        },
                        "required": [
                          "state"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "state": {
                            "type": "string",
                            "enum": [
                              "waiting_for"
                            ]
                          },
                          "waiting": {
                            "type": "object",
                            "properties": {
                              "party": {
                                "type": "string",
                                "enum": [
                                  "league_secretariat",
                                  "assigned_official",
                                  "evaluator",
                                  "opponent_team",
                                  "own_team_players",
                                  "team_captain",
                                  "guardian",
                                  "system_worker",
                                  "owner_configuration"
                                ]
                              },
                              "party_label": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 80
                              },
                              "expected_by": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "since": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "party",
                              "party_label",
                              "expected_by",
                              "since"
                            ]
                          }
                        },
                        "required": [
                          "state",
                          "waiting"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "state": {
                            "type": "string",
                            "enum": [
                              "done"
                            ]
                          },
                          "completed_at": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "receipt": {
                            "oneOf": [
                              {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "schema_version": {
                                        "type": "number",
                                        "enum": [
                                          1
                                        ]
                                      },
                                      "receipt_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "entity": {
                                        "type": "object",
                                        "properties": {
                                          "entity_type": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 120
                                          },
                                          "entity_id": {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          "entity_version": {
                                            "oneOf": [
                                              {
                                                "type": "integer",
                                                "minimum": 0
                                              },
                                              {
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 200
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "entity_type",
                                          "entity_id",
                                          "entity_version"
                                        ]
                                      },
                                      "scope": {
                                        "oneOf": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "schema_version": {
                                                "type": "number",
                                                "enum": [
                                                  1
                                                ]
                                              },
                                              "kind": {
                                                "type": "string",
                                                "enum": [
                                                  "tenant"
                                                ]
                                              },
                                              "tenant_id": {
                                                "type": "string",
                                                "format": "uuid"
                                              },
                                              "league_id": {
                                                "type": "null"
                                              },
                                              "match_id": {
                                                "type": "null"
                                              }
                                            },
                                            "required": [
                                              "schema_version",
                                              "kind",
                                              "tenant_id",
                                              "league_id",
                                              "match_id"
                                            ]
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "schema_version": {
                                                "type": "number",
                                                "enum": [
                                                  1
                                                ]
                                              },
                                              "kind": {
                                                "type": "string",
                                                "enum": [
                                                  "league"
                                                ]
                                              },
                                              "tenant_id": {
                                                "type": "string",
                                                "format": "uuid"
                                              },
                                              "league_id": {
                                                "type": "string",
                                                "format": "uuid"
                                              },
                                              "match_id": {
                                                "type": "null"
                                              }
                                            },
                                            "required": [
                                              "schema_version",
                                              "kind",
                                              "tenant_id",
                                              "league_id",
                                              "match_id"
                                            ]
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "schema_version": {
                                                "type": "number",
                                                "enum": [
                                                  1
                                                ]
                                              },
                                              "kind": {
                                                "type": "string",
                                                "enum": [
                                                  "match"
                                                ]
                                              },
                                              "tenant_id": {
                                                "type": "string",
                                                "format": "uuid"
                                              },
                                              "league_id": {
                                                "type": "string",
                                                "format": "uuid"
                                              },
                                              "match_id": {
                                                "type": "string",
                                                "format": "uuid"
                                              }
                                            },
                                            "required": [
                                              "schema_version",
                                              "kind",
                                              "tenant_id",
                                              "league_id",
                                              "match_id"
                                            ]
                                          }
                                        ]
                                      },
                                      "actor_user_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "consumers": {
                                        "type": "array",
                                        "items": {
                                          "oneOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "consumer": {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 120
                                                },
                                                "state": {
                                                  "type": "string",
                                                  "enum": [
                                                    "pending"
                                                  ]
                                                },
                                                "propagated_at": {
                                                  "type": "null"
                                                },
                                                "reason": {
                                                  "type": "null"
                                                }
                                              },
                                              "required": [
                                                "consumer",
                                                "state",
                                                "propagated_at",
                                                "reason"
                                              ]
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "consumer": {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 120
                                                },
                                                "state": {
                                                  "type": "string",
                                                  "enum": [
                                                    "applied"
                                                  ]
                                                },
                                                "propagated_at": {
                                                  "type": "string",
                                                  "format": "date-time"
                                                },
                                                "reason": {
                                                  "type": "null"
                                                }
                                              },
                                              "required": [
                                                "consumer",
                                                "state",
                                                "propagated_at",
                                                "reason"
                                              ]
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "consumer": {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 120
                                                },
                                                "state": {
                                                  "type": "string",
                                                  "enum": [
                                                    "failed"
                                                  ]
                                                },
                                                "propagated_at": {
                                                  "type": "string",
                                                  "format": "date-time"
                                                },
                                                "reason": {
                                                  "type": "object",
                                                  "properties": {
                                                    "code": {
                                                      "type": "string",
                                                      "minLength": 1,
                                                      "maxLength": 120
                                                    },
                                                    "message": {
                                                      "type": "string",
                                                      "minLength": 1,
                                                      "maxLength": 1000
                                                    },
                                                    "retryable": {
                                                      "type": "boolean"
                                                    },
                                                    "recovery_action": {
                                                      "oneOf": [
                                                        {
                                                          "type": "string",
                                                          "minLength": 1,
                                                          "maxLength": 500
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "code",
                                                    "message",
                                                    "retryable",
                                                    "recovery_action"
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "consumer",
                                                "state",
                                                "propagated_at",
                                                "reason"
                                              ]
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "consumer": {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 120
                                                },
                                                "state": {
                                                  "type": "string",
                                                  "enum": [
                                                    "not_applicable"
                                                  ]
                                                },
                                                "propagated_at": {
                                                  "type": "string",
                                                  "format": "date-time"
                                                },
                                                "reason": {
                                                  "type": "object",
                                                  "properties": {
                                                    "code": {
                                                      "type": "string",
                                                      "minLength": 1,
                                                      "maxLength": 120
                                                    },
                                                    "message": {
                                                      "type": "string",
                                                      "minLength": 1,
                                                      "maxLength": 1000
                                                    },
                                                    "retryable": {
                                                      "type": "boolean"
                                                    },
                                                    "recovery_action": {
                                                      "oneOf": [
                                                        {
                                                          "type": "string",
                                                          "minLength": 1,
                                                          "maxLength": 500
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "code",
                                                    "message",
                                                    "retryable",
                                                    "recovery_action"
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "consumer",
                                                "state",
                                                "propagated_at",
                                                "reason"
                                              ]
                                            }
                                          ]
                                        }
                                      },
                                      "server_timestamp": {
                                        "type": "string",
                                        "format": "date-time"
                                      },
                                      "correlation_id": {
                                        "type": "string",
                                        "minLength": 8,
                                        "maxLength": 200
                                      },
                                      "status": {
                                        "type": "string",
                                        "enum": [
                                          "queued"
                                        ]
                                      },
                                      "reason": {
                                        "oneOf": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "code": {
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 120
                                              },
                                              "message": {
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 1000
                                              },
                                              "retryable": {
                                                "type": "boolean"
                                              },
                                              "recovery_action": {
                                                "oneOf": [
                                                  {
                                                    "type": "string",
                                                    "minLength": 1,
                                                    "maxLength": 500
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              }
                                            },
                                            "required": [
                                              "code",
                                              "message",
                                              "retryable",
                                              "recovery_action"
                                            ]
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "schema_version",
                                      "receipt_id",
                                      "entity",
                                      "scope",
                                      "actor_user_id",
                                      "consumers",
                                      "server_timestamp",
                                      "correlation_id",
                                      "status",
                                      "reason"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "schema_version": {
                                        "type": "number",
                                        "enum": [
                                          1
                                        ]
                                      },
                                      "receipt_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "entity": {
                                        "type": "object",
                                        "properties": {
                                          "entity_type": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 120
                                          },
                                          "entity_id": {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          "entity_version": {
                                            "oneOf": [
                                              {
                                                "type": "integer",
                                                "minimum": 0
                                              },
                                              {
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 200
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "entity_type",
                                          "entity_id",
                                          "entity_version"
                                        ]
                                      },
                                      "scope": {
                                        "oneOf": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "schema_version": {
                                                "type": "number",
                                                "enum": [
                                                  1
                                                ]
                                              },
                                              "kind": {
                                                "type": "string",
                                                "enum": [
                                                  "tenant"
                                                ]
                                              },
                                              "tenant_id": {
                                                "type": "string",
                                                "format": "uuid"
                                              },
                                              "league_id": {
                                                "type": "null"
                                              },
                                              "match_id": {
                                                "type": "null"
                                              }
                                            },
                                            "required": [
                                              "schema_version",
                                              "kind",
                                              "tenant_id",
                                              "league_id",
                                              "match_id"
                                            ]
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "schema_version": {
                                                "type": "number",
                                                "enum": [
                                                  1
                                                ]
                                              },
                                              "kind": {
                                                "type": "string",
                                                "enum": [
                                                  "league"
                                                ]
                                              },
                                              "tenant_id": {
                                                "type": "string",
                                                "format": "uuid"
                                              },
                                              "league_id": {
                                                "type": "string",
                                                "format": "uuid"
                                              },
                                              "match_id": {
                                                "type": "null"
                                              }
                                            },
                                            "required": [
                                              "schema_version",
                                              "kind",
                                              "tenant_id",
                                              "league_id",
                                              "match_id"
                                            ]
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "schema_version": {
                                                "type": "number",
                                                "enum": [
                                                  1
                                                ]
                                              },
                                              "kind": {
                                                "type": "string",
                                                "enum": [
                                                  "match"
                                                ]
                                              },
                                              "tenant_id": {
                                                "type": "string",
                                                "format": "uuid"
                                              },
                                              "league_id": {
                                                "type": "string",
                                                "format": "uuid"
                                              },
                                              "match_id": {
                                                "type": "string",
                                                "format": "uuid"
                                              }
                                            },
                                            "required": [
                                              "schema_version",
                                              "kind",
                                              "tenant_id",
                                              "league_id",
                                              "match_id"
                                            ]
                                          }
                                        ]
                                      },
                                      "actor_user_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "consumers": {
                                        "type": "array",
                                        "items": {
                                          "oneOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "consumer": {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 120
                                                },
                                                "state": {
                                                  "type": "string",
                                                  "enum": [
                                                    "pending"
                                                  ]
                                                },
                                                "propagated_at": {
                                                  "type": "null"
                                                },
                                                "reason": {
                                                  "type": "null"
                                                }
                                              },
                                              "required": [
                                                "consumer",
                                                "state",
                                                "propagated_at",
                                                "reason"
                                              ]
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "consumer": {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 120
                                                },
                                                "state": {
                                                  "type": "string",
                                                  "enum": [
                                                    "applied"
                                                  ]
                                                },
                                                "propagated_at": {
                                                  "type": "string",
                                                  "format": "date-time"
                                                },
                                                "reason": {
                                                  "type": "null"
                                                }
                                              },
                                              "required": [
                                                "consumer",
                                                "state",
                                                "propagated_at",
                                                "reason"
                                              ]
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "consumer": {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 120
                                                },
                                                "state": {
                                                  "type": "string",
                                                  "enum": [
                                                    "failed"
                                                  ]
                                                },
                                                "propagated_at": {
                                                  "type": "string",
                                                  "format": "date-time"
                                                },
                                                "reason": {
                                                  "type": "object",
                                                  "properties": {
                                                    "code": {
                                                      "type": "string",
                                                      "minLength": 1,
                                                      "maxLength": 120
                                                    },
                                                    "message": {
                                                      "type": "string",
                                                      "minLength": 1,
                                                      "maxLength": 1000
                                                    },
                                                    "retryable": {
                                                      "type": "boolean"
                                                    },
                                                    "recovery_action": {
                                                      "oneOf": [
                                                        {
                                                          "type": "string",
                                                          "minLength": 1,
                                                          "maxLength": 500
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "code",
                                                    "message",
                                                    "retryable",
                                                    "recovery_action"
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "consumer",
                                                "state",
                                                "propagated_at",
                                                "reason"
                                              ]
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "consumer": {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 120
                                                },
                                                "state": {
                                                  "type": "string",
                                                  "enum": [
                                                    "not_applicable"
                                                  ]
                                                },
                                                "propagated_at": {
                                                  "type": "string",
                                                  "format": "date-time"
                                                },
                                                "reason": {
                                                  "type": "object",
                                                  "properties": {
                                                    "code": {
                                                      "type": "string",
                                                      "minLength": 1,
                                                      "maxLength": 120
                                                    },
                                                    "message": {
                                                      "type": "string",
                                                      "minLength": 1,
                                                      "maxLength": 1000
                                                    },
                                                    "retryable": {
                                                      "type": "boolean"
                                                    },
                                                    "recovery_action": {
                                                      "oneOf": [
                                                        {
                                                          "type": "string",
                                                          "minLength": 1,
                                                          "maxLength": 500
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "code",
                                                    "message",
                                                    "retryable",
                                                    "recovery_action"
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "consumer",
                                                "state",
                                                "propagated_at",
                                                "reason"
                                              ]
                                            }
                                          ]
                                        }
                                      },
                                      "server_timestamp": {
                                        "type": "string",
                                        "format": "date-time"
                                      },
                                      "correlation_id": {
                                        "type": "string",
                                        "minLength": 8,
                                        "maxLength": 200
                                      },
                                      "status": {
                                        "type": "string",
                                        "enum": [
                                          "accepted"
                                        ]
                                      },
                                      "reason": {
                                        "oneOf": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "code": {
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 120
                                              },
                                              "message": {
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 1000
                                              },
                                              "retryable": {
                                                "type": "boolean"
                                              },
                                              "recovery_action": {
                                                "oneOf": [
                                                  {
                                                    "type": "string",
                                                    "minLength": 1,
                                                    "maxLength": 500
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              }
                                            },
                                            "required": [
                                              "code",
                                              "message",
                                              "retryable",
                                              "recovery_action"
                                            ]
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "schema_version",
                                      "receipt_id",
                                      "entity",
                                      "scope",
                                      "actor_user_id",
                                      "consumers",
                                      "server_timestamp",
                                      "correlation_id",
                                      "status",
                                      "reason"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "schema_version": {
                                        "type": "number",
                                        "enum": [
                                          1
                                        ]
                                      },
                                      "receipt_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "entity": {
                                        "type": "object",
                                        "properties": {
                                          "entity_type": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 120
                                          },
                                          "entity_id": {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          "entity_version": {
                                            "oneOf": [
                                              {
                                                "type": "integer",
                                                "minimum": 0
                                              },
                                              {
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 200
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "entity_type",
                                          "entity_id",
                                          "entity_version"
                                        ]
                                      },
                                      "scope": {
                                        "oneOf": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "schema_version": {
                                                "type": "number",
                                                "enum": [
                                                  1
                                                ]
                                              },
                                              "kind": {
                                                "type": "string",
                                                "enum": [
                                                  "tenant"
                                                ]
                                              },
                                              "tenant_id": {
                                                "type": "string",
                                                "format": "uuid"
                                              },
                                              "league_id": {
                                                "type": "null"
                                              },
                                              "match_id": {
                                                "type": "null"
                                              }
                                            },
                                            "required": [
                                              "schema_version",
                                              "kind",
                                              "tenant_id",
                                              "league_id",
                                              "match_id"
                                            ]
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "schema_version": {
                                                "type": "number",
                                                "enum": [
                                                  1
                                                ]
                                              },
                                              "kind": {
                                                "type": "string",
                                                "enum": [
                                                  "league"
                                                ]
                                              },
                                              "tenant_id": {
                                                "type": "string",
                                                "format": "uuid"
                                              },
                                              "league_id": {
                                                "type": "string",
                                                "format": "uuid"
                                              },
                                              "match_id": {
                                                "type": "null"
                                              }
                                            },
                                            "required": [
                                              "schema_version",
                                              "kind",
                                              "tenant_id",
                                              "league_id",
                                              "match_id"
                                            ]
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "schema_version": {
                                                "type": "number",
                                                "enum": [
                                                  1
                                                ]
                                              },
                                              "kind": {
                                                "type": "string",
                                                "enum": [
                                                  "match"
                                                ]
                                              },
                                              "tenant_id": {
                                                "type": "string",
                                                "format": "uuid"
                                              },
                                              "league_id": {
                                                "type": "string",
                                                "format": "uuid"
                                              },
                                              "match_id": {
                                                "type": "string",
                                                "format": "uuid"
                                              }
                                            },
                                            "required": [
                                              "schema_version",
                                              "kind",
                                              "tenant_id",
                                              "league_id",
                                              "match_id"
                                            ]
                                          }
                                        ]
                                      },
                                      "actor_user_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "consumers": {
                                        "type": "array",
                                        "items": {
                                          "oneOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "consumer": {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 120
                                                },
                                                "state": {
                                                  "type": "string",
                                                  "enum": [
                                                    "pending"
                                                  ]
                                                },
                                                "propagated_at": {
                                                  "type": "null"
                                                },
                                                "reason": {
                                                  "type": "null"
                                                }
                                              },
                                              "required": [
                                                "consumer",
                                                "state",
                                                "propagated_at",
                                                "reason"
                                              ]
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "consumer": {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 120
                                                },
                                                "state": {
                                                  "type": "string",
                                                  "enum": [
                                                    "applied"
                                                  ]
                                                },
                                                "propagated_at": {
                                                  "type": "string",
                                                  "format": "date-time"
                                                },
                                                "reason": {
                                                  "type": "null"
                                                }
                                              },
                                              "required": [
                                                "consumer",
                                                "state",
                                                "propagated_at",
                                                "reason"
                                              ]
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "consumer": {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 120
                                                },
                                                "state": {
                                                  "type": "string",
                                                  "enum": [
                                                    "failed"
                                                  ]
                                                },
                                                "propagated_at": {
                                                  "type": "string",
                                                  "format": "date-time"
                                                },
                                                "reason": {
                                                  "type": "object",
                                                  "properties": {
                                                    "code": {
                                                      "type": "string",
                                                      "minLength": 1,
                                                      "maxLength": 120
                                                    },
                                                    "message": {
                                                      "type": "string",
                                                      "minLength": 1,
                                                      "maxLength": 1000
                                                    },
                                                    "retryable": {
                                                      "type": "boolean"
                                                    },
                                                    "recovery_action": {
                                                      "oneOf": [
                                                        {
                                                          "type": "string",
                                                          "minLength": 1,
                                                          "maxLength": 500
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "code",
                                                    "message",
                                                    "retryable",
                                                    "recovery_action"
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "consumer",
                                                "state",
                                                "propagated_at",
                                                "reason"
                                              ]
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "consumer": {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 120
                                                },
                                                "state": {
                                                  "type": "string",
                                                  "enum": [
                                                    "not_applicable"
                                                  ]
                                                },
                                                "propagated_at": {
                                                  "type": "string",
                                                  "format": "date-time"
                                                },
                                                "reason": {
                                                  "type": "object",
                                                  "properties": {
                                                    "code": {
                                                      "type": "string",
                                                      "minLength": 1,
                                                      "maxLength": 120
                                                    },
                                                    "message": {
                                                      "type": "string",
                                                      "minLength": 1,
                                                      "maxLength": 1000
                                                    },
                                                    "retryable": {
                                                      "type": "boolean"
                                                    },
                                                    "recovery_action": {
                                                      "oneOf": [
                                                        {
                                                          "type": "string",
                                                          "minLength": 1,
                                                          "maxLength": 500
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "code",
                                                    "message",
                                                    "retryable",
                                                    "recovery_action"
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "consumer",
                                                "state",
                                                "propagated_at",
                                                "reason"
                                              ]
                                            }
                                          ]
                                        }
                                      },
                                      "server_timestamp": {
                                        "type": "string",
                                        "format": "date-time"
                                      },
                                      "correlation_id": {
                                        "type": "string",
                                        "minLength": 8,
                                        "maxLength": 200
                                      },
                                      "status": {
                                        "type": "string",
                                        "enum": [
                                          "rejected"
                                        ]
                                      },
                                      "reason": {
                                        "type": "object",
                                        "properties": {
                                          "code": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 120
                                          },
                                          "message": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 1000
                                          },
                                          "retryable": {
                                            "type": "boolean"
                                          },
                                          "recovery_action": {
                                            "oneOf": [
                                              {
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 500
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "code",
                                          "message",
                                          "retryable",
                                          "recovery_action"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "schema_version",
                                      "receipt_id",
                                      "entity",
                                      "scope",
                                      "actor_user_id",
                                      "consumers",
                                      "server_timestamp",
                                      "correlation_id",
                                      "status",
                                      "reason"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "schema_version": {
                                        "type": "number",
                                        "enum": [
                                          1
                                        ]
                                      },
                                      "receipt_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "entity": {
                                        "type": "object",
                                        "properties": {
                                          "entity_type": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 120
                                          },
                                          "entity_id": {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          "entity_version": {
                                            "oneOf": [
                                              {
                                                "type": "integer",
                                                "minimum": 0
                                              },
                                              {
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 200
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "entity_type",
                                          "entity_id",
                                          "entity_version"
                                        ]
                                      },
                                      "scope": {
                                        "oneOf": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "schema_version": {
                                                "type": "number",
                                                "enum": [
                                                  1
                                                ]
                                              },
                                              "kind": {
                                                "type": "string",
                                                "enum": [
                                                  "tenant"
                                                ]
                                              },
                                              "tenant_id": {
                                                "type": "string",
                                                "format": "uuid"
                                              },
                                              "league_id": {
                                                "type": "null"
                                              },
                                              "match_id": {
                                                "type": "null"
                                              }
                                            },
                                            "required": [
                                              "schema_version",
                                              "kind",
                                              "tenant_id",
                                              "league_id",
                                              "match_id"
                                            ]
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "schema_version": {
                                                "type": "number",
                                                "enum": [
                                                  1
                                                ]
                                              },
                                              "kind": {
                                                "type": "string",
                                                "enum": [
                                                  "league"
                                                ]
                                              },
                                              "tenant_id": {
                                                "type": "string",
                                                "format": "uuid"
                                              },
                                              "league_id": {
                                                "type": "string",
                                                "format": "uuid"
                                              },
                                              "match_id": {
                                                "type": "null"
                                              }
                                            },
                                            "required": [
                                              "schema_version",
                                              "kind",
                                              "tenant_id",
                                              "league_id",
                                              "match_id"
                                            ]
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "schema_version": {
                                                "type": "number",
                                                "enum": [
                                                  1
                                                ]
                                              },
                                              "kind": {
                                                "type": "string",
                                                "enum": [
                                                  "match"
                                                ]
                                              },
                                              "tenant_id": {
                                                "type": "string",
                                                "format": "uuid"
                                              },
                                              "league_id": {
                                                "type": "string",
                                                "format": "uuid"
                                              },
                                              "match_id": {
                                                "type": "string",
                                                "format": "uuid"
                                              }
                                            },
                                            "required": [
                                              "schema_version",
                                              "kind",
                                              "tenant_id",
                                              "league_id",
                                              "match_id"
                                            ]
                                          }
                                        ]
                                      },
                                      "actor_user_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "consumers": {
                                        "type": "array",
                                        "items": {
                                          "oneOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "consumer": {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 120
                                                },
                                                "state": {
                                                  "type": "string",
                                                  "enum": [
                                                    "pending"
                                                  ]
                                                },
                                                "propagated_at": {
                                                  "type": "null"
                                                },
                                                "reason": {
                                                  "type": "null"
                                                }
                                              },
                                              "required": [
                                                "consumer",
                                                "state",
                                                "propagated_at",
                                                "reason"
                                              ]
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "consumer": {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 120
                                                },
                                                "state": {
                                                  "type": "string",
                                                  "enum": [
                                                    "applied"
                                                  ]
                                                },
                                                "propagated_at": {
                                                  "type": "string",
                                                  "format": "date-time"
                                                },
                                                "reason": {
                                                  "type": "null"
                                                }
                                              },
                                              "required": [
                                                "consumer",
                                                "state",
                                                "propagated_at",
                                                "reason"
                                              ]
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "consumer": {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 120
                                                },
                                                "state": {
                                                  "type": "string",
                                                  "enum": [
                                                    "failed"
                                                  ]
                                                },
                                                "propagated_at": {
                                                  "type": "string",
                                                  "format": "date-time"
                                                },
                                                "reason": {
                                                  "type": "object",
                                                  "properties": {
                                                    "code": {
                                                      "type": "string",
                                                      "minLength": 1,
                                                      "maxLength": 120
                                                    },
                                                    "message": {
                                                      "type": "string",
                                                      "minLength": 1,
                                                      "maxLength": 1000
                                                    },
                                                    "retryable": {
                                                      "type": "boolean"
                                                    },
                                                    "recovery_action": {
                                                      "oneOf": [
                                                        {
                                                          "type": "string",
                                                          "minLength": 1,
                                                          "maxLength": 500
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "code",
                                                    "message",
                                                    "retryable",
                                                    "recovery_action"
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "consumer",
                                                "state",
                                                "propagated_at",
                                                "reason"
                                              ]
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "consumer": {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 120
                                                },
                                                "state": {
                                                  "type": "string",
                                                  "enum": [
                                                    "not_applicable"
                                                  ]
                                                },
                                                "propagated_at": {
                                                  "type": "string",
                                                  "format": "date-time"
                                                },
                                                "reason": {
                                                  "type": "object",
                                                  "properties": {
                                                    "code": {
                                                      "type": "string",
                                                      "minLength": 1,
                                                      "maxLength": 120
                                                    },
                                                    "message": {
                                                      "type": "string",
                                                      "minLength": 1,
                                                      "maxLength": 1000
                                                    },
                                                    "retryable": {
                                                      "type": "boolean"
                                                    },
                                                    "recovery_action": {
                                                      "oneOf": [
                                                        {
                                                          "type": "string",
                                                          "minLength": 1,
                                                          "maxLength": 500
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "code",
                                                    "message",
                                                    "retryable",
                                                    "recovery_action"
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "consumer",
                                                "state",
                                                "propagated_at",
                                                "reason"
                                              ]
                                            }
                                          ]
                                        }
                                      },
                                      "server_timestamp": {
                                        "type": "string",
                                        "format": "date-time"
                                      },
                                      "correlation_id": {
                                        "type": "string",
                                        "minLength": 8,
                                        "maxLength": 200
                                      },
                                      "status": {
                                        "type": "string",
                                        "enum": [
                                          "superseded"
                                        ]
                                      },
                                      "reason": {
                                        "type": "object",
                                        "properties": {
                                          "code": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 120
                                          },
                                          "message": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 1000
                                          },
                                          "retryable": {
                                            "type": "boolean"
                                          },
                                          "recovery_action": {
                                            "oneOf": [
                                              {
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 500
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "code",
                                          "message",
                                          "retryable",
                                          "recovery_action"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "schema_version",
                                      "receipt_id",
                                      "entity",
                                      "scope",
                                      "actor_user_id",
                                      "consumers",
                                      "server_timestamp",
                                      "correlation_id",
                                      "status",
                                      "reason"
                                    ]
                                  }
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "state",
                          "completed_at",
                          "receipt"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "state": {
                            "type": "string",
                            "enum": [
                              "blocked"
                            ]
                          },
                          "reason": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 120
                              },
                              "message": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1000
                              },
                              "retryable": {
                                "type": "boolean"
                              },
                              "recovery_action": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 500
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "code",
                              "message",
                              "retryable",
                              "recovery_action"
                            ]
                          },
                          "owner_gate": {
                            "oneOf": [
                              {
                                "type": "string",
                                "pattern": "^(OG-\\d{2}|OWNER-[A-Z]{2,6}-\\d{2})$"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "blocks_on": {
                            "oneOf": [
                              {
                                "type": "string",
                                "pattern": "^[a-z_]+(\\.[a-z_]+){2}$"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "state",
                          "reason",
                          "owner_gate",
                          "blocks_on"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "state": {
                            "type": "string",
                            "enum": [
                              "not_applicable"
                            ]
                          },
                          "reason": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 120
                              },
                              "message": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1000
                              },
                              "retryable": {
                                "type": "boolean"
                              },
                              "recovery_action": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 500
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "code",
                              "message",
                              "retryable",
                              "recovery_action"
                            ]
                          }
                        },
                        "required": [
                          "state",
                          "reason"
                        ]
                      }
                    ]
                  },
                  "priority_band": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 60
                  },
                  "copy": {
                    "type": "object",
                    "properties": {
                      "overline": {
                        "oneOf": [
                          {
                            "type": "string",
                            "maxLength": 40
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "title": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 80
                      },
                      "body": {
                        "oneOf": [
                          {
                            "type": "string",
                            "maxLength": 240
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "cta": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 40
                      },
                      "secondary_cta": {
                        "oneOf": [
                          {
                            "type": "string",
                            "maxLength": 40
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "footnote": {
                        "oneOf": [
                          {
                            "type": "string",
                            "maxLength": 160
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "technical_details": {
                        "oneOf": [
                          {
                            "type": "string",
                            "maxLength": 400
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "overline",
                      "title",
                      "body",
                      "cta",
                      "secondary_cta",
                      "footnote",
                      "technical_details"
                    ]
                  },
                  "deadline": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "deadline_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "server_time": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "timezone": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 60
                          },
                          "state": {
                            "type": "string",
                            "enum": [
                              "open",
                              "due_soon",
                              "expired"
                            ]
                          },
                          "source": {
                            "type": "string",
                            "enum": [
                              "competition_ruleset",
                              "league_publication",
                              "match_schedule",
                              "assignment_policy",
                              "fantasy_round",
                              "fantasy_trade_offer",
                              "platform_default"
                            ]
                          },
                          "ruleset_revision_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "deadline_at",
                          "server_time",
                          "timezone",
                          "state",
                          "source",
                          "ruleset_revision_id"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "progress": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "shape": {
                            "type": "string",
                            "enum": [
                              "none"
                            ]
                          }
                        },
                        "required": [
                          "shape"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "shape": {
                            "type": "string",
                            "enum": [
                              "count"
                            ]
                          },
                          "value": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "label": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 80
                          }
                        },
                        "required": [
                          "shape",
                          "value",
                          "label"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "shape": {
                            "type": "string",
                            "enum": [
                              "n_of_m"
                            ]
                          },
                          "done": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "total": {
                            "type": "integer",
                            "exclusiveMinimum": 0
                          },
                          "label": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 80
                          }
                        },
                        "required": [
                          "shape",
                          "done",
                          "total",
                          "label"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "shape": {
                            "type": "string",
                            "enum": [
                              "stage"
                            ]
                          },
                          "stages": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 40
                            },
                            "minItems": 2
                          },
                          "current_index": {
                            "type": "integer",
                            "minimum": 0
                          }
                        },
                        "required": [
                          "shape",
                          "stages",
                          "current_index"
                        ]
                      }
                    ]
                  },
                  "link": {
                    "type": "object",
                    "properties": {
                      "target_kind": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 80
                      },
                      "href": {
                        "type": "string",
                        "maxLength": 300
                      },
                      "params": {
                        "type": "object",
                        "additionalProperties": true,
                        "default": {}
                      }
                    },
                    "required": [
                      "target_kind",
                      "href"
                    ]
                  },
                  "optional": {
                    "type": "boolean",
                    "default": false
                  },
                  "source": {
                    "type": "string",
                    "enum": [
                      "server",
                      "device"
                    ],
                    "default": "server"
                  },
                  "authority": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "capability": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 160
                          },
                          "scope": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "schema_version": {
                                    "type": "number",
                                    "enum": [
                                      1
                                    ]
                                  },
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "tenant"
                                    ]
                                  },
                                  "tenant_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "league_id": {
                                    "type": "null"
                                  },
                                  "match_id": {
                                    "type": "null"
                                  }
                                },
                                "required": [
                                  "schema_version",
                                  "kind",
                                  "tenant_id",
                                  "league_id",
                                  "match_id"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "schema_version": {
                                    "type": "number",
                                    "enum": [
                                      1
                                    ]
                                  },
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "league"
                                    ]
                                  },
                                  "tenant_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "league_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "match_id": {
                                    "type": "null"
                                  }
                                },
                                "required": [
                                  "schema_version",
                                  "kind",
                                  "tenant_id",
                                  "league_id",
                                  "match_id"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "schema_version": {
                                    "type": "number",
                                    "enum": [
                                      1
                                    ]
                                  },
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "match"
                                    ]
                                  },
                                  "tenant_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "league_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "match_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  }
                                },
                                "required": [
                                  "schema_version",
                                  "kind",
                                  "tenant_id",
                                  "league_id",
                                  "match_id"
                                ]
                              }
                            ]
                          },
                          "state": {
                            "type": "string",
                            "enum": [
                              "enabled"
                            ]
                          },
                          "authority": {
                            "type": "string",
                            "enum": [
                              "server"
                            ]
                          },
                          "configuration_revision_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "enabled_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "expires_at": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "reason": {
                            "type": "null"
                          }
                        },
                        "required": [
                          "schema_version",
                          "capability",
                          "scope",
                          "state",
                          "authority",
                          "configuration_revision_id",
                          "enabled_at",
                          "expires_at",
                          "reason"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "capability": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 160
                          },
                          "scope": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "schema_version": {
                                    "type": "number",
                                    "enum": [
                                      1
                                    ]
                                  },
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "tenant"
                                    ]
                                  },
                                  "tenant_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "league_id": {
                                    "type": "null"
                                  },
                                  "match_id": {
                                    "type": "null"
                                  }
                                },
                                "required": [
                                  "schema_version",
                                  "kind",
                                  "tenant_id",
                                  "league_id",
                                  "match_id"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "schema_version": {
                                    "type": "number",
                                    "enum": [
                                      1
                                    ]
                                  },
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "league"
                                    ]
                                  },
                                  "tenant_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "league_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "match_id": {
                                    "type": "null"
                                  }
                                },
                                "required": [
                                  "schema_version",
                                  "kind",
                                  "tenant_id",
                                  "league_id",
                                  "match_id"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "schema_version": {
                                    "type": "number",
                                    "enum": [
                                      1
                                    ]
                                  },
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "match"
                                    ]
                                  },
                                  "tenant_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "league_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "match_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  }
                                },
                                "required": [
                                  "schema_version",
                                  "kind",
                                  "tenant_id",
                                  "league_id",
                                  "match_id"
                                ]
                              }
                            ]
                          },
                          "state": {
                            "type": "string",
                            "enum": [
                              "disabled"
                            ]
                          },
                          "authority": {
                            "type": "string",
                            "enum": [
                              "server"
                            ]
                          },
                          "configuration_revision_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "enabled_at": {
                            "type": "null"
                          },
                          "expires_at": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "reason": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 120
                              },
                              "message": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1000
                              },
                              "retryable": {
                                "type": "boolean"
                              },
                              "recovery_action": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 500
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "code",
                              "message",
                              "retryable",
                              "recovery_action"
                            ]
                          }
                        },
                        "required": [
                          "schema_version",
                          "capability",
                          "scope",
                          "state",
                          "authority",
                          "configuration_revision_id",
                          "enabled_at",
                          "expires_at",
                          "reason"
                        ]
                      }
                    ]
                  }
                },
                "required": [
                  "schema_version",
                  "id",
                  "role",
                  "role_label",
                  "object",
                  "lifecycle",
                  "status",
                  "priority_band",
                  "copy",
                  "deadline",
                  "progress",
                  "link"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "actions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "schema_version": {
                  "type": "number",
                  "enum": [
                    1
                  ]
                },
                "id": {
                  "type": "string",
                  "pattern": "^[a-z_]+(\\.[a-z_]+){2}$"
                },
                "role": {
                  "type": "string",
                  "enum": [
                    "public_user",
                    "player",
                    "team_member",
                    "team_captain",
                    "team_coach",
                    "team_staff",
                    "official",
                    "evaluator",
                    "fantasy",
                    "guardian",
                    "journalist",
                    "hostess",
                    "photographer",
                    "org_operator",
                    "org_admin"
                  ]
                },
                "role_label": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 60
                },
                "object": {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "enum": [
                        "season",
                        "tournament",
                        "round",
                        "match",
                        "team",
                        "player",
                        "assignment",
                        "report_version",
                        "report_submission",
                        "rating_batch",
                        "correction_request",
                        "communication",
                        "transfer_request",
                        "fantasy_league",
                        "fantasy_team",
                        "fantasy_round",
                        "fantasy_auction",
                        "consent",
                        "invitation",
                        "player_claim",
                        "privacy_request",
                        "account"
                      ]
                    },
                    "id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "label": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 120
                    }
                  },
                  "required": [
                    "kind",
                    "id",
                    "label"
                  ]
                },
                "lifecycle": {
                  "type": "string",
                  "enum": [
                    "onboarding",
                    "stagione",
                    "giornata",
                    "pre_gara",
                    "gara_live",
                    "referto",
                    "omologazione",
                    "rettifica",
                    "designazione",
                    "valutazione",
                    "mercato",
                    "fantasy_giornata",
                    "tesseramento",
                    "privacy"
                  ]
                },
                "status": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "state": {
                          "type": "string",
                          "enum": [
                            "todo"
                          ]
                        }
                      },
                      "required": [
                        "state"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "state": {
                          "type": "string",
                          "enum": [
                            "waiting_for"
                          ]
                        },
                        "waiting": {
                          "type": "object",
                          "properties": {
                            "party": {
                              "type": "string",
                              "enum": [
                                "league_secretariat",
                                "assigned_official",
                                "evaluator",
                                "opponent_team",
                                "own_team_players",
                                "team_captain",
                                "guardian",
                                "system_worker",
                                "owner_configuration"
                              ]
                            },
                            "party_label": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 80
                            },
                            "expected_by": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "since": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "party",
                            "party_label",
                            "expected_by",
                            "since"
                          ]
                        }
                      },
                      "required": [
                        "state",
                        "waiting"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "state": {
                          "type": "string",
                          "enum": [
                            "done"
                          ]
                        },
                        "completed_at": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "date-time"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "receipt": {
                          "oneOf": [
                            {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "schema_version": {
                                      "type": "number",
                                      "enum": [
                                        1
                                      ]
                                    },
                                    "receipt_id": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "entity": {
                                      "type": "object",
                                      "properties": {
                                        "entity_type": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 120
                                        },
                                        "entity_id": {
                                          "type": "string",
                                          "format": "uuid"
                                        },
                                        "entity_version": {
                                          "oneOf": [
                                            {
                                              "type": "integer",
                                              "minimum": 0
                                            },
                                            {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 200
                                            }
                                          ]
                                        }
                                      },
                                      "required": [
                                        "entity_type",
                                        "entity_id",
                                        "entity_version"
                                      ]
                                    },
                                    "scope": {
                                      "oneOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "schema_version": {
                                              "type": "number",
                                              "enum": [
                                                1
                                              ]
                                            },
                                            "kind": {
                                              "type": "string",
                                              "enum": [
                                                "tenant"
                                              ]
                                            },
                                            "tenant_id": {
                                              "type": "string",
                                              "format": "uuid"
                                            },
                                            "league_id": {
                                              "type": "null"
                                            },
                                            "match_id": {
                                              "type": "null"
                                            }
                                          },
                                          "required": [
                                            "schema_version",
                                            "kind",
                                            "tenant_id",
                                            "league_id",
                                            "match_id"
                                          ]
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "schema_version": {
                                              "type": "number",
                                              "enum": [
                                                1
                                              ]
                                            },
                                            "kind": {
                                              "type": "string",
                                              "enum": [
                                                "league"
                                              ]
                                            },
                                            "tenant_id": {
                                              "type": "string",
                                              "format": "uuid"
                                            },
                                            "league_id": {
                                              "type": "string",
                                              "format": "uuid"
                                            },
                                            "match_id": {
                                              "type": "null"
                                            }
                                          },
                                          "required": [
                                            "schema_version",
                                            "kind",
                                            "tenant_id",
                                            "league_id",
                                            "match_id"
                                          ]
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "schema_version": {
                                              "type": "number",
                                              "enum": [
                                                1
                                              ]
                                            },
                                            "kind": {
                                              "type": "string",
                                              "enum": [
                                                "match"
                                              ]
                                            },
                                            "tenant_id": {
                                              "type": "string",
                                              "format": "uuid"
                                            },
                                            "league_id": {
                                              "type": "string",
                                              "format": "uuid"
                                            },
                                            "match_id": {
                                              "type": "string",
                                              "format": "uuid"
                                            }
                                          },
                                          "required": [
                                            "schema_version",
                                            "kind",
                                            "tenant_id",
                                            "league_id",
                                            "match_id"
                                          ]
                                        }
                                      ]
                                    },
                                    "actor_user_id": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "consumers": {
                                      "type": "array",
                                      "items": {
                                        "oneOf": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "consumer": {
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 120
                                              },
                                              "state": {
                                                "type": "string",
                                                "enum": [
                                                  "pending"
                                                ]
                                              },
                                              "propagated_at": {
                                                "type": "null"
                                              },
                                              "reason": {
                                                "type": "null"
                                              }
                                            },
                                            "required": [
                                              "consumer",
                                              "state",
                                              "propagated_at",
                                              "reason"
                                            ]
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "consumer": {
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 120
                                              },
                                              "state": {
                                                "type": "string",
                                                "enum": [
                                                  "applied"
                                                ]
                                              },
                                              "propagated_at": {
                                                "type": "string",
                                                "format": "date-time"
                                              },
                                              "reason": {
                                                "type": "null"
                                              }
                                            },
                                            "required": [
                                              "consumer",
                                              "state",
                                              "propagated_at",
                                              "reason"
                                            ]
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "consumer": {
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 120
                                              },
                                              "state": {
                                                "type": "string",
                                                "enum": [
                                                  "failed"
                                                ]
                                              },
                                              "propagated_at": {
                                                "type": "string",
                                                "format": "date-time"
                                              },
                                              "reason": {
                                                "type": "object",
                                                "properties": {
                                                  "code": {
                                                    "type": "string",
                                                    "minLength": 1,
                                                    "maxLength": 120
                                                  },
                                                  "message": {
                                                    "type": "string",
                                                    "minLength": 1,
                                                    "maxLength": 1000
                                                  },
                                                  "retryable": {
                                                    "type": "boolean"
                                                  },
                                                  "recovery_action": {
                                                    "oneOf": [
                                                      {
                                                        "type": "string",
                                                        "minLength": 1,
                                                        "maxLength": 500
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "code",
                                                  "message",
                                                  "retryable",
                                                  "recovery_action"
                                                ]
                                              }
                                            },
                                            "required": [
                                              "consumer",
                                              "state",
                                              "propagated_at",
                                              "reason"
                                            ]
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "consumer": {
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 120
                                              },
                                              "state": {
                                                "type": "string",
                                                "enum": [
                                                  "not_applicable"
                                                ]
                                              },
                                              "propagated_at": {
                                                "type": "string",
                                                "format": "date-time"
                                              },
                                              "reason": {
                                                "type": "object",
                                                "properties": {
                                                  "code": {
                                                    "type": "string",
                                                    "minLength": 1,
                                                    "maxLength": 120
                                                  },
                                                  "message": {
                                                    "type": "string",
                                                    "minLength": 1,
                                                    "maxLength": 1000
                                                  },
                                                  "retryable": {
                                                    "type": "boolean"
                                                  },
                                                  "recovery_action": {
                                                    "oneOf": [
                                                      {
                                                        "type": "string",
                                                        "minLength": 1,
                                                        "maxLength": 500
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "code",
                                                  "message",
                                                  "retryable",
                                                  "recovery_action"
                                                ]
                                              }
                                            },
                                            "required": [
                                              "consumer",
                                              "state",
                                              "propagated_at",
                                              "reason"
                                            ]
                                          }
                                        ]
                                      }
                                    },
                                    "server_timestamp": {
                                      "type": "string",
                                      "format": "date-time"
                                    },
                                    "correlation_id": {
                                      "type": "string",
                                      "minLength": 8,
                                      "maxLength": 200
                                    },
                                    "status": {
                                      "type": "string",
                                      "enum": [
                                        "queued"
                                      ]
                                    },
                                    "reason": {
                                      "oneOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "code": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 120
                                            },
                                            "message": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 1000
                                            },
                                            "retryable": {
                                              "type": "boolean"
                                            },
                                            "recovery_action": {
                                              "oneOf": [
                                                {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 500
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "code",
                                            "message",
                                            "retryable",
                                            "recovery_action"
                                          ]
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "schema_version",
                                    "receipt_id",
                                    "entity",
                                    "scope",
                                    "actor_user_id",
                                    "consumers",
                                    "server_timestamp",
                                    "correlation_id",
                                    "status",
                                    "reason"
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "schema_version": {
                                      "type": "number",
                                      "enum": [
                                        1
                                      ]
                                    },
                                    "receipt_id": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "entity": {
                                      "type": "object",
                                      "properties": {
                                        "entity_type": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 120
                                        },
                                        "entity_id": {
                                          "type": "string",
                                          "format": "uuid"
                                        },
                                        "entity_version": {
                                          "oneOf": [
                                            {
                                              "type": "integer",
                                              "minimum": 0
                                            },
                                            {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 200
                                            }
                                          ]
                                        }
                                      },
                                      "required": [
                                        "entity_type",
                                        "entity_id",
                                        "entity_version"
                                      ]
                                    },
                                    "scope": {
                                      "oneOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "schema_version": {
                                              "type": "number",
                                              "enum": [
                                                1
                                              ]
                                            },
                                            "kind": {
                                              "type": "string",
                                              "enum": [
                                                "tenant"
                                              ]
                                            },
                                            "tenant_id": {
                                              "type": "string",
                                              "format": "uuid"
                                            },
                                            "league_id": {
                                              "type": "null"
                                            },
                                            "match_id": {
                                              "type": "null"
                                            }
                                          },
                                          "required": [
                                            "schema_version",
                                            "kind",
                                            "tenant_id",
                                            "league_id",
                                            "match_id"
                                          ]
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "schema_version": {
                                              "type": "number",
                                              "enum": [
                                                1
                                              ]
                                            },
                                            "kind": {
                                              "type": "string",
                                              "enum": [
                                                "league"
                                              ]
                                            },
                                            "tenant_id": {
                                              "type": "string",
                                              "format": "uuid"
                                            },
                                            "league_id": {
                                              "type": "string",
                                              "format": "uuid"
                                            },
                                            "match_id": {
                                              "type": "null"
                                            }
                                          },
                                          "required": [
                                            "schema_version",
                                            "kind",
                                            "tenant_id",
                                            "league_id",
                                            "match_id"
                                          ]
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "schema_version": {
                                              "type": "number",
                                              "enum": [
                                                1
                                              ]
                                            },
                                            "kind": {
                                              "type": "string",
                                              "enum": [
                                                "match"
                                              ]
                                            },
                                            "tenant_id": {
                                              "type": "string",
                                              "format": "uuid"
                                            },
                                            "league_id": {
                                              "type": "string",
                                              "format": "uuid"
                                            },
                                            "match_id": {
                                              "type": "string",
                                              "format": "uuid"
                                            }
                                          },
                                          "required": [
                                            "schema_version",
                                            "kind",
                                            "tenant_id",
                                            "league_id",
                                            "match_id"
                                          ]
                                        }
                                      ]
                                    },
                                    "actor_user_id": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "consumers": {
                                      "type": "array",
                                      "items": {
                                        "oneOf": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "consumer": {
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 120
                                              },
                                              "state": {
                                                "type": "string",
                                                "enum": [
                                                  "pending"
                                                ]
                                              },
                                              "propagated_at": {
                                                "type": "null"
                                              },
                                              "reason": {
                                                "type": "null"
                                              }
                                            },
                                            "required": [
                                              "consumer",
                                              "state",
                                              "propagated_at",
                                              "reason"
                                            ]
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "consumer": {
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 120
                                              },
                                              "state": {
                                                "type": "string",
                                                "enum": [
                                                  "applied"
                                                ]
                                              },
                                              "propagated_at": {
                                                "type": "string",
                                                "format": "date-time"
                                              },
                                              "reason": {
                                                "type": "null"
                                              }
                                            },
                                            "required": [
                                              "consumer",
                                              "state",
                                              "propagated_at",
                                              "reason"
                                            ]
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "consumer": {
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 120
                                              },
                                              "state": {
                                                "type": "string",
                                                "enum": [
                                                  "failed"
                                                ]
                                              },
                                              "propagated_at": {
                                                "type": "string",
                                                "format": "date-time"
                                              },
                                              "reason": {
                                                "type": "object",
                                                "properties": {
                                                  "code": {
                                                    "type": "string",
                                                    "minLength": 1,
                                                    "maxLength": 120
                                                  },
                                                  "message": {
                                                    "type": "string",
                                                    "minLength": 1,
                                                    "maxLength": 1000
                                                  },
                                                  "retryable": {
                                                    "type": "boolean"
                                                  },
                                                  "recovery_action": {
                                                    "oneOf": [
                                                      {
                                                        "type": "string",
                                                        "minLength": 1,
                                                        "maxLength": 500
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "code",
                                                  "message",
                                                  "retryable",
                                                  "recovery_action"
                                                ]
                                              }
                                            },
                                            "required": [
                                              "consumer",
                                              "state",
                                              "propagated_at",
                                              "reason"
                                            ]
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "consumer": {
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 120
                                              },
                                              "state": {
                                                "type": "string",
                                                "enum": [
                                                  "not_applicable"
                                                ]
                                              },
                                              "propagated_at": {
                                                "type": "string",
                                                "format": "date-time"
                                              },
                                              "reason": {
                                                "type": "object",
                                                "properties": {
                                                  "code": {
                                                    "type": "string",
                                                    "minLength": 1,
                                                    "maxLength": 120
                                                  },
                                                  "message": {
                                                    "type": "string",
                                                    "minLength": 1,
                                                    "maxLength": 1000
                                                  },
                                                  "retryable": {
                                                    "type": "boolean"
                                                  },
                                                  "recovery_action": {
                                                    "oneOf": [
                                                      {
                                                        "type": "string",
                                                        "minLength": 1,
                                                        "maxLength": 500
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "code",
                                                  "message",
                                                  "retryable",
                                                  "recovery_action"
                                                ]
                                              }
                                            },
                                            "required": [
                                              "consumer",
                                              "state",
                                              "propagated_at",
                                              "reason"
                                            ]
                                          }
                                        ]
                                      }
                                    },
                                    "server_timestamp": {
                                      "type": "string",
                                      "format": "date-time"
                                    },
                                    "correlation_id": {
                                      "type": "string",
                                      "minLength": 8,
                                      "maxLength": 200
                                    },
                                    "status": {
                                      "type": "string",
                                      "enum": [
                                        "accepted"
                                      ]
                                    },
                                    "reason": {
                                      "oneOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "code": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 120
                                            },
                                            "message": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 1000
                                            },
                                            "retryable": {
                                              "type": "boolean"
                                            },
                                            "recovery_action": {
                                              "oneOf": [
                                                {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 500
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "code",
                                            "message",
                                            "retryable",
                                            "recovery_action"
                                          ]
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "schema_version",
                                    "receipt_id",
                                    "entity",
                                    "scope",
                                    "actor_user_id",
                                    "consumers",
                                    "server_timestamp",
                                    "correlation_id",
                                    "status",
                                    "reason"
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "schema_version": {
                                      "type": "number",
                                      "enum": [
                                        1
                                      ]
                                    },
                                    "receipt_id": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "entity": {
                                      "type": "object",
                                      "properties": {
                                        "entity_type": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 120
                                        },
                                        "entity_id": {
                                          "type": "string",
                                          "format": "uuid"
                                        },
                                        "entity_version": {
                                          "oneOf": [
                                            {
                                              "type": "integer",
                                              "minimum": 0
                                            },
                                            {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 200
                                            }
                                          ]
                                        }
                                      },
                                      "required": [
                                        "entity_type",
                                        "entity_id",
                                        "entity_version"
                                      ]
                                    },
                                    "scope": {
                                      "oneOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "schema_version": {
                                              "type": "number",
                                              "enum": [
                                                1
                                              ]
                                            },
                                            "kind": {
                                              "type": "string",
                                              "enum": [
                                                "tenant"
                                              ]
                                            },
                                            "tenant_id": {
                                              "type": "string",
                                              "format": "uuid"
                                            },
                                            "league_id": {
                                              "type": "null"
                                            },
                                            "match_id": {
                                              "type": "null"
                                            }
                                          },
                                          "required": [
                                            "schema_version",
                                            "kind",
                                            "tenant_id",
                                            "league_id",
                                            "match_id"
                                          ]
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "schema_version": {
                                              "type": "number",
                                              "enum": [
                                                1
                                              ]
                                            },
                                            "kind": {
                                              "type": "string",
                                              "enum": [
                                                "league"
                                              ]
                                            },
                                            "tenant_id": {
                                              "type": "string",
                                              "format": "uuid"
                                            },
                                            "league_id": {
                                              "type": "string",
                                              "format": "uuid"
                                            },
                                            "match_id": {
                                              "type": "null"
                                            }
                                          },
                                          "required": [
                                            "schema_version",
                                            "kind",
                                            "tenant_id",
                                            "league_id",
                                            "match_id"
                                          ]
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "schema_version": {
                                              "type": "number",
                                              "enum": [
                                                1
                                              ]
                                            },
                                            "kind": {
                                              "type": "string",
                                              "enum": [
                                                "match"
                                              ]
                                            },
                                            "tenant_id": {
                                              "type": "string",
                                              "format": "uuid"
                                            },
                                            "league_id": {
                                              "type": "string",
                                              "format": "uuid"
                                            },
                                            "match_id": {
                                              "type": "string",
                                              "format": "uuid"
                                            }
                                          },
                                          "required": [
                                            "schema_version",
                                            "kind",
                                            "tenant_id",
                                            "league_id",
                                            "match_id"
                                          ]
                                        }
                                      ]
                                    },
                                    "actor_user_id": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "consumers": {
                                      "type": "array",
                                      "items": {
                                        "oneOf": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "consumer": {
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 120
                                              },
                                              "state": {
                                                "type": "string",
                                                "enum": [
                                                  "pending"
                                                ]
                                              },
                                              "propagated_at": {
                                                "type": "null"
                                              },
                                              "reason": {
                                                "type": "null"
                                              }
                                            },
                                            "required": [
                                              "consumer",
                                              "state",
                                              "propagated_at",
                                              "reason"
                                            ]
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "consumer": {
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 120
                                              },
                                              "state": {
                                                "type": "string",
                                                "enum": [
                                                  "applied"
                                                ]
                                              },
                                              "propagated_at": {
                                                "type": "string",
                                                "format": "date-time"
                                              },
                                              "reason": {
                                                "type": "null"
                                              }
                                            },
                                            "required": [
                                              "consumer",
                                              "state",
                                              "propagated_at",
                                              "reason"
                                            ]
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "consumer": {
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 120
                                              },
                                              "state": {
                                                "type": "string",
                                                "enum": [
                                                  "failed"
                                                ]
                                              },
                                              "propagated_at": {
                                                "type": "string",
                                                "format": "date-time"
                                              },
                                              "reason": {
                                                "type": "object",
                                                "properties": {
                                                  "code": {
                                                    "type": "string",
                                                    "minLength": 1,
                                                    "maxLength": 120
                                                  },
                                                  "message": {
                                                    "type": "string",
                                                    "minLength": 1,
                                                    "maxLength": 1000
                                                  },
                                                  "retryable": {
                                                    "type": "boolean"
                                                  },
                                                  "recovery_action": {
                                                    "oneOf": [
                                                      {
                                                        "type": "string",
                                                        "minLength": 1,
                                                        "maxLength": 500
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "code",
                                                  "message",
                                                  "retryable",
                                                  "recovery_action"
                                                ]
                                              }
                                            },
                                            "required": [
                                              "consumer",
                                              "state",
                                              "propagated_at",
                                              "reason"
                                            ]
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "consumer": {
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 120
                                              },
                                              "state": {
                                                "type": "string",
                                                "enum": [
                                                  "not_applicable"
                                                ]
                                              },
                                              "propagated_at": {
                                                "type": "string",
                                                "format": "date-time"
                                              },
                                              "reason": {
                                                "type": "object",
                                                "properties": {
                                                  "code": {
                                                    "type": "string",
                                                    "minLength": 1,
                                                    "maxLength": 120
                                                  },
                                                  "message": {
                                                    "type": "string",
                                                    "minLength": 1,
                                                    "maxLength": 1000
                                                  },
                                                  "retryable": {
                                                    "type": "boolean"
                                                  },
                                                  "recovery_action": {
                                                    "oneOf": [
                                                      {
                                                        "type": "string",
                                                        "minLength": 1,
                                                        "maxLength": 500
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "code",
                                                  "message",
                                                  "retryable",
                                                  "recovery_action"
                                                ]
                                              }
                                            },
                                            "required": [
                                              "consumer",
                                              "state",
                                              "propagated_at",
                                              "reason"
                                            ]
                                          }
                                        ]
                                      }
                                    },
                                    "server_timestamp": {
                                      "type": "string",
                                      "format": "date-time"
                                    },
                                    "correlation_id": {
                                      "type": "string",
                                      "minLength": 8,
                                      "maxLength": 200
                                    },
                                    "status": {
                                      "type": "string",
                                      "enum": [
                                        "rejected"
                                      ]
                                    },
                                    "reason": {
                                      "type": "object",
                                      "properties": {
                                        "code": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 120
                                        },
                                        "message": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 1000
                                        },
                                        "retryable": {
                                          "type": "boolean"
                                        },
                                        "recovery_action": {
                                          "oneOf": [
                                            {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 500
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      },
                                      "required": [
                                        "code",
                                        "message",
                                        "retryable",
                                        "recovery_action"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "schema_version",
                                    "receipt_id",
                                    "entity",
                                    "scope",
                                    "actor_user_id",
                                    "consumers",
                                    "server_timestamp",
                                    "correlation_id",
                                    "status",
                                    "reason"
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "schema_version": {
                                      "type": "number",
                                      "enum": [
                                        1
                                      ]
                                    },
                                    "receipt_id": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "entity": {
                                      "type": "object",
                                      "properties": {
                                        "entity_type": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 120
                                        },
                                        "entity_id": {
                                          "type": "string",
                                          "format": "uuid"
                                        },
                                        "entity_version": {
                                          "oneOf": [
                                            {
                                              "type": "integer",
                                              "minimum": 0
                                            },
                                            {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 200
                                            }
                                          ]
                                        }
                                      },
                                      "required": [
                                        "entity_type",
                                        "entity_id",
                                        "entity_version"
                                      ]
                                    },
                                    "scope": {
                                      "oneOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "schema_version": {
                                              "type": "number",
                                              "enum": [
                                                1
                                              ]
                                            },
                                            "kind": {
                                              "type": "string",
                                              "enum": [
                                                "tenant"
                                              ]
                                            },
                                            "tenant_id": {
                                              "type": "string",
                                              "format": "uuid"
                                            },
                                            "league_id": {
                                              "type": "null"
                                            },
                                            "match_id": {
                                              "type": "null"
                                            }
                                          },
                                          "required": [
                                            "schema_version",
                                            "kind",
                                            "tenant_id",
                                            "league_id",
                                            "match_id"
                                          ]
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "schema_version": {
                                              "type": "number",
                                              "enum": [
                                                1
                                              ]
                                            },
                                            "kind": {
                                              "type": "string",
                                              "enum": [
                                                "league"
                                              ]
                                            },
                                            "tenant_id": {
                                              "type": "string",
                                              "format": "uuid"
                                            },
                                            "league_id": {
                                              "type": "string",
                                              "format": "uuid"
                                            },
                                            "match_id": {
                                              "type": "null"
                                            }
                                          },
                                          "required": [
                                            "schema_version",
                                            "kind",
                                            "tenant_id",
                                            "league_id",
                                            "match_id"
                                          ]
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "schema_version": {
                                              "type": "number",
                                              "enum": [
                                                1
                                              ]
                                            },
                                            "kind": {
                                              "type": "string",
                                              "enum": [
                                                "match"
                                              ]
                                            },
                                            "tenant_id": {
                                              "type": "string",
                                              "format": "uuid"
                                            },
                                            "league_id": {
                                              "type": "string",
                                              "format": "uuid"
                                            },
                                            "match_id": {
                                              "type": "string",
                                              "format": "uuid"
                                            }
                                          },
                                          "required": [
                                            "schema_version",
                                            "kind",
                                            "tenant_id",
                                            "league_id",
                                            "match_id"
                                          ]
                                        }
                                      ]
                                    },
                                    "actor_user_id": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "consumers": {
                                      "type": "array",
                                      "items": {
                                        "oneOf": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "consumer": {
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 120
                                              },
                                              "state": {
                                                "type": "string",
                                                "enum": [
                                                  "pending"
                                                ]
                                              },
                                              "propagated_at": {
                                                "type": "null"
                                              },
                                              "reason": {
                                                "type": "null"
                                              }
                                            },
                                            "required": [
                                              "consumer",
                                              "state",
                                              "propagated_at",
                                              "reason"
                                            ]
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "consumer": {
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 120
                                              },
                                              "state": {
                                                "type": "string",
                                                "enum": [
                                                  "applied"
                                                ]
                                              },
                                              "propagated_at": {
                                                "type": "string",
                                                "format": "date-time"
                                              },
                                              "reason": {
                                                "type": "null"
                                              }
                                            },
                                            "required": [
                                              "consumer",
                                              "state",
                                              "propagated_at",
                                              "reason"
                                            ]
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "consumer": {
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 120
                                              },
                                              "state": {
                                                "type": "string",
                                                "enum": [
                                                  "failed"
                                                ]
                                              },
                                              "propagated_at": {
                                                "type": "string",
                                                "format": "date-time"
                                              },
                                              "reason": {
                                                "type": "object",
                                                "properties": {
                                                  "code": {
                                                    "type": "string",
                                                    "minLength": 1,
                                                    "maxLength": 120
                                                  },
                                                  "message": {
                                                    "type": "string",
                                                    "minLength": 1,
                                                    "maxLength": 1000
                                                  },
                                                  "retryable": {
                                                    "type": "boolean"
                                                  },
                                                  "recovery_action": {
                                                    "oneOf": [
                                                      {
                                                        "type": "string",
                                                        "minLength": 1,
                                                        "maxLength": 500
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "code",
                                                  "message",
                                                  "retryable",
                                                  "recovery_action"
                                                ]
                                              }
                                            },
                                            "required": [
                                              "consumer",
                                              "state",
                                              "propagated_at",
                                              "reason"
                                            ]
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "consumer": {
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 120
                                              },
                                              "state": {
                                                "type": "string",
                                                "enum": [
                                                  "not_applicable"
                                                ]
                                              },
                                              "propagated_at": {
                                                "type": "string",
                                                "format": "date-time"
                                              },
                                              "reason": {
                                                "type": "object",
                                                "properties": {
                                                  "code": {
                                                    "type": "string",
                                                    "minLength": 1,
                                                    "maxLength": 120
                                                  },
                                                  "message": {
                                                    "type": "string",
                                                    "minLength": 1,
                                                    "maxLength": 1000
                                                  },
                                                  "retryable": {
                                                    "type": "boolean"
                                                  },
                                                  "recovery_action": {
                                                    "oneOf": [
                                                      {
                                                        "type": "string",
                                                        "minLength": 1,
                                                        "maxLength": 500
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "code",
                                                  "message",
                                                  "retryable",
                                                  "recovery_action"
                                                ]
                                              }
                                            },
                                            "required": [
                                              "consumer",
                                              "state",
                                              "propagated_at",
                                              "reason"
                                            ]
                                          }
                                        ]
                                      }
                                    },
                                    "server_timestamp": {
                                      "type": "string",
                                      "format": "date-time"
                                    },
                                    "correlation_id": {
                                      "type": "string",
                                      "minLength": 8,
                                      "maxLength": 200
                                    },
                                    "status": {
                                      "type": "string",
                                      "enum": [
                                        "superseded"
                                      ]
                                    },
                                    "reason": {
                                      "type": "object",
                                      "properties": {
                                        "code": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 120
                                        },
                                        "message": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 1000
                                        },
                                        "retryable": {
                                          "type": "boolean"
                                        },
                                        "recovery_action": {
                                          "oneOf": [
                                            {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 500
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      },
                                      "required": [
                                        "code",
                                        "message",
                                        "retryable",
                                        "recovery_action"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "schema_version",
                                    "receipt_id",
                                    "entity",
                                    "scope",
                                    "actor_user_id",
                                    "consumers",
                                    "server_timestamp",
                                    "correlation_id",
                                    "status",
                                    "reason"
                                  ]
                                }
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "state",
                        "completed_at",
                        "receipt"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "state": {
                          "type": "string",
                          "enum": [
                            "blocked"
                          ]
                        },
                        "reason": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "message": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 1000
                            },
                            "retryable": {
                              "type": "boolean"
                            },
                            "recovery_action": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 500
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message",
                            "retryable",
                            "recovery_action"
                          ]
                        },
                        "owner_gate": {
                          "oneOf": [
                            {
                              "type": "string",
                              "pattern": "^(OG-\\d{2}|OWNER-[A-Z]{2,6}-\\d{2})$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "blocks_on": {
                          "oneOf": [
                            {
                              "type": "string",
                              "pattern": "^[a-z_]+(\\.[a-z_]+){2}$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "state",
                        "reason",
                        "owner_gate",
                        "blocks_on"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "state": {
                          "type": "string",
                          "enum": [
                            "not_applicable"
                          ]
                        },
                        "reason": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "message": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 1000
                            },
                            "retryable": {
                              "type": "boolean"
                            },
                            "recovery_action": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 500
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message",
                            "retryable",
                            "recovery_action"
                          ]
                        }
                      },
                      "required": [
                        "state",
                        "reason"
                      ]
                    }
                  ]
                },
                "priority_band": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 60
                },
                "copy": {
                  "type": "object",
                  "properties": {
                    "overline": {
                      "oneOf": [
                        {
                          "type": "string",
                          "maxLength": 40
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "title": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 80
                    },
                    "body": {
                      "oneOf": [
                        {
                          "type": "string",
                          "maxLength": 240
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "cta": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 40
                    },
                    "secondary_cta": {
                      "oneOf": [
                        {
                          "type": "string",
                          "maxLength": 40
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "footnote": {
                      "oneOf": [
                        {
                          "type": "string",
                          "maxLength": 160
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "technical_details": {
                      "oneOf": [
                        {
                          "type": "string",
                          "maxLength": 400
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "overline",
                    "title",
                    "body",
                    "cta",
                    "secondary_cta",
                    "footnote",
                    "technical_details"
                  ]
                },
                "deadline": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "deadline_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "server_time": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "timezone": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 60
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "open",
                            "due_soon",
                            "expired"
                          ]
                        },
                        "source": {
                          "type": "string",
                          "enum": [
                            "competition_ruleset",
                            "league_publication",
                            "match_schedule",
                            "assignment_policy",
                            "fantasy_round",
                            "fantasy_trade_offer",
                            "platform_default"
                          ]
                        },
                        "ruleset_revision_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "deadline_at",
                        "server_time",
                        "timezone",
                        "state",
                        "source",
                        "ruleset_revision_id"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "progress": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "shape": {
                          "type": "string",
                          "enum": [
                            "none"
                          ]
                        }
                      },
                      "required": [
                        "shape"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "shape": {
                          "type": "string",
                          "enum": [
                            "count"
                          ]
                        },
                        "value": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "label": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80
                        }
                      },
                      "required": [
                        "shape",
                        "value",
                        "label"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "shape": {
                          "type": "string",
                          "enum": [
                            "n_of_m"
                          ]
                        },
                        "done": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "total": {
                          "type": "integer",
                          "exclusiveMinimum": 0
                        },
                        "label": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80
                        }
                      },
                      "required": [
                        "shape",
                        "done",
                        "total",
                        "label"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "shape": {
                          "type": "string",
                          "enum": [
                            "stage"
                          ]
                        },
                        "stages": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 40
                          },
                          "minItems": 2
                        },
                        "current_index": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "shape",
                        "stages",
                        "current_index"
                      ]
                    }
                  ]
                },
                "link": {
                  "type": "object",
                  "properties": {
                    "target_kind": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 80
                    },
                    "href": {
                      "type": "string",
                      "maxLength": 300
                    },
                    "params": {
                      "type": "object",
                      "additionalProperties": true,
                      "default": {}
                    }
                  },
                  "required": [
                    "target_kind",
                    "href"
                  ]
                },
                "optional": {
                  "type": "boolean",
                  "default": false
                },
                "source": {
                  "type": "string",
                  "enum": [
                    "server",
                    "device"
                  ],
                  "default": "server"
                },
                "authority": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "schema_version": {
                          "type": "number",
                          "enum": [
                            1
                          ]
                        },
                        "capability": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 160
                        },
                        "scope": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "schema_version": {
                                  "type": "number",
                                  "enum": [
                                    1
                                  ]
                                },
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "tenant"
                                  ]
                                },
                                "tenant_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "league_id": {
                                  "type": "null"
                                },
                                "match_id": {
                                  "type": "null"
                                }
                              },
                              "required": [
                                "schema_version",
                                "kind",
                                "tenant_id",
                                "league_id",
                                "match_id"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "schema_version": {
                                  "type": "number",
                                  "enum": [
                                    1
                                  ]
                                },
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "league"
                                  ]
                                },
                                "tenant_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "league_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "match_id": {
                                  "type": "null"
                                }
                              },
                              "required": [
                                "schema_version",
                                "kind",
                                "tenant_id",
                                "league_id",
                                "match_id"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "schema_version": {
                                  "type": "number",
                                  "enum": [
                                    1
                                  ]
                                },
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "match"
                                  ]
                                },
                                "tenant_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "league_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "match_id": {
                                  "type": "string",
                                  "format": "uuid"
                                }
                              },
                              "required": [
                                "schema_version",
                                "kind",
                                "tenant_id",
                                "league_id",
                                "match_id"
                              ]
                            }
                          ]
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "enabled"
                          ]
                        },
                        "authority": {
                          "type": "string",
                          "enum": [
                            "server"
                          ]
                        },
                        "configuration_revision_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "enabled_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "expires_at": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "date-time"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "reason": {
                          "type": "null"
                        }
                      },
                      "required": [
                        "schema_version",
                        "capability",
                        "scope",
                        "state",
                        "authority",
                        "configuration_revision_id",
                        "enabled_at",
                        "expires_at",
                        "reason"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "schema_version": {
                          "type": "number",
                          "enum": [
                            1
                          ]
                        },
                        "capability": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 160
                        },
                        "scope": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "schema_version": {
                                  "type": "number",
                                  "enum": [
                                    1
                                  ]
                                },
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "tenant"
                                  ]
                                },
                                "tenant_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "league_id": {
                                  "type": "null"
                                },
                                "match_id": {
                                  "type": "null"
                                }
                              },
                              "required": [
                                "schema_version",
                                "kind",
                                "tenant_id",
                                "league_id",
                                "match_id"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "schema_version": {
                                  "type": "number",
                                  "enum": [
                                    1
                                  ]
                                },
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "league"
                                  ]
                                },
                                "tenant_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "league_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "match_id": {
                                  "type": "null"
                                }
                              },
                              "required": [
                                "schema_version",
                                "kind",
                                "tenant_id",
                                "league_id",
                                "match_id"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "schema_version": {
                                  "type": "number",
                                  "enum": [
                                    1
                                  ]
                                },
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "match"
                                  ]
                                },
                                "tenant_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "league_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "match_id": {
                                  "type": "string",
                                  "format": "uuid"
                                }
                              },
                              "required": [
                                "schema_version",
                                "kind",
                                "tenant_id",
                                "league_id",
                                "match_id"
                              ]
                            }
                          ]
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "disabled"
                          ]
                        },
                        "authority": {
                          "type": "string",
                          "enum": [
                            "server"
                          ]
                        },
                        "configuration_revision_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "enabled_at": {
                          "type": "null"
                        },
                        "expires_at": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "date-time"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "reason": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "message": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 1000
                            },
                            "retryable": {
                              "type": "boolean"
                            },
                            "recovery_action": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 500
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message",
                            "retryable",
                            "recovery_action"
                          ]
                        }
                      },
                      "required": [
                        "schema_version",
                        "capability",
                        "scope",
                        "state",
                        "authority",
                        "configuration_revision_id",
                        "enabled_at",
                        "expires_at",
                        "reason"
                      ]
                    }
                  ]
                }
              },
              "required": [
                "schema_version",
                "id",
                "role",
                "role_label",
                "object",
                "lifecycle",
                "status",
                "priority_band",
                "copy",
                "deadline",
                "progress",
                "link"
              ]
            }
          },
          "summary": {
            "type": "object",
            "properties": {
              "todo": {
                "type": "integer",
                "minimum": 0
              },
              "waiting": {
                "type": "integer",
                "minimum": 0
              },
              "blocked": {
                "type": "integer",
                "minimum": 0
              },
              "done_recent": {
                "type": "integer",
                "minimum": 0
              },
              "owner_gates": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "owner_gate": {
                      "type": "string",
                      "pattern": "^(OG-\\d{2}|OWNER-[A-Z]{2,6}-\\d{2})$"
                    },
                    "message": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 240
                    },
                    "blocked_count": {
                      "type": "integer",
                      "exclusiveMinimum": 0
                    },
                    "action_ids": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "pattern": "^[a-z_]+(\\.[a-z_]+){2}$"
                      },
                      "minItems": 1
                    }
                  },
                  "required": [
                    "owner_gate",
                    "message",
                    "blocked_count",
                    "action_ids"
                  ]
                },
                "default": []
              }
            },
            "required": [
              "todo",
              "waiting",
              "blocked",
              "done_recent"
            ]
          },
          "freshness": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "schema_version": {
                    "type": "number",
                    "enum": [
                      1
                    ]
                  },
                  "state": {
                    "type": "string",
                    "enum": [
                      "fresh"
                    ]
                  },
                  "source_revision": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "generated_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "stale_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "invalidation_cursor": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  },
                  "reason": {
                    "type": "null"
                  }
                },
                "required": [
                  "schema_version",
                  "state",
                  "source_revision",
                  "generated_at",
                  "stale_at",
                  "expires_at",
                  "invalidation_cursor",
                  "reason"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "schema_version": {
                    "type": "number",
                    "enum": [
                      1
                    ]
                  },
                  "state": {
                    "type": "string",
                    "enum": [
                      "stale"
                    ]
                  },
                  "source_revision": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "generated_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "stale_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "invalidation_cursor": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  },
                  "reason": {
                    "type": "object",
                    "properties": {
                      "code": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "message": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 1000
                      },
                      "retryable": {
                        "type": "boolean"
                      },
                      "recovery_action": {
                        "oneOf": [
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 500
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "code",
                      "message",
                      "retryable",
                      "recovery_action"
                    ]
                  }
                },
                "required": [
                  "schema_version",
                  "state",
                  "source_revision",
                  "generated_at",
                  "stale_at",
                  "expires_at",
                  "invalidation_cursor",
                  "reason"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "schema_version": {
                    "type": "number",
                    "enum": [
                      1
                    ]
                  },
                  "state": {
                    "type": "string",
                    "enum": [
                      "expired"
                    ]
                  },
                  "source_revision": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "generated_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "stale_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "invalidation_cursor": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  },
                  "reason": {
                    "type": "object",
                    "properties": {
                      "code": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "message": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 1000
                      },
                      "retryable": {
                        "type": "boolean"
                      },
                      "recovery_action": {
                        "oneOf": [
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 500
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "code",
                      "message",
                      "retryable",
                      "recovery_action"
                    ]
                  }
                },
                "required": [
                  "schema_version",
                  "state",
                  "source_revision",
                  "generated_at",
                  "stale_at",
                  "expires_at",
                  "invalidation_cursor",
                  "reason"
                ]
              }
            ]
          },
          "cache": {
            "type": "object",
            "properties": {
              "invalidation_cursor": {
                "type": "string",
                "minLength": 1,
                "maxLength": 300
              }
            },
            "required": [
              "invalidation_cursor"
            ]
          }
        },
        "required": [
          "schema_version",
          "server_time",
          "timezone",
          "scope",
          "roles",
          "primary",
          "actions",
          "summary",
          "freshness",
          "cache"
        ]
      },
      "NextActionsWaitingObject": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "season",
              "tournament",
              "round",
              "match",
              "team",
              "player",
              "assignment",
              "report_version",
              "report_submission",
              "rating_batch",
              "correction_request",
              "communication",
              "transfer_request",
              "fantasy_league",
              "fantasy_team",
              "fantasy_round",
              "fantasy_auction",
              "consent",
              "invitation",
              "player_claim",
              "privacy_request",
              "account"
            ]
          },
          "id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "waiting_count": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "since": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "kind",
          "id",
          "label",
          "waiting_count",
          "since"
        ]
      },
      "NextActionsWaitingGroup": {
        "type": "object",
        "properties": {
          "action_id": {
            "type": "string",
            "pattern": "^[a-z_]+(\\.[a-z_]+){2}$"
          },
          "action_label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "waiting_party": {
            "type": "string",
            "enum": [
              "league_secretariat",
              "assigned_official",
              "evaluator",
              "opponent_team",
              "own_team_players",
              "team_captain",
              "guardian",
              "system_worker",
              "owner_configuration"
            ]
          },
          "waiting_count": {
            "type": "integer",
            "minimum": 0
          },
          "oldest_since": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "link": {
            "type": "object",
            "properties": {
              "target_kind": {
                "type": "string",
                "minLength": 1,
                "maxLength": 80
              },
              "href": {
                "type": "string",
                "maxLength": 300
              },
              "params": {
                "type": "object",
                "additionalProperties": true,
                "default": {}
              }
            },
            "required": [
              "target_kind",
              "href"
            ]
          },
          "objects": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "season",
                    "tournament",
                    "round",
                    "match",
                    "team",
                    "player",
                    "assignment",
                    "report_version",
                    "report_submission",
                    "rating_batch",
                    "correction_request",
                    "communication",
                    "transfer_request",
                    "fantasy_league",
                    "fantasy_team",
                    "fantasy_round",
                    "fantasy_auction",
                    "consent",
                    "invitation",
                    "player_claim",
                    "privacy_request",
                    "account"
                  ]
                },
                "id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "label": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120
                },
                "waiting_count": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "since": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "kind",
                "id",
                "label",
                "waiting_count",
                "since"
              ]
            },
            "default": []
          }
        },
        "required": [
          "action_id",
          "action_label",
          "waiting_party",
          "waiting_count",
          "oldest_since",
          "link"
        ]
      },
      "NextActionsWaitingUnavailable": {
        "type": "object",
        "properties": {
          "action_id": {
            "type": "string",
            "pattern": "^[a-z_]+(\\.[a-z_]+){2}$"
          },
          "action_label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "reason": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "minLength": 1,
                "maxLength": 120
              },
              "message": {
                "type": "string",
                "minLength": 1,
                "maxLength": 1000
              },
              "retryable": {
                "type": "boolean"
              },
              "recovery_action": {
                "oneOf": [
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "code",
              "message",
              "retryable",
              "recovery_action"
            ]
          }
        },
        "required": [
          "action_id",
          "action_label",
          "reason"
        ]
      },
      "NextActionsWaitingAggregate": {
        "type": "object",
        "properties": {
          "schema_version": {
            "type": "number",
            "enum": [
              1
            ]
          },
          "party": {
            "type": "string",
            "enum": [
              "league_secretariat",
              "assigned_official",
              "evaluator",
              "opponent_team",
              "own_team_players",
              "team_captain",
              "guardian",
              "system_worker",
              "owner_configuration"
            ]
          },
          "party_label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "waiting_count": {
            "type": "integer",
            "minimum": 0
          },
          "groups": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "action_id": {
                  "type": "string",
                  "pattern": "^[a-z_]+(\\.[a-z_]+){2}$"
                },
                "action_label": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120
                },
                "waiting_party": {
                  "type": "string",
                  "enum": [
                    "league_secretariat",
                    "assigned_official",
                    "evaluator",
                    "opponent_team",
                    "own_team_players",
                    "team_captain",
                    "guardian",
                    "system_worker",
                    "owner_configuration"
                  ]
                },
                "waiting_count": {
                  "type": "integer",
                  "minimum": 0
                },
                "oldest_since": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "link": {
                  "type": "object",
                  "properties": {
                    "target_kind": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 80
                    },
                    "href": {
                      "type": "string",
                      "maxLength": 300
                    },
                    "params": {
                      "type": "object",
                      "additionalProperties": true,
                      "default": {}
                    }
                  },
                  "required": [
                    "target_kind",
                    "href"
                  ]
                },
                "objects": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "season",
                          "tournament",
                          "round",
                          "match",
                          "team",
                          "player",
                          "assignment",
                          "report_version",
                          "report_submission",
                          "rating_batch",
                          "correction_request",
                          "communication",
                          "transfer_request",
                          "fantasy_league",
                          "fantasy_team",
                          "fantasy_round",
                          "fantasy_auction",
                          "consent",
                          "invitation",
                          "player_claim",
                          "privacy_request",
                          "account"
                        ]
                      },
                      "id": {
                        "oneOf": [
                          {
                            "type": "string",
                            "format": "uuid"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "label": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "waiting_count": {
                        "type": "integer",
                        "exclusiveMinimum": 0
                      },
                      "since": {
                        "oneOf": [
                          {
                            "type": "string",
                            "format": "date-time"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "kind",
                      "id",
                      "label",
                      "waiting_count",
                      "since"
                    ]
                  },
                  "default": []
                }
              },
              "required": [
                "action_id",
                "action_label",
                "waiting_party",
                "waiting_count",
                "oldest_since",
                "link"
              ]
            },
            "default": []
          },
          "unavailable": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "action_id": {
                  "type": "string",
                  "pattern": "^[a-z_]+(\\.[a-z_]+){2}$"
                },
                "action_label": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120
                },
                "reason": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 120
                    },
                    "message": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1000
                    },
                    "retryable": {
                      "type": "boolean"
                    },
                    "recovery_action": {
                      "oneOf": [
                        {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 500
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "code",
                    "message",
                    "retryable",
                    "recovery_action"
                  ]
                }
              },
              "required": [
                "action_id",
                "action_label",
                "reason"
              ]
            },
            "default": []
          }
        },
        "required": [
          "schema_version",
          "party",
          "party_label",
          "waiting_count"
        ]
      },
      "AdminNextActionsResponseV1": {
        "type": "object",
        "properties": {
          "schema_version": {
            "type": "number",
            "enum": [
              1
            ]
          },
          "agenda": {
            "type": "object",
            "properties": {
              "schema_version": {
                "type": "number",
                "enum": [
                  1
                ]
              },
              "server_time": {
                "type": "string",
                "format": "date-time"
              },
              "timezone": {
                "type": "string",
                "minLength": 1,
                "maxLength": 60
              },
              "scope": {
                "type": "object",
                "properties": {
                  "tenant_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "actor_user_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "tournament_id": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "team_id": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "tenant_id",
                  "actor_user_id",
                  "tournament_id",
                  "team_id"
                ]
              },
              "roles": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "enum": [
                        "public_user",
                        "player",
                        "team_member",
                        "team_captain",
                        "team_coach",
                        "team_staff",
                        "official",
                        "evaluator",
                        "fantasy",
                        "guardian",
                        "journalist",
                        "hostess",
                        "photographer",
                        "org_operator",
                        "org_admin"
                      ]
                    },
                    "label": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 60
                    }
                  },
                  "required": [
                    "role",
                    "label"
                  ]
                }
              },
              "primary": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "schema_version": {
                        "type": "number",
                        "enum": [
                          1
                        ]
                      },
                      "id": {
                        "type": "string",
                        "pattern": "^[a-z_]+(\\.[a-z_]+){2}$"
                      },
                      "role": {
                        "type": "string",
                        "enum": [
                          "public_user",
                          "player",
                          "team_member",
                          "team_captain",
                          "team_coach",
                          "team_staff",
                          "official",
                          "evaluator",
                          "fantasy",
                          "guardian",
                          "journalist",
                          "hostess",
                          "photographer",
                          "org_operator",
                          "org_admin"
                        ]
                      },
                      "role_label": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 60
                      },
                      "object": {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "season",
                              "tournament",
                              "round",
                              "match",
                              "team",
                              "player",
                              "assignment",
                              "report_version",
                              "report_submission",
                              "rating_batch",
                              "correction_request",
                              "communication",
                              "transfer_request",
                              "fantasy_league",
                              "fantasy_team",
                              "fantasy_round",
                              "fantasy_auction",
                              "consent",
                              "invitation",
                              "player_claim",
                              "privacy_request",
                              "account"
                            ]
                          },
                          "id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "label": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 120
                          }
                        },
                        "required": [
                          "kind",
                          "id",
                          "label"
                        ]
                      },
                      "lifecycle": {
                        "type": "string",
                        "enum": [
                          "onboarding",
                          "stagione",
                          "giornata",
                          "pre_gara",
                          "gara_live",
                          "referto",
                          "omologazione",
                          "rettifica",
                          "designazione",
                          "valutazione",
                          "mercato",
                          "fantasy_giornata",
                          "tesseramento",
                          "privacy"
                        ]
                      },
                      "status": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "state": {
                                "type": "string",
                                "enum": [
                                  "todo"
                                ]
                              }
                            },
                            "required": [
                              "state"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "state": {
                                "type": "string",
                                "enum": [
                                  "waiting_for"
                                ]
                              },
                              "waiting": {
                                "type": "object",
                                "properties": {
                                  "party": {
                                    "type": "string",
                                    "enum": [
                                      "league_secretariat",
                                      "assigned_official",
                                      "evaluator",
                                      "opponent_team",
                                      "own_team_players",
                                      "team_captain",
                                      "guardian",
                                      "system_worker",
                                      "owner_configuration"
                                    ]
                                  },
                                  "party_label": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 80
                                  },
                                  "expected_by": {
                                    "oneOf": [
                                      {
                                        "type": "string",
                                        "format": "date-time"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "since": {
                                    "oneOf": [
                                      {
                                        "type": "string",
                                        "format": "date-time"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "party",
                                  "party_label",
                                  "expected_by",
                                  "since"
                                ]
                              }
                            },
                            "required": [
                              "state",
                              "waiting"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "state": {
                                "type": "string",
                                "enum": [
                                  "done"
                                ]
                              },
                              "completed_at": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "receipt": {
                                "oneOf": [
                                  {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "schema_version": {
                                            "type": "number",
                                            "enum": [
                                              1
                                            ]
                                          },
                                          "receipt_id": {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          "entity": {
                                            "type": "object",
                                            "properties": {
                                              "entity_type": {
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 120
                                              },
                                              "entity_id": {
                                                "type": "string",
                                                "format": "uuid"
                                              },
                                              "entity_version": {
                                                "oneOf": [
                                                  {
                                                    "type": "integer",
                                                    "minimum": 0
                                                  },
                                                  {
                                                    "type": "string",
                                                    "minLength": 1,
                                                    "maxLength": 200
                                                  }
                                                ]
                                              }
                                            },
                                            "required": [
                                              "entity_type",
                                              "entity_id",
                                              "entity_version"
                                            ]
                                          },
                                          "scope": {
                                            "oneOf": [
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "schema_version": {
                                                    "type": "number",
                                                    "enum": [
                                                      1
                                                    ]
                                                  },
                                                  "kind": {
                                                    "type": "string",
                                                    "enum": [
                                                      "tenant"
                                                    ]
                                                  },
                                                  "tenant_id": {
                                                    "type": "string",
                                                    "format": "uuid"
                                                  },
                                                  "league_id": {
                                                    "type": "null"
                                                  },
                                                  "match_id": {
                                                    "type": "null"
                                                  }
                                                },
                                                "required": [
                                                  "schema_version",
                                                  "kind",
                                                  "tenant_id",
                                                  "league_id",
                                                  "match_id"
                                                ]
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "schema_version": {
                                                    "type": "number",
                                                    "enum": [
                                                      1
                                                    ]
                                                  },
                                                  "kind": {
                                                    "type": "string",
                                                    "enum": [
                                                      "league"
                                                    ]
                                                  },
                                                  "tenant_id": {
                                                    "type": "string",
                                                    "format": "uuid"
                                                  },
                                                  "league_id": {
                                                    "type": "string",
                                                    "format": "uuid"
                                                  },
                                                  "match_id": {
                                                    "type": "null"
                                                  }
                                                },
                                                "required": [
                                                  "schema_version",
                                                  "kind",
                                                  "tenant_id",
                                                  "league_id",
                                                  "match_id"
                                                ]
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "schema_version": {
                                                    "type": "number",
                                                    "enum": [
                                                      1
                                                    ]
                                                  },
                                                  "kind": {
                                                    "type": "string",
                                                    "enum": [
                                                      "match"
                                                    ]
                                                  },
                                                  "tenant_id": {
                                                    "type": "string",
                                                    "format": "uuid"
                                                  },
                                                  "league_id": {
                                                    "type": "string",
                                                    "format": "uuid"
                                                  },
                                                  "match_id": {
                                                    "type": "string",
                                                    "format": "uuid"
                                                  }
                                                },
                                                "required": [
                                                  "schema_version",
                                                  "kind",
                                                  "tenant_id",
                                                  "league_id",
                                                  "match_id"
                                                ]
                                              }
                                            ]
                                          },
                                          "actor_user_id": {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          "consumers": {
                                            "type": "array",
                                            "items": {
                                              "oneOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "consumer": {
                                                      "type": "string",
                                                      "minLength": 1,
                                                      "maxLength": 120
                                                    },
                                                    "state": {
                                                      "type": "string",
                                                      "enum": [
                                                        "pending"
                                                      ]
                                                    },
                                                    "propagated_at": {
                                                      "type": "null"
                                                    },
                                                    "reason": {
                                                      "type": "null"
                                                    }
                                                  },
                                                  "required": [
                                                    "consumer",
                                                    "state",
                                                    "propagated_at",
                                                    "reason"
                                                  ]
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "consumer": {
                                                      "type": "string",
                                                      "minLength": 1,
                                                      "maxLength": 120
                                                    },
                                                    "state": {
                                                      "type": "string",
                                                      "enum": [
                                                        "applied"
                                                      ]
                                                    },
                                                    "propagated_at": {
                                                      "type": "string",
                                                      "format": "date-time"
                                                    },
                                                    "reason": {
                                                      "type": "null"
                                                    }
                                                  },
                                                  "required": [
                                                    "consumer",
                                                    "state",
                                                    "propagated_at",
                                                    "reason"
                                                  ]
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "consumer": {
                                                      "type": "string",
                                                      "minLength": 1,
                                                      "maxLength": 120
                                                    },
                                                    "state": {
                                                      "type": "string",
                                                      "enum": [
                                                        "failed"
                                                      ]
                                                    },
                                                    "propagated_at": {
                                                      "type": "string",
                                                      "format": "date-time"
                                                    },
                                                    "reason": {
                                                      "type": "object",
                                                      "properties": {
                                                        "code": {
                                                          "type": "string",
                                                          "minLength": 1,
                                                          "maxLength": 120
                                                        },
                                                        "message": {
                                                          "type": "string",
                                                          "minLength": 1,
                                                          "maxLength": 1000
                                                        },
                                                        "retryable": {
                                                          "type": "boolean"
                                                        },
                                                        "recovery_action": {
                                                          "oneOf": [
                                                            {
                                                              "type": "string",
                                                              "minLength": 1,
                                                              "maxLength": 500
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        }
                                                      },
                                                      "required": [
                                                        "code",
                                                        "message",
                                                        "retryable",
                                                        "recovery_action"
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "consumer",
                                                    "state",
                                                    "propagated_at",
                                                    "reason"
                                                  ]
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "consumer": {
                                                      "type": "string",
                                                      "minLength": 1,
                                                      "maxLength": 120
                                                    },
                                                    "state": {
                                                      "type": "string",
                                                      "enum": [
                                                        "not_applicable"
                                                      ]
                                                    },
                                                    "propagated_at": {
                                                      "type": "string",
                                                      "format": "date-time"
                                                    },
                                                    "reason": {
                                                      "type": "object",
                                                      "properties": {
                                                        "code": {
                                                          "type": "string",
                                                          "minLength": 1,
                                                          "maxLength": 120
                                                        },
                                                        "message": {
                                                          "type": "string",
                                                          "minLength": 1,
                                                          "maxLength": 1000
                                                        },
                                                        "retryable": {
                                                          "type": "boolean"
                                                        },
                                                        "recovery_action": {
                                                          "oneOf": [
                                                            {
                                                              "type": "string",
                                                              "minLength": 1,
                                                              "maxLength": 500
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        }
                                                      },
                                                      "required": [
                                                        "code",
                                                        "message",
                                                        "retryable",
                                                        "recovery_action"
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "consumer",
                                                    "state",
                                                    "propagated_at",
                                                    "reason"
                                                  ]
                                                }
                                              ]
                                            }
                                          },
                                          "server_timestamp": {
                                            "type": "string",
                                            "format": "date-time"
                                          },
                                          "correlation_id": {
                                            "type": "string",
                                            "minLength": 8,
                                            "maxLength": 200
                                          },
                                          "status": {
                                            "type": "string",
                                            "enum": [
                                              "queued"
                                            ]
                                          },
                                          "reason": {
                                            "oneOf": [
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "code": {
                                                    "type": "string",
                                                    "minLength": 1,
                                                    "maxLength": 120
                                                  },
                                                  "message": {
                                                    "type": "string",
                                                    "minLength": 1,
                                                    "maxLength": 1000
                                                  },
                                                  "retryable": {
                                                    "type": "boolean"
                                                  },
                                                  "recovery_action": {
                                                    "oneOf": [
                                                      {
                                                        "type": "string",
                                                        "minLength": 1,
                                                        "maxLength": 500
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "code",
                                                  "message",
                                                  "retryable",
                                                  "recovery_action"
                                                ]
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "schema_version",
                                          "receipt_id",
                                          "entity",
                                          "scope",
                                          "actor_user_id",
                                          "consumers",
                                          "server_timestamp",
                                          "correlation_id",
                                          "status",
                                          "reason"
                                        ]
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "schema_version": {
                                            "type": "number",
                                            "enum": [
                                              1
                                            ]
                                          },
                                          "receipt_id": {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          "entity": {
                                            "type": "object",
                                            "properties": {
                                              "entity_type": {
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 120
                                              },
                                              "entity_id": {
                                                "type": "string",
                                                "format": "uuid"
                                              },
                                              "entity_version": {
                                                "oneOf": [
                                                  {
                                                    "type": "integer",
                                                    "minimum": 0
                                                  },
                                                  {
                                                    "type": "string",
                                                    "minLength": 1,
                                                    "maxLength": 200
                                                  }
                                                ]
                                              }
                                            },
                                            "required": [
                                              "entity_type",
                                              "entity_id",
                                              "entity_version"
                                            ]
                                          },
                                          "scope": {
                                            "oneOf": [
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "schema_version": {
                                                    "type": "number",
                                                    "enum": [
                                                      1
                                                    ]
                                                  },
                                                  "kind": {
                                                    "type": "string",
                                                    "enum": [
                                                      "tenant"
                                                    ]
                                                  },
                                                  "tenant_id": {
                                                    "type": "string",
                                                    "format": "uuid"
                                                  },
                                                  "league_id": {
                                                    "type": "null"
                                                  },
                                                  "match_id": {
                                                    "type": "null"
                                                  }
                                                },
                                                "required": [
                                                  "schema_version",
                                                  "kind",
                                                  "tenant_id",
                                                  "league_id",
                                                  "match_id"
                                                ]
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "schema_version": {
                                                    "type": "number",
                                                    "enum": [
                                                      1
                                                    ]
                                                  },
                                                  "kind": {
                                                    "type": "string",
                                                    "enum": [
                                                      "league"
                                                    ]
                                                  },
                                                  "tenant_id": {
                                                    "type": "string",
                                                    "format": "uuid"
                                                  },
                                                  "league_id": {
                                                    "type": "string",
                                                    "format": "uuid"
                                                  },
                                                  "match_id": {
                                                    "type": "null"
                                                  }
                                                },
                                                "required": [
                                                  "schema_version",
                                                  "kind",
                                                  "tenant_id",
                                                  "league_id",
                                                  "match_id"
                                                ]
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "schema_version": {
                                                    "type": "number",
                                                    "enum": [
                                                      1
                                                    ]
                                                  },
                                                  "kind": {
                                                    "type": "string",
                                                    "enum": [
                                                      "match"
                                                    ]
                                                  },
                                                  "tenant_id": {
                                                    "type": "string",
                                                    "format": "uuid"
                                                  },
                                                  "league_id": {
                                                    "type": "string",
                                                    "format": "uuid"
                                                  },
                                                  "match_id": {
                                                    "type": "string",
                                                    "format": "uuid"
                                                  }
                                                },
                                                "required": [
                                                  "schema_version",
                                                  "kind",
                                                  "tenant_id",
                                                  "league_id",
                                                  "match_id"
                                                ]
                                              }
                                            ]
                                          },
                                          "actor_user_id": {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          "consumers": {
                                            "type": "array",
                                            "items": {
                                              "oneOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "consumer": {
                                                      "type": "string",
                                                      "minLength": 1,
                                                      "maxLength": 120
                                                    },
                                                    "state": {
                                                      "type": "string",
                                                      "enum": [
                                                        "pending"
                                                      ]
                                                    },
                                                    "propagated_at": {
                                                      "type": "null"
                                                    },
                                                    "reason": {
                                                      "type": "null"
                                                    }
                                                  },
                                                  "required": [
                                                    "consumer",
                                                    "state",
                                                    "propagated_at",
                                                    "reason"
                                                  ]
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "consumer": {
                                                      "type": "string",
                                                      "minLength": 1,
                                                      "maxLength": 120
                                                    },
                                                    "state": {
                                                      "type": "string",
                                                      "enum": [
                                                        "applied"
                                                      ]
                                                    },
                                                    "propagated_at": {
                                                      "type": "string",
                                                      "format": "date-time"
                                                    },
                                                    "reason": {
                                                      "type": "null"
                                                    }
                                                  },
                                                  "required": [
                                                    "consumer",
                                                    "state",
                                                    "propagated_at",
                                                    "reason"
                                                  ]
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "consumer": {
                                                      "type": "string",
                                                      "minLength": 1,
                                                      "maxLength": 120
                                                    },
                                                    "state": {
                                                      "type": "string",
                                                      "enum": [
                                                        "failed"
                                                      ]
                                                    },
                                                    "propagated_at": {
                                                      "type": "string",
                                                      "format": "date-time"
                                                    },
                                                    "reason": {
                                                      "type": "object",
                                                      "properties": {
                                                        "code": {
                                                          "type": "string",
                                                          "minLength": 1,
                                                          "maxLength": 120
                                                        },
                                                        "message": {
                                                          "type": "string",
                                                          "minLength": 1,
                                                          "maxLength": 1000
                                                        },
                                                        "retryable": {
                                                          "type": "boolean"
                                                        },
                                                        "recovery_action": {
                                                          "oneOf": [
                                                            {
                                                              "type": "string",
                                                              "minLength": 1,
                                                              "maxLength": 500
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        }
                                                      },
                                                      "required": [
                                                        "code",
                                                        "message",
                                                        "retryable",
                                                        "recovery_action"
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "consumer",
                                                    "state",
                                                    "propagated_at",
                                                    "reason"
                                                  ]
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "consumer": {
                                                      "type": "string",
                                                      "minLength": 1,
                                                      "maxLength": 120
                                                    },
                                                    "state": {
                                                      "type": "string",
                                                      "enum": [
                                                        "not_applicable"
                                                      ]
                                                    },
                                                    "propagated_at": {
                                                      "type": "string",
                                                      "format": "date-time"
                                                    },
                                                    "reason": {
                                                      "type": "object",
                                                      "properties": {
                                                        "code": {
                                                          "type": "string",
                                                          "minLength": 1,
                                                          "maxLength": 120
                                                        },
                                                        "message": {
                                                          "type": "string",
                                                          "minLength": 1,
                                                          "maxLength": 1000
                                                        },
                                                        "retryable": {
                                                          "type": "boolean"
                                                        },
                                                        "recovery_action": {
                                                          "oneOf": [
                                                            {
                                                              "type": "string",
                                                              "minLength": 1,
                                                              "maxLength": 500
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        }
                                                      },
                                                      "required": [
                                                        "code",
                                                        "message",
                                                        "retryable",
                                                        "recovery_action"
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "consumer",
                                                    "state",
                                                    "propagated_at",
                                                    "reason"
                                                  ]
                                                }
                                              ]
                                            }
                                          },
                                          "server_timestamp": {
                                            "type": "string",
                                            "format": "date-time"
                                          },
                                          "correlation_id": {
                                            "type": "string",
                                            "minLength": 8,
                                            "maxLength": 200
                                          },
                                          "status": {
                                            "type": "string",
                                            "enum": [
                                              "accepted"
                                            ]
                                          },
                                          "reason": {
                                            "oneOf": [
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "code": {
                                                    "type": "string",
                                                    "minLength": 1,
                                                    "maxLength": 120
                                                  },
                                                  "message": {
                                                    "type": "string",
                                                    "minLength": 1,
                                                    "maxLength": 1000
                                                  },
                                                  "retryable": {
                                                    "type": "boolean"
                                                  },
                                                  "recovery_action": {
                                                    "oneOf": [
                                                      {
                                                        "type": "string",
                                                        "minLength": 1,
                                                        "maxLength": 500
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "code",
                                                  "message",
                                                  "retryable",
                                                  "recovery_action"
                                                ]
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "schema_version",
                                          "receipt_id",
                                          "entity",
                                          "scope",
                                          "actor_user_id",
                                          "consumers",
                                          "server_timestamp",
                                          "correlation_id",
                                          "status",
                                          "reason"
                                        ]
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "schema_version": {
                                            "type": "number",
                                            "enum": [
                                              1
                                            ]
                                          },
                                          "receipt_id": {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          "entity": {
                                            "type": "object",
                                            "properties": {
                                              "entity_type": {
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 120
                                              },
                                              "entity_id": {
                                                "type": "string",
                                                "format": "uuid"
                                              },
                                              "entity_version": {
                                                "oneOf": [
                                                  {
                                                    "type": "integer",
                                                    "minimum": 0
                                                  },
                                                  {
                                                    "type": "string",
                                                    "minLength": 1,
                                                    "maxLength": 200
                                                  }
                                                ]
                                              }
                                            },
                                            "required": [
                                              "entity_type",
                                              "entity_id",
                                              "entity_version"
                                            ]
                                          },
                                          "scope": {
                                            "oneOf": [
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "schema_version": {
                                                    "type": "number",
                                                    "enum": [
                                                      1
                                                    ]
                                                  },
                                                  "kind": {
                                                    "type": "string",
                                                    "enum": [
                                                      "tenant"
                                                    ]
                                                  },
                                                  "tenant_id": {
                                                    "type": "string",
                                                    "format": "uuid"
                                                  },
                                                  "league_id": {
                                                    "type": "null"
                                                  },
                                                  "match_id": {
                                                    "type": "null"
                                                  }
                                                },
                                                "required": [
                                                  "schema_version",
                                                  "kind",
                                                  "tenant_id",
                                                  "league_id",
                                                  "match_id"
                                                ]
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "schema_version": {
                                                    "type": "number",
                                                    "enum": [
                                                      1
                                                    ]
                                                  },
                                                  "kind": {
                                                    "type": "string",
                                                    "enum": [
                                                      "league"
                                                    ]
                                                  },
                                                  "tenant_id": {
                                                    "type": "string",
                                                    "format": "uuid"
                                                  },
                                                  "league_id": {
                                                    "type": "string",
                                                    "format": "uuid"
                                                  },
                                                  "match_id": {
                                                    "type": "null"
                                                  }
                                                },
                                                "required": [
                                                  "schema_version",
                                                  "kind",
                                                  "tenant_id",
                                                  "league_id",
                                                  "match_id"
                                                ]
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "schema_version": {
                                                    "type": "number",
                                                    "enum": [
                                                      1
                                                    ]
                                                  },
                                                  "kind": {
                                                    "type": "string",
                                                    "enum": [
                                                      "match"
                                                    ]
                                                  },
                                                  "tenant_id": {
                                                    "type": "string",
                                                    "format": "uuid"
                                                  },
                                                  "league_id": {
                                                    "type": "string",
                                                    "format": "uuid"
                                                  },
                                                  "match_id": {
                                                    "type": "string",
                                                    "format": "uuid"
                                                  }
                                                },
                                                "required": [
                                                  "schema_version",
                                                  "kind",
                                                  "tenant_id",
                                                  "league_id",
                                                  "match_id"
                                                ]
                                              }
                                            ]
                                          },
                                          "actor_user_id": {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          "consumers": {
                                            "type": "array",
                                            "items": {
                                              "oneOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "consumer": {
                                                      "type": "string",
                                                      "minLength": 1,
                                                      "maxLength": 120
                                                    },
                                                    "state": {
                                                      "type": "string",
                                                      "enum": [
                                                        "pending"
                                                      ]
                                                    },
                                                    "propagated_at": {
                                                      "type": "null"
                                                    },
                                                    "reason": {
                                                      "type": "null"
                                                    }
                                                  },
                                                  "required": [
                                                    "consumer",
                                                    "state",
                                                    "propagated_at",
                                                    "reason"
                                                  ]
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "consumer": {
                                                      "type": "string",
                                                      "minLength": 1,
                                                      "maxLength": 120
                                                    },
                                                    "state": {
                                                      "type": "string",
                                                      "enum": [
                                                        "applied"
                                                      ]
                                                    },
                                                    "propagated_at": {
                                                      "type": "string",
                                                      "format": "date-time"
                                                    },
                                                    "reason": {
                                                      "type": "null"
                                                    }
                                                  },
                                                  "required": [
                                                    "consumer",
                                                    "state",
                                                    "propagated_at",
                                                    "reason"
                                                  ]
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "consumer": {
                                                      "type": "string",
                                                      "minLength": 1,
                                                      "maxLength": 120
                                                    },
                                                    "state": {
                                                      "type": "string",
                                                      "enum": [
                                                        "failed"
                                                      ]
                                                    },
                                                    "propagated_at": {
                                                      "type": "string",
                                                      "format": "date-time"
                                                    },
                                                    "reason": {
                                                      "type": "object",
                                                      "properties": {
                                                        "code": {
                                                          "type": "string",
                                                          "minLength": 1,
                                                          "maxLength": 120
                                                        },
                                                        "message": {
                                                          "type": "string",
                                                          "minLength": 1,
                                                          "maxLength": 1000
                                                        },
                                                        "retryable": {
                                                          "type": "boolean"
                                                        },
                                                        "recovery_action": {
                                                          "oneOf": [
                                                            {
                                                              "type": "string",
                                                              "minLength": 1,
                                                              "maxLength": 500
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        }
                                                      },
                                                      "required": [
                                                        "code",
                                                        "message",
                                                        "retryable",
                                                        "recovery_action"
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "consumer",
                                                    "state",
                                                    "propagated_at",
                                                    "reason"
                                                  ]
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "consumer": {
                                                      "type": "string",
                                                      "minLength": 1,
                                                      "maxLength": 120
                                                    },
                                                    "state": {
                                                      "type": "string",
                                                      "enum": [
                                                        "not_applicable"
                                                      ]
                                                    },
                                                    "propagated_at": {
                                                      "type": "string",
                                                      "format": "date-time"
                                                    },
                                                    "reason": {
                                                      "type": "object",
                                                      "properties": {
                                                        "code": {
                                                          "type": "string",
                                                          "minLength": 1,
                                                          "maxLength": 120
                                                        },
                                                        "message": {
                                                          "type": "string",
                                                          "minLength": 1,
                                                          "maxLength": 1000
                                                        },
                                                        "retryable": {
                                                          "type": "boolean"
                                                        },
                                                        "recovery_action": {
                                                          "oneOf": [
                                                            {
                                                              "type": "string",
                                                              "minLength": 1,
                                                              "maxLength": 500
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        }
                                                      },
                                                      "required": [
                                                        "code",
                                                        "message",
                                                        "retryable",
                                                        "recovery_action"
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "consumer",
                                                    "state",
                                                    "propagated_at",
                                                    "reason"
                                                  ]
                                                }
                                              ]
                                            }
                                          },
                                          "server_timestamp": {
                                            "type": "string",
                                            "format": "date-time"
                                          },
                                          "correlation_id": {
                                            "type": "string",
                                            "minLength": 8,
                                            "maxLength": 200
                                          },
                                          "status": {
                                            "type": "string",
                                            "enum": [
                                              "rejected"
                                            ]
                                          },
                                          "reason": {
                                            "type": "object",
                                            "properties": {
                                              "code": {
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 120
                                              },
                                              "message": {
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 1000
                                              },
                                              "retryable": {
                                                "type": "boolean"
                                              },
                                              "recovery_action": {
                                                "oneOf": [
                                                  {
                                                    "type": "string",
                                                    "minLength": 1,
                                                    "maxLength": 500
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              }
                                            },
                                            "required": [
                                              "code",
                                              "message",
                                              "retryable",
                                              "recovery_action"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "schema_version",
                                          "receipt_id",
                                          "entity",
                                          "scope",
                                          "actor_user_id",
                                          "consumers",
                                          "server_timestamp",
                                          "correlation_id",
                                          "status",
                                          "reason"
                                        ]
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "schema_version": {
                                            "type": "number",
                                            "enum": [
                                              1
                                            ]
                                          },
                                          "receipt_id": {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          "entity": {
                                            "type": "object",
                                            "properties": {
                                              "entity_type": {
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 120
                                              },
                                              "entity_id": {
                                                "type": "string",
                                                "format": "uuid"
                                              },
                                              "entity_version": {
                                                "oneOf": [
                                                  {
                                                    "type": "integer",
                                                    "minimum": 0
                                                  },
                                                  {
                                                    "type": "string",
                                                    "minLength": 1,
                                                    "maxLength": 200
                                                  }
                                                ]
                                              }
                                            },
                                            "required": [
                                              "entity_type",
                                              "entity_id",
                                              "entity_version"
                                            ]
                                          },
                                          "scope": {
                                            "oneOf": [
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "schema_version": {
                                                    "type": "number",
                                                    "enum": [
                                                      1
                                                    ]
                                                  },
                                                  "kind": {
                                                    "type": "string",
                                                    "enum": [
                                                      "tenant"
                                                    ]
                                                  },
                                                  "tenant_id": {
                                                    "type": "string",
                                                    "format": "uuid"
                                                  },
                                                  "league_id": {
                                                    "type": "null"
                                                  },
                                                  "match_id": {
                                                    "type": "null"
                                                  }
                                                },
                                                "required": [
                                                  "schema_version",
                                                  "kind",
                                                  "tenant_id",
                                                  "league_id",
                                                  "match_id"
                                                ]
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "schema_version": {
                                                    "type": "number",
                                                    "enum": [
                                                      1
                                                    ]
                                                  },
                                                  "kind": {
                                                    "type": "string",
                                                    "enum": [
                                                      "league"
                                                    ]
                                                  },
                                                  "tenant_id": {
                                                    "type": "string",
                                                    "format": "uuid"
                                                  },
                                                  "league_id": {
                                                    "type": "string",
                                                    "format": "uuid"
                                                  },
                                                  "match_id": {
                                                    "type": "null"
                                                  }
                                                },
                                                "required": [
                                                  "schema_version",
                                                  "kind",
                                                  "tenant_id",
                                                  "league_id",
                                                  "match_id"
                                                ]
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "schema_version": {
                                                    "type": "number",
                                                    "enum": [
                                                      1
                                                    ]
                                                  },
                                                  "kind": {
                                                    "type": "string",
                                                    "enum": [
                                                      "match"
                                                    ]
                                                  },
                                                  "tenant_id": {
                                                    "type": "string",
                                                    "format": "uuid"
                                                  },
                                                  "league_id": {
                                                    "type": "string",
                                                    "format": "uuid"
                                                  },
                                                  "match_id": {
                                                    "type": "string",
                                                    "format": "uuid"
                                                  }
                                                },
                                                "required": [
                                                  "schema_version",
                                                  "kind",
                                                  "tenant_id",
                                                  "league_id",
                                                  "match_id"
                                                ]
                                              }
                                            ]
                                          },
                                          "actor_user_id": {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          "consumers": {
                                            "type": "array",
                                            "items": {
                                              "oneOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "consumer": {
                                                      "type": "string",
                                                      "minLength": 1,
                                                      "maxLength": 120
                                                    },
                                                    "state": {
                                                      "type": "string",
                                                      "enum": [
                                                        "pending"
                                                      ]
                                                    },
                                                    "propagated_at": {
                                                      "type": "null"
                                                    },
                                                    "reason": {
                                                      "type": "null"
                                                    }
                                                  },
                                                  "required": [
                                                    "consumer",
                                                    "state",
                                                    "propagated_at",
                                                    "reason"
                                                  ]
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "consumer": {
                                                      "type": "string",
                                                      "minLength": 1,
                                                      "maxLength": 120
                                                    },
                                                    "state": {
                                                      "type": "string",
                                                      "enum": [
                                                        "applied"
                                                      ]
                                                    },
                                                    "propagated_at": {
                                                      "type": "string",
                                                      "format": "date-time"
                                                    },
                                                    "reason": {
                                                      "type": "null"
                                                    }
                                                  },
                                                  "required": [
                                                    "consumer",
                                                    "state",
                                                    "propagated_at",
                                                    "reason"
                                                  ]
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "consumer": {
                                                      "type": "string",
                                                      "minLength": 1,
                                                      "maxLength": 120
                                                    },
                                                    "state": {
                                                      "type": "string",
                                                      "enum": [
                                                        "failed"
                                                      ]
                                                    },
                                                    "propagated_at": {
                                                      "type": "string",
                                                      "format": "date-time"
                                                    },
                                                    "reason": {
                                                      "type": "object",
                                                      "properties": {
                                                        "code": {
                                                          "type": "string",
                                                          "minLength": 1,
                                                          "maxLength": 120
                                                        },
                                                        "message": {
                                                          "type": "string",
                                                          "minLength": 1,
                                                          "maxLength": 1000
                                                        },
                                                        "retryable": {
                                                          "type": "boolean"
                                                        },
                                                        "recovery_action": {
                                                          "oneOf": [
                                                            {
                                                              "type": "string",
                                                              "minLength": 1,
                                                              "maxLength": 500
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        }
                                                      },
                                                      "required": [
                                                        "code",
                                                        "message",
                                                        "retryable",
                                                        "recovery_action"
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "consumer",
                                                    "state",
                                                    "propagated_at",
                                                    "reason"
                                                  ]
                                                },
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "consumer": {
                                                      "type": "string",
                                                      "minLength": 1,
                                                      "maxLength": 120
                                                    },
                                                    "state": {
                                                      "type": "string",
                                                      "enum": [
                                                        "not_applicable"
                                                      ]
                                                    },
                                                    "propagated_at": {
                                                      "type": "string",
                                                      "format": "date-time"
                                                    },
                                                    "reason": {
                                                      "type": "object",
                                                      "properties": {
                                                        "code": {
                                                          "type": "string",
                                                          "minLength": 1,
                                                          "maxLength": 120
                                                        },
                                                        "message": {
                                                          "type": "string",
                                                          "minLength": 1,
                                                          "maxLength": 1000
                                                        },
                                                        "retryable": {
                                                          "type": "boolean"
                                                        },
                                                        "recovery_action": {
                                                          "oneOf": [
                                                            {
                                                              "type": "string",
                                                              "minLength": 1,
                                                              "maxLength": 500
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        }
                                                      },
                                                      "required": [
                                                        "code",
                                                        "message",
                                                        "retryable",
                                                        "recovery_action"
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "consumer",
                                                    "state",
                                                    "propagated_at",
                                                    "reason"
                                                  ]
                                                }
                                              ]
                                            }
                                          },
                                          "server_timestamp": {
                                            "type": "string",
                                            "format": "date-time"
                                          },
                                          "correlation_id": {
                                            "type": "string",
                                            "minLength": 8,
                                            "maxLength": 200
                                          },
                                          "status": {
                                            "type": "string",
                                            "enum": [
                                              "superseded"
                                            ]
                                          },
                                          "reason": {
                                            "type": "object",
                                            "properties": {
                                              "code": {
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 120
                                              },
                                              "message": {
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 1000
                                              },
                                              "retryable": {
                                                "type": "boolean"
                                              },
                                              "recovery_action": {
                                                "oneOf": [
                                                  {
                                                    "type": "string",
                                                    "minLength": 1,
                                                    "maxLength": 500
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              }
                                            },
                                            "required": [
                                              "code",
                                              "message",
                                              "retryable",
                                              "recovery_action"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "schema_version",
                                          "receipt_id",
                                          "entity",
                                          "scope",
                                          "actor_user_id",
                                          "consumers",
                                          "server_timestamp",
                                          "correlation_id",
                                          "status",
                                          "reason"
                                        ]
                                      }
                                    ]
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "state",
                              "completed_at",
                              "receipt"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "state": {
                                "type": "string",
                                "enum": [
                                  "blocked"
                                ]
                              },
                              "reason": {
                                "type": "object",
                                "properties": {
                                  "code": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 120
                                  },
                                  "message": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 1000
                                  },
                                  "retryable": {
                                    "type": "boolean"
                                  },
                                  "recovery_action": {
                                    "oneOf": [
                                      {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 500
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "code",
                                  "message",
                                  "retryable",
                                  "recovery_action"
                                ]
                              },
                              "owner_gate": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "pattern": "^(OG-\\d{2}|OWNER-[A-Z]{2,6}-\\d{2})$"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "blocks_on": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "pattern": "^[a-z_]+(\\.[a-z_]+){2}$"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "state",
                              "reason",
                              "owner_gate",
                              "blocks_on"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "state": {
                                "type": "string",
                                "enum": [
                                  "not_applicable"
                                ]
                              },
                              "reason": {
                                "type": "object",
                                "properties": {
                                  "code": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 120
                                  },
                                  "message": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 1000
                                  },
                                  "retryable": {
                                    "type": "boolean"
                                  },
                                  "recovery_action": {
                                    "oneOf": [
                                      {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 500
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "code",
                                  "message",
                                  "retryable",
                                  "recovery_action"
                                ]
                              }
                            },
                            "required": [
                              "state",
                              "reason"
                            ]
                          }
                        ]
                      },
                      "priority_band": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 60
                      },
                      "copy": {
                        "type": "object",
                        "properties": {
                          "overline": {
                            "oneOf": [
                              {
                                "type": "string",
                                "maxLength": 40
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "title": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 80
                          },
                          "body": {
                            "oneOf": [
                              {
                                "type": "string",
                                "maxLength": 240
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "cta": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 40
                          },
                          "secondary_cta": {
                            "oneOf": [
                              {
                                "type": "string",
                                "maxLength": 40
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "footnote": {
                            "oneOf": [
                              {
                                "type": "string",
                                "maxLength": 160
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "technical_details": {
                            "oneOf": [
                              {
                                "type": "string",
                                "maxLength": 400
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "overline",
                          "title",
                          "body",
                          "cta",
                          "secondary_cta",
                          "footnote",
                          "technical_details"
                        ]
                      },
                      "deadline": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "deadline_at": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "server_time": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "timezone": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 60
                              },
                              "state": {
                                "type": "string",
                                "enum": [
                                  "open",
                                  "due_soon",
                                  "expired"
                                ]
                              },
                              "source": {
                                "type": "string",
                                "enum": [
                                  "competition_ruleset",
                                  "league_publication",
                                  "match_schedule",
                                  "assignment_policy",
                                  "fantasy_round",
                                  "fantasy_trade_offer",
                                  "platform_default"
                                ]
                              },
                              "ruleset_revision_id": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "deadline_at",
                              "server_time",
                              "timezone",
                              "state",
                              "source",
                              "ruleset_revision_id"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "progress": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "shape": {
                                "type": "string",
                                "enum": [
                                  "none"
                                ]
                              }
                            },
                            "required": [
                              "shape"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "shape": {
                                "type": "string",
                                "enum": [
                                  "count"
                                ]
                              },
                              "value": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "label": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 80
                              }
                            },
                            "required": [
                              "shape",
                              "value",
                              "label"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "shape": {
                                "type": "string",
                                "enum": [
                                  "n_of_m"
                                ]
                              },
                              "done": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "total": {
                                "type": "integer",
                                "exclusiveMinimum": 0
                              },
                              "label": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 80
                              }
                            },
                            "required": [
                              "shape",
                              "done",
                              "total",
                              "label"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "shape": {
                                "type": "string",
                                "enum": [
                                  "stage"
                                ]
                              },
                              "stages": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 40
                                },
                                "minItems": 2
                              },
                              "current_index": {
                                "type": "integer",
                                "minimum": 0
                              }
                            },
                            "required": [
                              "shape",
                              "stages",
                              "current_index"
                            ]
                          }
                        ]
                      },
                      "link": {
                        "type": "object",
                        "properties": {
                          "target_kind": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 80
                          },
                          "href": {
                            "type": "string",
                            "maxLength": 300
                          },
                          "params": {
                            "type": "object",
                            "additionalProperties": true,
                            "default": {}
                          }
                        },
                        "required": [
                          "target_kind",
                          "href"
                        ]
                      },
                      "optional": {
                        "type": "boolean",
                        "default": false
                      },
                      "source": {
                        "type": "string",
                        "enum": [
                          "server",
                          "device"
                        ],
                        "default": "server"
                      },
                      "authority": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "schema_version": {
                                "type": "number",
                                "enum": [
                                  1
                                ]
                              },
                              "capability": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 160
                              },
                              "scope": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "schema_version": {
                                        "type": "number",
                                        "enum": [
                                          1
                                        ]
                                      },
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "tenant"
                                        ]
                                      },
                                      "tenant_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "league_id": {
                                        "type": "null"
                                      },
                                      "match_id": {
                                        "type": "null"
                                      }
                                    },
                                    "required": [
                                      "schema_version",
                                      "kind",
                                      "tenant_id",
                                      "league_id",
                                      "match_id"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "schema_version": {
                                        "type": "number",
                                        "enum": [
                                          1
                                        ]
                                      },
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "league"
                                        ]
                                      },
                                      "tenant_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "league_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "match_id": {
                                        "type": "null"
                                      }
                                    },
                                    "required": [
                                      "schema_version",
                                      "kind",
                                      "tenant_id",
                                      "league_id",
                                      "match_id"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "schema_version": {
                                        "type": "number",
                                        "enum": [
                                          1
                                        ]
                                      },
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "match"
                                        ]
                                      },
                                      "tenant_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "league_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "match_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      }
                                    },
                                    "required": [
                                      "schema_version",
                                      "kind",
                                      "tenant_id",
                                      "league_id",
                                      "match_id"
                                    ]
                                  }
                                ]
                              },
                              "state": {
                                "type": "string",
                                "enum": [
                                  "enabled"
                                ]
                              },
                              "authority": {
                                "type": "string",
                                "enum": [
                                  "server"
                                ]
                              },
                              "configuration_revision_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "enabled_at": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "expires_at": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "reason": {
                                "type": "null"
                              }
                            },
                            "required": [
                              "schema_version",
                              "capability",
                              "scope",
                              "state",
                              "authority",
                              "configuration_revision_id",
                              "enabled_at",
                              "expires_at",
                              "reason"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "schema_version": {
                                "type": "number",
                                "enum": [
                                  1
                                ]
                              },
                              "capability": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 160
                              },
                              "scope": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "schema_version": {
                                        "type": "number",
                                        "enum": [
                                          1
                                        ]
                                      },
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "tenant"
                                        ]
                                      },
                                      "tenant_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "league_id": {
                                        "type": "null"
                                      },
                                      "match_id": {
                                        "type": "null"
                                      }
                                    },
                                    "required": [
                                      "schema_version",
                                      "kind",
                                      "tenant_id",
                                      "league_id",
                                      "match_id"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "schema_version": {
                                        "type": "number",
                                        "enum": [
                                          1
                                        ]
                                      },
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "league"
                                        ]
                                      },
                                      "tenant_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "league_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "match_id": {
                                        "type": "null"
                                      }
                                    },
                                    "required": [
                                      "schema_version",
                                      "kind",
                                      "tenant_id",
                                      "league_id",
                                      "match_id"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "schema_version": {
                                        "type": "number",
                                        "enum": [
                                          1
                                        ]
                                      },
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "match"
                                        ]
                                      },
                                      "tenant_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "league_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "match_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      }
                                    },
                                    "required": [
                                      "schema_version",
                                      "kind",
                                      "tenant_id",
                                      "league_id",
                                      "match_id"
                                    ]
                                  }
                                ]
                              },
                              "state": {
                                "type": "string",
                                "enum": [
                                  "disabled"
                                ]
                              },
                              "authority": {
                                "type": "string",
                                "enum": [
                                  "server"
                                ]
                              },
                              "configuration_revision_id": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "enabled_at": {
                                "type": "null"
                              },
                              "expires_at": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "reason": {
                                "type": "object",
                                "properties": {
                                  "code": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 120
                                  },
                                  "message": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 1000
                                  },
                                  "retryable": {
                                    "type": "boolean"
                                  },
                                  "recovery_action": {
                                    "oneOf": [
                                      {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 500
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "code",
                                  "message",
                                  "retryable",
                                  "recovery_action"
                                ]
                              }
                            },
                            "required": [
                              "schema_version",
                              "capability",
                              "scope",
                              "state",
                              "authority",
                              "configuration_revision_id",
                              "enabled_at",
                              "expires_at",
                              "reason"
                            ]
                          }
                        ]
                      }
                    },
                    "required": [
                      "schema_version",
                      "id",
                      "role",
                      "role_label",
                      "object",
                      "lifecycle",
                      "status",
                      "priority_band",
                      "copy",
                      "deadline",
                      "progress",
                      "link"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "actions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "schema_version": {
                      "type": "number",
                      "enum": [
                        1
                      ]
                    },
                    "id": {
                      "type": "string",
                      "pattern": "^[a-z_]+(\\.[a-z_]+){2}$"
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "public_user",
                        "player",
                        "team_member",
                        "team_captain",
                        "team_coach",
                        "team_staff",
                        "official",
                        "evaluator",
                        "fantasy",
                        "guardian",
                        "journalist",
                        "hostess",
                        "photographer",
                        "org_operator",
                        "org_admin"
                      ]
                    },
                    "role_label": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 60
                    },
                    "object": {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "enum": [
                            "season",
                            "tournament",
                            "round",
                            "match",
                            "team",
                            "player",
                            "assignment",
                            "report_version",
                            "report_submission",
                            "rating_batch",
                            "correction_request",
                            "communication",
                            "transfer_request",
                            "fantasy_league",
                            "fantasy_team",
                            "fantasy_round",
                            "fantasy_auction",
                            "consent",
                            "invitation",
                            "player_claim",
                            "privacy_request",
                            "account"
                          ]
                        },
                        "id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "label": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 120
                        }
                      },
                      "required": [
                        "kind",
                        "id",
                        "label"
                      ]
                    },
                    "lifecycle": {
                      "type": "string",
                      "enum": [
                        "onboarding",
                        "stagione",
                        "giornata",
                        "pre_gara",
                        "gara_live",
                        "referto",
                        "omologazione",
                        "rettifica",
                        "designazione",
                        "valutazione",
                        "mercato",
                        "fantasy_giornata",
                        "tesseramento",
                        "privacy"
                      ]
                    },
                    "status": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "state": {
                              "type": "string",
                              "enum": [
                                "todo"
                              ]
                            }
                          },
                          "required": [
                            "state"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "state": {
                              "type": "string",
                              "enum": [
                                "waiting_for"
                              ]
                            },
                            "waiting": {
                              "type": "object",
                              "properties": {
                                "party": {
                                  "type": "string",
                                  "enum": [
                                    "league_secretariat",
                                    "assigned_official",
                                    "evaluator",
                                    "opponent_team",
                                    "own_team_players",
                                    "team_captain",
                                    "guardian",
                                    "system_worker",
                                    "owner_configuration"
                                  ]
                                },
                                "party_label": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 80
                                },
                                "expected_by": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "format": "date-time"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "since": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "format": "date-time"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "party",
                                "party_label",
                                "expected_by",
                                "since"
                              ]
                            }
                          },
                          "required": [
                            "state",
                            "waiting"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "state": {
                              "type": "string",
                              "enum": [
                                "done"
                              ]
                            },
                            "completed_at": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "receipt": {
                              "oneOf": [
                                {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "schema_version": {
                                          "type": "number",
                                          "enum": [
                                            1
                                          ]
                                        },
                                        "receipt_id": {
                                          "type": "string",
                                          "format": "uuid"
                                        },
                                        "entity": {
                                          "type": "object",
                                          "properties": {
                                            "entity_type": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 120
                                            },
                                            "entity_id": {
                                              "type": "string",
                                              "format": "uuid"
                                            },
                                            "entity_version": {
                                              "oneOf": [
                                                {
                                                  "type": "integer",
                                                  "minimum": 0
                                                },
                                                {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 200
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "entity_type",
                                            "entity_id",
                                            "entity_version"
                                          ]
                                        },
                                        "scope": {
                                          "oneOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "schema_version": {
                                                  "type": "number",
                                                  "enum": [
                                                    1
                                                  ]
                                                },
                                                "kind": {
                                                  "type": "string",
                                                  "enum": [
                                                    "tenant"
                                                  ]
                                                },
                                                "tenant_id": {
                                                  "type": "string",
                                                  "format": "uuid"
                                                },
                                                "league_id": {
                                                  "type": "null"
                                                },
                                                "match_id": {
                                                  "type": "null"
                                                }
                                              },
                                              "required": [
                                                "schema_version",
                                                "kind",
                                                "tenant_id",
                                                "league_id",
                                                "match_id"
                                              ]
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "schema_version": {
                                                  "type": "number",
                                                  "enum": [
                                                    1
                                                  ]
                                                },
                                                "kind": {
                                                  "type": "string",
                                                  "enum": [
                                                    "league"
                                                  ]
                                                },
                                                "tenant_id": {
                                                  "type": "string",
                                                  "format": "uuid"
                                                },
                                                "league_id": {
                                                  "type": "string",
                                                  "format": "uuid"
                                                },
                                                "match_id": {
                                                  "type": "null"
                                                }
                                              },
                                              "required": [
                                                "schema_version",
                                                "kind",
                                                "tenant_id",
                                                "league_id",
                                                "match_id"
                                              ]
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "schema_version": {
                                                  "type": "number",
                                                  "enum": [
                                                    1
                                                  ]
                                                },
                                                "kind": {
                                                  "type": "string",
                                                  "enum": [
                                                    "match"
                                                  ]
                                                },
                                                "tenant_id": {
                                                  "type": "string",
                                                  "format": "uuid"
                                                },
                                                "league_id": {
                                                  "type": "string",
                                                  "format": "uuid"
                                                },
                                                "match_id": {
                                                  "type": "string",
                                                  "format": "uuid"
                                                }
                                              },
                                              "required": [
                                                "schema_version",
                                                "kind",
                                                "tenant_id",
                                                "league_id",
                                                "match_id"
                                              ]
                                            }
                                          ]
                                        },
                                        "actor_user_id": {
                                          "type": "string",
                                          "format": "uuid"
                                        },
                                        "consumers": {
                                          "type": "array",
                                          "items": {
                                            "oneOf": [
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "consumer": {
                                                    "type": "string",
                                                    "minLength": 1,
                                                    "maxLength": 120
                                                  },
                                                  "state": {
                                                    "type": "string",
                                                    "enum": [
                                                      "pending"
                                                    ]
                                                  },
                                                  "propagated_at": {
                                                    "type": "null"
                                                  },
                                                  "reason": {
                                                    "type": "null"
                                                  }
                                                },
                                                "required": [
                                                  "consumer",
                                                  "state",
                                                  "propagated_at",
                                                  "reason"
                                                ]
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "consumer": {
                                                    "type": "string",
                                                    "minLength": 1,
                                                    "maxLength": 120
                                                  },
                                                  "state": {
                                                    "type": "string",
                                                    "enum": [
                                                      "applied"
                                                    ]
                                                  },
                                                  "propagated_at": {
                                                    "type": "string",
                                                    "format": "date-time"
                                                  },
                                                  "reason": {
                                                    "type": "null"
                                                  }
                                                },
                                                "required": [
                                                  "consumer",
                                                  "state",
                                                  "propagated_at",
                                                  "reason"
                                                ]
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "consumer": {
                                                    "type": "string",
                                                    "minLength": 1,
                                                    "maxLength": 120
                                                  },
                                                  "state": {
                                                    "type": "string",
                                                    "enum": [
                                                      "failed"
                                                    ]
                                                  },
                                                  "propagated_at": {
                                                    "type": "string",
                                                    "format": "date-time"
                                                  },
                                                  "reason": {
                                                    "type": "object",
                                                    "properties": {
                                                      "code": {
                                                        "type": "string",
                                                        "minLength": 1,
                                                        "maxLength": 120
                                                      },
                                                      "message": {
                                                        "type": "string",
                                                        "minLength": 1,
                                                        "maxLength": 1000
                                                      },
                                                      "retryable": {
                                                        "type": "boolean"
                                                      },
                                                      "recovery_action": {
                                                        "oneOf": [
                                                          {
                                                            "type": "string",
                                                            "minLength": 1,
                                                            "maxLength": 500
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    "required": [
                                                      "code",
                                                      "message",
                                                      "retryable",
                                                      "recovery_action"
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "consumer",
                                                  "state",
                                                  "propagated_at",
                                                  "reason"
                                                ]
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "consumer": {
                                                    "type": "string",
                                                    "minLength": 1,
                                                    "maxLength": 120
                                                  },
                                                  "state": {
                                                    "type": "string",
                                                    "enum": [
                                                      "not_applicable"
                                                    ]
                                                  },
                                                  "propagated_at": {
                                                    "type": "string",
                                                    "format": "date-time"
                                                  },
                                                  "reason": {
                                                    "type": "object",
                                                    "properties": {
                                                      "code": {
                                                        "type": "string",
                                                        "minLength": 1,
                                                        "maxLength": 120
                                                      },
                                                      "message": {
                                                        "type": "string",
                                                        "minLength": 1,
                                                        "maxLength": 1000
                                                      },
                                                      "retryable": {
                                                        "type": "boolean"
                                                      },
                                                      "recovery_action": {
                                                        "oneOf": [
                                                          {
                                                            "type": "string",
                                                            "minLength": 1,
                                                            "maxLength": 500
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    "required": [
                                                      "code",
                                                      "message",
                                                      "retryable",
                                                      "recovery_action"
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "consumer",
                                                  "state",
                                                  "propagated_at",
                                                  "reason"
                                                ]
                                              }
                                            ]
                                          }
                                        },
                                        "server_timestamp": {
                                          "type": "string",
                                          "format": "date-time"
                                        },
                                        "correlation_id": {
                                          "type": "string",
                                          "minLength": 8,
                                          "maxLength": 200
                                        },
                                        "status": {
                                          "type": "string",
                                          "enum": [
                                            "queued"
                                          ]
                                        },
                                        "reason": {
                                          "oneOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "code": {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 120
                                                },
                                                "message": {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 1000
                                                },
                                                "retryable": {
                                                  "type": "boolean"
                                                },
                                                "recovery_action": {
                                                  "oneOf": [
                                                    {
                                                      "type": "string",
                                                      "minLength": 1,
                                                      "maxLength": 500
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "code",
                                                "message",
                                                "retryable",
                                                "recovery_action"
                                              ]
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      },
                                      "required": [
                                        "schema_version",
                                        "receipt_id",
                                        "entity",
                                        "scope",
                                        "actor_user_id",
                                        "consumers",
                                        "server_timestamp",
                                        "correlation_id",
                                        "status",
                                        "reason"
                                      ]
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "schema_version": {
                                          "type": "number",
                                          "enum": [
                                            1
                                          ]
                                        },
                                        "receipt_id": {
                                          "type": "string",
                                          "format": "uuid"
                                        },
                                        "entity": {
                                          "type": "object",
                                          "properties": {
                                            "entity_type": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 120
                                            },
                                            "entity_id": {
                                              "type": "string",
                                              "format": "uuid"
                                            },
                                            "entity_version": {
                                              "oneOf": [
                                                {
                                                  "type": "integer",
                                                  "minimum": 0
                                                },
                                                {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 200
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "entity_type",
                                            "entity_id",
                                            "entity_version"
                                          ]
                                        },
                                        "scope": {
                                          "oneOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "schema_version": {
                                                  "type": "number",
                                                  "enum": [
                                                    1
                                                  ]
                                                },
                                                "kind": {
                                                  "type": "string",
                                                  "enum": [
                                                    "tenant"
                                                  ]
                                                },
                                                "tenant_id": {
                                                  "type": "string",
                                                  "format": "uuid"
                                                },
                                                "league_id": {
                                                  "type": "null"
                                                },
                                                "match_id": {
                                                  "type": "null"
                                                }
                                              },
                                              "required": [
                                                "schema_version",
                                                "kind",
                                                "tenant_id",
                                                "league_id",
                                                "match_id"
                                              ]
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "schema_version": {
                                                  "type": "number",
                                                  "enum": [
                                                    1
                                                  ]
                                                },
                                                "kind": {
                                                  "type": "string",
                                                  "enum": [
                                                    "league"
                                                  ]
                                                },
                                                "tenant_id": {
                                                  "type": "string",
                                                  "format": "uuid"
                                                },
                                                "league_id": {
                                                  "type": "string",
                                                  "format": "uuid"
                                                },
                                                "match_id": {
                                                  "type": "null"
                                                }
                                              },
                                              "required": [
                                                "schema_version",
                                                "kind",
                                                "tenant_id",
                                                "league_id",
                                                "match_id"
                                              ]
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "schema_version": {
                                                  "type": "number",
                                                  "enum": [
                                                    1
                                                  ]
                                                },
                                                "kind": {
                                                  "type": "string",
                                                  "enum": [
                                                    "match"
                                                  ]
                                                },
                                                "tenant_id": {
                                                  "type": "string",
                                                  "format": "uuid"
                                                },
                                                "league_id": {
                                                  "type": "string",
                                                  "format": "uuid"
                                                },
                                                "match_id": {
                                                  "type": "string",
                                                  "format": "uuid"
                                                }
                                              },
                                              "required": [
                                                "schema_version",
                                                "kind",
                                                "tenant_id",
                                                "league_id",
                                                "match_id"
                                              ]
                                            }
                                          ]
                                        },
                                        "actor_user_id": {
                                          "type": "string",
                                          "format": "uuid"
                                        },
                                        "consumers": {
                                          "type": "array",
                                          "items": {
                                            "oneOf": [
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "consumer": {
                                                    "type": "string",
                                                    "minLength": 1,
                                                    "maxLength": 120
                                                  },
                                                  "state": {
                                                    "type": "string",
                                                    "enum": [
                                                      "pending"
                                                    ]
                                                  },
                                                  "propagated_at": {
                                                    "type": "null"
                                                  },
                                                  "reason": {
                                                    "type": "null"
                                                  }
                                                },
                                                "required": [
                                                  "consumer",
                                                  "state",
                                                  "propagated_at",
                                                  "reason"
                                                ]
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "consumer": {
                                                    "type": "string",
                                                    "minLength": 1,
                                                    "maxLength": 120
                                                  },
                                                  "state": {
                                                    "type": "string",
                                                    "enum": [
                                                      "applied"
                                                    ]
                                                  },
                                                  "propagated_at": {
                                                    "type": "string",
                                                    "format": "date-time"
                                                  },
                                                  "reason": {
                                                    "type": "null"
                                                  }
                                                },
                                                "required": [
                                                  "consumer",
                                                  "state",
                                                  "propagated_at",
                                                  "reason"
                                                ]
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "consumer": {
                                                    "type": "string",
                                                    "minLength": 1,
                                                    "maxLength": 120
                                                  },
                                                  "state": {
                                                    "type": "string",
                                                    "enum": [
                                                      "failed"
                                                    ]
                                                  },
                                                  "propagated_at": {
                                                    "type": "string",
                                                    "format": "date-time"
                                                  },
                                                  "reason": {
                                                    "type": "object",
                                                    "properties": {
                                                      "code": {
                                                        "type": "string",
                                                        "minLength": 1,
                                                        "maxLength": 120
                                                      },
                                                      "message": {
                                                        "type": "string",
                                                        "minLength": 1,
                                                        "maxLength": 1000
                                                      },
                                                      "retryable": {
                                                        "type": "boolean"
                                                      },
                                                      "recovery_action": {
                                                        "oneOf": [
                                                          {
                                                            "type": "string",
                                                            "minLength": 1,
                                                            "maxLength": 500
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    "required": [
                                                      "code",
                                                      "message",
                                                      "retryable",
                                                      "recovery_action"
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "consumer",
                                                  "state",
                                                  "propagated_at",
                                                  "reason"
                                                ]
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "consumer": {
                                                    "type": "string",
                                                    "minLength": 1,
                                                    "maxLength": 120
                                                  },
                                                  "state": {
                                                    "type": "string",
                                                    "enum": [
                                                      "not_applicable"
                                                    ]
                                                  },
                                                  "propagated_at": {
                                                    "type": "string",
                                                    "format": "date-time"
                                                  },
                                                  "reason": {
                                                    "type": "object",
                                                    "properties": {
                                                      "code": {
                                                        "type": "string",
                                                        "minLength": 1,
                                                        "maxLength": 120
                                                      },
                                                      "message": {
                                                        "type": "string",
                                                        "minLength": 1,
                                                        "maxLength": 1000
                                                      },
                                                      "retryable": {
                                                        "type": "boolean"
                                                      },
                                                      "recovery_action": {
                                                        "oneOf": [
                                                          {
                                                            "type": "string",
                                                            "minLength": 1,
                                                            "maxLength": 500
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    "required": [
                                                      "code",
                                                      "message",
                                                      "retryable",
                                                      "recovery_action"
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "consumer",
                                                  "state",
                                                  "propagated_at",
                                                  "reason"
                                                ]
                                              }
                                            ]
                                          }
                                        },
                                        "server_timestamp": {
                                          "type": "string",
                                          "format": "date-time"
                                        },
                                        "correlation_id": {
                                          "type": "string",
                                          "minLength": 8,
                                          "maxLength": 200
                                        },
                                        "status": {
                                          "type": "string",
                                          "enum": [
                                            "accepted"
                                          ]
                                        },
                                        "reason": {
                                          "oneOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "code": {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 120
                                                },
                                                "message": {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 1000
                                                },
                                                "retryable": {
                                                  "type": "boolean"
                                                },
                                                "recovery_action": {
                                                  "oneOf": [
                                                    {
                                                      "type": "string",
                                                      "minLength": 1,
                                                      "maxLength": 500
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "code",
                                                "message",
                                                "retryable",
                                                "recovery_action"
                                              ]
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      },
                                      "required": [
                                        "schema_version",
                                        "receipt_id",
                                        "entity",
                                        "scope",
                                        "actor_user_id",
                                        "consumers",
                                        "server_timestamp",
                                        "correlation_id",
                                        "status",
                                        "reason"
                                      ]
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "schema_version": {
                                          "type": "number",
                                          "enum": [
                                            1
                                          ]
                                        },
                                        "receipt_id": {
                                          "type": "string",
                                          "format": "uuid"
                                        },
                                        "entity": {
                                          "type": "object",
                                          "properties": {
                                            "entity_type": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 120
                                            },
                                            "entity_id": {
                                              "type": "string",
                                              "format": "uuid"
                                            },
                                            "entity_version": {
                                              "oneOf": [
                                                {
                                                  "type": "integer",
                                                  "minimum": 0
                                                },
                                                {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 200
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "entity_type",
                                            "entity_id",
                                            "entity_version"
                                          ]
                                        },
                                        "scope": {
                                          "oneOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "schema_version": {
                                                  "type": "number",
                                                  "enum": [
                                                    1
                                                  ]
                                                },
                                                "kind": {
                                                  "type": "string",
                                                  "enum": [
                                                    "tenant"
                                                  ]
                                                },
                                                "tenant_id": {
                                                  "type": "string",
                                                  "format": "uuid"
                                                },
                                                "league_id": {
                                                  "type": "null"
                                                },
                                                "match_id": {
                                                  "type": "null"
                                                }
                                              },
                                              "required": [
                                                "schema_version",
                                                "kind",
                                                "tenant_id",
                                                "league_id",
                                                "match_id"
                                              ]
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "schema_version": {
                                                  "type": "number",
                                                  "enum": [
                                                    1
                                                  ]
                                                },
                                                "kind": {
                                                  "type": "string",
                                                  "enum": [
                                                    "league"
                                                  ]
                                                },
                                                "tenant_id": {
                                                  "type": "string",
                                                  "format": "uuid"
                                                },
                                                "league_id": {
                                                  "type": "string",
                                                  "format": "uuid"
                                                },
                                                "match_id": {
                                                  "type": "null"
                                                }
                                              },
                                              "required": [
                                                "schema_version",
                                                "kind",
                                                "tenant_id",
                                                "league_id",
                                                "match_id"
                                              ]
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "schema_version": {
                                                  "type": "number",
                                                  "enum": [
                                                    1
                                                  ]
                                                },
                                                "kind": {
                                                  "type": "string",
                                                  "enum": [
                                                    "match"
                                                  ]
                                                },
                                                "tenant_id": {
                                                  "type": "string",
                                                  "format": "uuid"
                                                },
                                                "league_id": {
                                                  "type": "string",
                                                  "format": "uuid"
                                                },
                                                "match_id": {
                                                  "type": "string",
                                                  "format": "uuid"
                                                }
                                              },
                                              "required": [
                                                "schema_version",
                                                "kind",
                                                "tenant_id",
                                                "league_id",
                                                "match_id"
                                              ]
                                            }
                                          ]
                                        },
                                        "actor_user_id": {
                                          "type": "string",
                                          "format": "uuid"
                                        },
                                        "consumers": {
                                          "type": "array",
                                          "items": {
                                            "oneOf": [
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "consumer": {
                                                    "type": "string",
                                                    "minLength": 1,
                                                    "maxLength": 120
                                                  },
                                                  "state": {
                                                    "type": "string",
                                                    "enum": [
                                                      "pending"
                                                    ]
                                                  },
                                                  "propagated_at": {
                                                    "type": "null"
                                                  },
                                                  "reason": {
                                                    "type": "null"
                                                  }
                                                },
                                                "required": [
                                                  "consumer",
                                                  "state",
                                                  "propagated_at",
                                                  "reason"
                                                ]
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "consumer": {
                                                    "type": "string",
                                                    "minLength": 1,
                                                    "maxLength": 120
                                                  },
                                                  "state": {
                                                    "type": "string",
                                                    "enum": [
                                                      "applied"
                                                    ]
                                                  },
                                                  "propagated_at": {
                                                    "type": "string",
                                                    "format": "date-time"
                                                  },
                                                  "reason": {
                                                    "type": "null"
                                                  }
                                                },
                                                "required": [
                                                  "consumer",
                                                  "state",
                                                  "propagated_at",
                                                  "reason"
                                                ]
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "consumer": {
                                                    "type": "string",
                                                    "minLength": 1,
                                                    "maxLength": 120
                                                  },
                                                  "state": {
                                                    "type": "string",
                                                    "enum": [
                                                      "failed"
                                                    ]
                                                  },
                                                  "propagated_at": {
                                                    "type": "string",
                                                    "format": "date-time"
                                                  },
                                                  "reason": {
                                                    "type": "object",
                                                    "properties": {
                                                      "code": {
                                                        "type": "string",
                                                        "minLength": 1,
                                                        "maxLength": 120
                                                      },
                                                      "message": {
                                                        "type": "string",
                                                        "minLength": 1,
                                                        "maxLength": 1000
                                                      },
                                                      "retryable": {
                                                        "type": "boolean"
                                                      },
                                                      "recovery_action": {
                                                        "oneOf": [
                                                          {
                                                            "type": "string",
                                                            "minLength": 1,
                                                            "maxLength": 500
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    "required": [
                                                      "code",
                                                      "message",
                                                      "retryable",
                                                      "recovery_action"
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "consumer",
                                                  "state",
                                                  "propagated_at",
                                                  "reason"
                                                ]
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "consumer": {
                                                    "type": "string",
                                                    "minLength": 1,
                                                    "maxLength": 120
                                                  },
                                                  "state": {
                                                    "type": "string",
                                                    "enum": [
                                                      "not_applicable"
                                                    ]
                                                  },
                                                  "propagated_at": {
                                                    "type": "string",
                                                    "format": "date-time"
                                                  },
                                                  "reason": {
                                                    "type": "object",
                                                    "properties": {
                                                      "code": {
                                                        "type": "string",
                                                        "minLength": 1,
                                                        "maxLength": 120
                                                      },
                                                      "message": {
                                                        "type": "string",
                                                        "minLength": 1,
                                                        "maxLength": 1000
                                                      },
                                                      "retryable": {
                                                        "type": "boolean"
                                                      },
                                                      "recovery_action": {
                                                        "oneOf": [
                                                          {
                                                            "type": "string",
                                                            "minLength": 1,
                                                            "maxLength": 500
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    "required": [
                                                      "code",
                                                      "message",
                                                      "retryable",
                                                      "recovery_action"
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "consumer",
                                                  "state",
                                                  "propagated_at",
                                                  "reason"
                                                ]
                                              }
                                            ]
                                          }
                                        },
                                        "server_timestamp": {
                                          "type": "string",
                                          "format": "date-time"
                                        },
                                        "correlation_id": {
                                          "type": "string",
                                          "minLength": 8,
                                          "maxLength": 200
                                        },
                                        "status": {
                                          "type": "string",
                                          "enum": [
                                            "rejected"
                                          ]
                                        },
                                        "reason": {
                                          "type": "object",
                                          "properties": {
                                            "code": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 120
                                            },
                                            "message": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 1000
                                            },
                                            "retryable": {
                                              "type": "boolean"
                                            },
                                            "recovery_action": {
                                              "oneOf": [
                                                {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 500
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "code",
                                            "message",
                                            "retryable",
                                            "recovery_action"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "schema_version",
                                        "receipt_id",
                                        "entity",
                                        "scope",
                                        "actor_user_id",
                                        "consumers",
                                        "server_timestamp",
                                        "correlation_id",
                                        "status",
                                        "reason"
                                      ]
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "schema_version": {
                                          "type": "number",
                                          "enum": [
                                            1
                                          ]
                                        },
                                        "receipt_id": {
                                          "type": "string",
                                          "format": "uuid"
                                        },
                                        "entity": {
                                          "type": "object",
                                          "properties": {
                                            "entity_type": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 120
                                            },
                                            "entity_id": {
                                              "type": "string",
                                              "format": "uuid"
                                            },
                                            "entity_version": {
                                              "oneOf": [
                                                {
                                                  "type": "integer",
                                                  "minimum": 0
                                                },
                                                {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 200
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "entity_type",
                                            "entity_id",
                                            "entity_version"
                                          ]
                                        },
                                        "scope": {
                                          "oneOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "schema_version": {
                                                  "type": "number",
                                                  "enum": [
                                                    1
                                                  ]
                                                },
                                                "kind": {
                                                  "type": "string",
                                                  "enum": [
                                                    "tenant"
                                                  ]
                                                },
                                                "tenant_id": {
                                                  "type": "string",
                                                  "format": "uuid"
                                                },
                                                "league_id": {
                                                  "type": "null"
                                                },
                                                "match_id": {
                                                  "type": "null"
                                                }
                                              },
                                              "required": [
                                                "schema_version",
                                                "kind",
                                                "tenant_id",
                                                "league_id",
                                                "match_id"
                                              ]
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "schema_version": {
                                                  "type": "number",
                                                  "enum": [
                                                    1
                                                  ]
                                                },
                                                "kind": {
                                                  "type": "string",
                                                  "enum": [
                                                    "league"
                                                  ]
                                                },
                                                "tenant_id": {
                                                  "type": "string",
                                                  "format": "uuid"
                                                },
                                                "league_id": {
                                                  "type": "string",
                                                  "format": "uuid"
                                                },
                                                "match_id": {
                                                  "type": "null"
                                                }
                                              },
                                              "required": [
                                                "schema_version",
                                                "kind",
                                                "tenant_id",
                                                "league_id",
                                                "match_id"
                                              ]
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "schema_version": {
                                                  "type": "number",
                                                  "enum": [
                                                    1
                                                  ]
                                                },
                                                "kind": {
                                                  "type": "string",
                                                  "enum": [
                                                    "match"
                                                  ]
                                                },
                                                "tenant_id": {
                                                  "type": "string",
                                                  "format": "uuid"
                                                },
                                                "league_id": {
                                                  "type": "string",
                                                  "format": "uuid"
                                                },
                                                "match_id": {
                                                  "type": "string",
                                                  "format": "uuid"
                                                }
                                              },
                                              "required": [
                                                "schema_version",
                                                "kind",
                                                "tenant_id",
                                                "league_id",
                                                "match_id"
                                              ]
                                            }
                                          ]
                                        },
                                        "actor_user_id": {
                                          "type": "string",
                                          "format": "uuid"
                                        },
                                        "consumers": {
                                          "type": "array",
                                          "items": {
                                            "oneOf": [
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "consumer": {
                                                    "type": "string",
                                                    "minLength": 1,
                                                    "maxLength": 120
                                                  },
                                                  "state": {
                                                    "type": "string",
                                                    "enum": [
                                                      "pending"
                                                    ]
                                                  },
                                                  "propagated_at": {
                                                    "type": "null"
                                                  },
                                                  "reason": {
                                                    "type": "null"
                                                  }
                                                },
                                                "required": [
                                                  "consumer",
                                                  "state",
                                                  "propagated_at",
                                                  "reason"
                                                ]
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "consumer": {
                                                    "type": "string",
                                                    "minLength": 1,
                                                    "maxLength": 120
                                                  },
                                                  "state": {
                                                    "type": "string",
                                                    "enum": [
                                                      "applied"
                                                    ]
                                                  },
                                                  "propagated_at": {
                                                    "type": "string",
                                                    "format": "date-time"
                                                  },
                                                  "reason": {
                                                    "type": "null"
                                                  }
                                                },
                                                "required": [
                                                  "consumer",
                                                  "state",
                                                  "propagated_at",
                                                  "reason"
                                                ]
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "consumer": {
                                                    "type": "string",
                                                    "minLength": 1,
                                                    "maxLength": 120
                                                  },
                                                  "state": {
                                                    "type": "string",
                                                    "enum": [
                                                      "failed"
                                                    ]
                                                  },
                                                  "propagated_at": {
                                                    "type": "string",
                                                    "format": "date-time"
                                                  },
                                                  "reason": {
                                                    "type": "object",
                                                    "properties": {
                                                      "code": {
                                                        "type": "string",
                                                        "minLength": 1,
                                                        "maxLength": 120
                                                      },
                                                      "message": {
                                                        "type": "string",
                                                        "minLength": 1,
                                                        "maxLength": 1000
                                                      },
                                                      "retryable": {
                                                        "type": "boolean"
                                                      },
                                                      "recovery_action": {
                                                        "oneOf": [
                                                          {
                                                            "type": "string",
                                                            "minLength": 1,
                                                            "maxLength": 500
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    "required": [
                                                      "code",
                                                      "message",
                                                      "retryable",
                                                      "recovery_action"
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "consumer",
                                                  "state",
                                                  "propagated_at",
                                                  "reason"
                                                ]
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "consumer": {
                                                    "type": "string",
                                                    "minLength": 1,
                                                    "maxLength": 120
                                                  },
                                                  "state": {
                                                    "type": "string",
                                                    "enum": [
                                                      "not_applicable"
                                                    ]
                                                  },
                                                  "propagated_at": {
                                                    "type": "string",
                                                    "format": "date-time"
                                                  },
                                                  "reason": {
                                                    "type": "object",
                                                    "properties": {
                                                      "code": {
                                                        "type": "string",
                                                        "minLength": 1,
                                                        "maxLength": 120
                                                      },
                                                      "message": {
                                                        "type": "string",
                                                        "minLength": 1,
                                                        "maxLength": 1000
                                                      },
                                                      "retryable": {
                                                        "type": "boolean"
                                                      },
                                                      "recovery_action": {
                                                        "oneOf": [
                                                          {
                                                            "type": "string",
                                                            "minLength": 1,
                                                            "maxLength": 500
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    "required": [
                                                      "code",
                                                      "message",
                                                      "retryable",
                                                      "recovery_action"
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "consumer",
                                                  "state",
                                                  "propagated_at",
                                                  "reason"
                                                ]
                                              }
                                            ]
                                          }
                                        },
                                        "server_timestamp": {
                                          "type": "string",
                                          "format": "date-time"
                                        },
                                        "correlation_id": {
                                          "type": "string",
                                          "minLength": 8,
                                          "maxLength": 200
                                        },
                                        "status": {
                                          "type": "string",
                                          "enum": [
                                            "superseded"
                                          ]
                                        },
                                        "reason": {
                                          "type": "object",
                                          "properties": {
                                            "code": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 120
                                            },
                                            "message": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 1000
                                            },
                                            "retryable": {
                                              "type": "boolean"
                                            },
                                            "recovery_action": {
                                              "oneOf": [
                                                {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 500
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "code",
                                            "message",
                                            "retryable",
                                            "recovery_action"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "schema_version",
                                        "receipt_id",
                                        "entity",
                                        "scope",
                                        "actor_user_id",
                                        "consumers",
                                        "server_timestamp",
                                        "correlation_id",
                                        "status",
                                        "reason"
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "state",
                            "completed_at",
                            "receipt"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "state": {
                              "type": "string",
                              "enum": [
                                "blocked"
                              ]
                            },
                            "reason": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "message": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1000
                                },
                                "retryable": {
                                  "type": "boolean"
                                },
                                "recovery_action": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 500
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "code",
                                "message",
                                "retryable",
                                "recovery_action"
                              ]
                            },
                            "owner_gate": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "pattern": "^(OG-\\d{2}|OWNER-[A-Z]{2,6}-\\d{2})$"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "blocks_on": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "pattern": "^[a-z_]+(\\.[a-z_]+){2}$"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "state",
                            "reason",
                            "owner_gate",
                            "blocks_on"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "state": {
                              "type": "string",
                              "enum": [
                                "not_applicable"
                              ]
                            },
                            "reason": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "message": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1000
                                },
                                "retryable": {
                                  "type": "boolean"
                                },
                                "recovery_action": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 500
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "code",
                                "message",
                                "retryable",
                                "recovery_action"
                              ]
                            }
                          },
                          "required": [
                            "state",
                            "reason"
                          ]
                        }
                      ]
                    },
                    "priority_band": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 60
                    },
                    "copy": {
                      "type": "object",
                      "properties": {
                        "overline": {
                          "oneOf": [
                            {
                              "type": "string",
                              "maxLength": 40
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "title": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80
                        },
                        "body": {
                          "oneOf": [
                            {
                              "type": "string",
                              "maxLength": 240
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "cta": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 40
                        },
                        "secondary_cta": {
                          "oneOf": [
                            {
                              "type": "string",
                              "maxLength": 40
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "footnote": {
                          "oneOf": [
                            {
                              "type": "string",
                              "maxLength": 160
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "technical_details": {
                          "oneOf": [
                            {
                              "type": "string",
                              "maxLength": 400
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "overline",
                        "title",
                        "body",
                        "cta",
                        "secondary_cta",
                        "footnote",
                        "technical_details"
                      ]
                    },
                    "deadline": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "deadline_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "server_time": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "timezone": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 60
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "open",
                                "due_soon",
                                "expired"
                              ]
                            },
                            "source": {
                              "type": "string",
                              "enum": [
                                "competition_ruleset",
                                "league_publication",
                                "match_schedule",
                                "assignment_policy",
                                "fantasy_round",
                                "fantasy_trade_offer",
                                "platform_default"
                              ]
                            },
                            "ruleset_revision_id": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "deadline_at",
                            "server_time",
                            "timezone",
                            "state",
                            "source",
                            "ruleset_revision_id"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "progress": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "shape": {
                              "type": "string",
                              "enum": [
                                "none"
                              ]
                            }
                          },
                          "required": [
                            "shape"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "shape": {
                              "type": "string",
                              "enum": [
                                "count"
                              ]
                            },
                            "value": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "label": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 80
                            }
                          },
                          "required": [
                            "shape",
                            "value",
                            "label"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "shape": {
                              "type": "string",
                              "enum": [
                                "n_of_m"
                              ]
                            },
                            "done": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "total": {
                              "type": "integer",
                              "exclusiveMinimum": 0
                            },
                            "label": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 80
                            }
                          },
                          "required": [
                            "shape",
                            "done",
                            "total",
                            "label"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "shape": {
                              "type": "string",
                              "enum": [
                                "stage"
                              ]
                            },
                            "stages": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 40
                              },
                              "minItems": 2
                            },
                            "current_index": {
                              "type": "integer",
                              "minimum": 0
                            }
                          },
                          "required": [
                            "shape",
                            "stages",
                            "current_index"
                          ]
                        }
                      ]
                    },
                    "link": {
                      "type": "object",
                      "properties": {
                        "target_kind": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80
                        },
                        "href": {
                          "type": "string",
                          "maxLength": 300
                        },
                        "params": {
                          "type": "object",
                          "additionalProperties": true,
                          "default": {}
                        }
                      },
                      "required": [
                        "target_kind",
                        "href"
                      ]
                    },
                    "optional": {
                      "type": "boolean",
                      "default": false
                    },
                    "source": {
                      "type": "string",
                      "enum": [
                        "server",
                        "device"
                      ],
                      "default": "server"
                    },
                    "authority": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "schema_version": {
                              "type": "number",
                              "enum": [
                                1
                              ]
                            },
                            "capability": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 160
                            },
                            "scope": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "schema_version": {
                                      "type": "number",
                                      "enum": [
                                        1
                                      ]
                                    },
                                    "kind": {
                                      "type": "string",
                                      "enum": [
                                        "tenant"
                                      ]
                                    },
                                    "tenant_id": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "league_id": {
                                      "type": "null"
                                    },
                                    "match_id": {
                                      "type": "null"
                                    }
                                  },
                                  "required": [
                                    "schema_version",
                                    "kind",
                                    "tenant_id",
                                    "league_id",
                                    "match_id"
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "schema_version": {
                                      "type": "number",
                                      "enum": [
                                        1
                                      ]
                                    },
                                    "kind": {
                                      "type": "string",
                                      "enum": [
                                        "league"
                                      ]
                                    },
                                    "tenant_id": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "league_id": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "match_id": {
                                      "type": "null"
                                    }
                                  },
                                  "required": [
                                    "schema_version",
                                    "kind",
                                    "tenant_id",
                                    "league_id",
                                    "match_id"
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "schema_version": {
                                      "type": "number",
                                      "enum": [
                                        1
                                      ]
                                    },
                                    "kind": {
                                      "type": "string",
                                      "enum": [
                                        "match"
                                      ]
                                    },
                                    "tenant_id": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "league_id": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "match_id": {
                                      "type": "string",
                                      "format": "uuid"
                                    }
                                  },
                                  "required": [
                                    "schema_version",
                                    "kind",
                                    "tenant_id",
                                    "league_id",
                                    "match_id"
                                  ]
                                }
                              ]
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "enabled"
                              ]
                            },
                            "authority": {
                              "type": "string",
                              "enum": [
                                "server"
                              ]
                            },
                            "configuration_revision_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "enabled_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "expires_at": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "reason": {
                              "type": "null"
                            }
                          },
                          "required": [
                            "schema_version",
                            "capability",
                            "scope",
                            "state",
                            "authority",
                            "configuration_revision_id",
                            "enabled_at",
                            "expires_at",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "schema_version": {
                              "type": "number",
                              "enum": [
                                1
                              ]
                            },
                            "capability": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 160
                            },
                            "scope": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "schema_version": {
                                      "type": "number",
                                      "enum": [
                                        1
                                      ]
                                    },
                                    "kind": {
                                      "type": "string",
                                      "enum": [
                                        "tenant"
                                      ]
                                    },
                                    "tenant_id": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "league_id": {
                                      "type": "null"
                                    },
                                    "match_id": {
                                      "type": "null"
                                    }
                                  },
                                  "required": [
                                    "schema_version",
                                    "kind",
                                    "tenant_id",
                                    "league_id",
                                    "match_id"
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "schema_version": {
                                      "type": "number",
                                      "enum": [
                                        1
                                      ]
                                    },
                                    "kind": {
                                      "type": "string",
                                      "enum": [
                                        "league"
                                      ]
                                    },
                                    "tenant_id": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "league_id": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "match_id": {
                                      "type": "null"
                                    }
                                  },
                                  "required": [
                                    "schema_version",
                                    "kind",
                                    "tenant_id",
                                    "league_id",
                                    "match_id"
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "schema_version": {
                                      "type": "number",
                                      "enum": [
                                        1
                                      ]
                                    },
                                    "kind": {
                                      "type": "string",
                                      "enum": [
                                        "match"
                                      ]
                                    },
                                    "tenant_id": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "league_id": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "match_id": {
                                      "type": "string",
                                      "format": "uuid"
                                    }
                                  },
                                  "required": [
                                    "schema_version",
                                    "kind",
                                    "tenant_id",
                                    "league_id",
                                    "match_id"
                                  ]
                                }
                              ]
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "disabled"
                              ]
                            },
                            "authority": {
                              "type": "string",
                              "enum": [
                                "server"
                              ]
                            },
                            "configuration_revision_id": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "enabled_at": {
                              "type": "null"
                            },
                            "expires_at": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "reason": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "message": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1000
                                },
                                "retryable": {
                                  "type": "boolean"
                                },
                                "recovery_action": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 500
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "code",
                                "message",
                                "retryable",
                                "recovery_action"
                              ]
                            }
                          },
                          "required": [
                            "schema_version",
                            "capability",
                            "scope",
                            "state",
                            "authority",
                            "configuration_revision_id",
                            "enabled_at",
                            "expires_at",
                            "reason"
                          ]
                        }
                      ]
                    }
                  },
                  "required": [
                    "schema_version",
                    "id",
                    "role",
                    "role_label",
                    "object",
                    "lifecycle",
                    "status",
                    "priority_band",
                    "copy",
                    "deadline",
                    "progress",
                    "link"
                  ]
                }
              },
              "summary": {
                "type": "object",
                "properties": {
                  "todo": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "waiting": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "blocked": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "done_recent": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "owner_gates": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "owner_gate": {
                          "type": "string",
                          "pattern": "^(OG-\\d{2}|OWNER-[A-Z]{2,6}-\\d{2})$"
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 240
                        },
                        "blocked_count": {
                          "type": "integer",
                          "exclusiveMinimum": 0
                        },
                        "action_ids": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "pattern": "^[a-z_]+(\\.[a-z_]+){2}$"
                          },
                          "minItems": 1
                        }
                      },
                      "required": [
                        "owner_gate",
                        "message",
                        "blocked_count",
                        "action_ids"
                      ]
                    },
                    "default": []
                  }
                },
                "required": [
                  "todo",
                  "waiting",
                  "blocked",
                  "done_recent"
                ]
              },
              "freshness": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "schema_version": {
                        "type": "number",
                        "enum": [
                          1
                        ]
                      },
                      "state": {
                        "type": "string",
                        "enum": [
                          "fresh"
                        ]
                      },
                      "source_revision": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 200
                      },
                      "generated_at": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "stale_at": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "expires_at": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "invalidation_cursor": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 300
                      },
                      "reason": {
                        "type": "null"
                      }
                    },
                    "required": [
                      "schema_version",
                      "state",
                      "source_revision",
                      "generated_at",
                      "stale_at",
                      "expires_at",
                      "invalidation_cursor",
                      "reason"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "schema_version": {
                        "type": "number",
                        "enum": [
                          1
                        ]
                      },
                      "state": {
                        "type": "string",
                        "enum": [
                          "stale"
                        ]
                      },
                      "source_revision": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 200
                      },
                      "generated_at": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "stale_at": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "expires_at": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "invalidation_cursor": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 300
                      },
                      "reason": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 120
                          },
                          "message": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 1000
                          },
                          "retryable": {
                            "type": "boolean"
                          },
                          "recovery_action": {
                            "oneOf": [
                              {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 500
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "code",
                          "message",
                          "retryable",
                          "recovery_action"
                        ]
                      }
                    },
                    "required": [
                      "schema_version",
                      "state",
                      "source_revision",
                      "generated_at",
                      "stale_at",
                      "expires_at",
                      "invalidation_cursor",
                      "reason"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "schema_version": {
                        "type": "number",
                        "enum": [
                          1
                        ]
                      },
                      "state": {
                        "type": "string",
                        "enum": [
                          "expired"
                        ]
                      },
                      "source_revision": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 200
                      },
                      "generated_at": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "stale_at": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "expires_at": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "invalidation_cursor": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 300
                      },
                      "reason": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 120
                          },
                          "message": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 1000
                          },
                          "retryable": {
                            "type": "boolean"
                          },
                          "recovery_action": {
                            "oneOf": [
                              {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 500
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "code",
                          "message",
                          "retryable",
                          "recovery_action"
                        ]
                      }
                    },
                    "required": [
                      "schema_version",
                      "state",
                      "source_revision",
                      "generated_at",
                      "stale_at",
                      "expires_at",
                      "invalidation_cursor",
                      "reason"
                    ]
                  }
                ]
              },
              "cache": {
                "type": "object",
                "properties": {
                  "invalidation_cursor": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  }
                },
                "required": [
                  "invalidation_cursor"
                ]
              }
            },
            "required": [
              "schema_version",
              "server_time",
              "timezone",
              "scope",
              "roles",
              "primary",
              "actions",
              "summary",
              "freshness",
              "cache"
            ]
          },
          "waiting": {
            "type": "object",
            "properties": {
              "schema_version": {
                "type": "number",
                "enum": [
                  1
                ]
              },
              "party": {
                "type": "string",
                "enum": [
                  "league_secretariat",
                  "assigned_official",
                  "evaluator",
                  "opponent_team",
                  "own_team_players",
                  "team_captain",
                  "guardian",
                  "system_worker",
                  "owner_configuration"
                ]
              },
              "party_label": {
                "type": "string",
                "minLength": 1,
                "maxLength": 80
              },
              "waiting_count": {
                "type": "integer",
                "minimum": 0
              },
              "groups": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "action_id": {
                      "type": "string",
                      "pattern": "^[a-z_]+(\\.[a-z_]+){2}$"
                    },
                    "action_label": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 120
                    },
                    "waiting_party": {
                      "type": "string",
                      "enum": [
                        "league_secretariat",
                        "assigned_official",
                        "evaluator",
                        "opponent_team",
                        "own_team_players",
                        "team_captain",
                        "guardian",
                        "system_worker",
                        "owner_configuration"
                      ]
                    },
                    "waiting_count": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "oldest_since": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "link": {
                      "type": "object",
                      "properties": {
                        "target_kind": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80
                        },
                        "href": {
                          "type": "string",
                          "maxLength": 300
                        },
                        "params": {
                          "type": "object",
                          "additionalProperties": true,
                          "default": {}
                        }
                      },
                      "required": [
                        "target_kind",
                        "href"
                      ]
                    },
                    "objects": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "season",
                              "tournament",
                              "round",
                              "match",
                              "team",
                              "player",
                              "assignment",
                              "report_version",
                              "report_submission",
                              "rating_batch",
                              "correction_request",
                              "communication",
                              "transfer_request",
                              "fantasy_league",
                              "fantasy_team",
                              "fantasy_round",
                              "fantasy_auction",
                              "consent",
                              "invitation",
                              "player_claim",
                              "privacy_request",
                              "account"
                            ]
                          },
                          "id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "label": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 120
                          },
                          "waiting_count": {
                            "type": "integer",
                            "exclusiveMinimum": 0
                          },
                          "since": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "kind",
                          "id",
                          "label",
                          "waiting_count",
                          "since"
                        ]
                      },
                      "default": []
                    }
                  },
                  "required": [
                    "action_id",
                    "action_label",
                    "waiting_party",
                    "waiting_count",
                    "oldest_since",
                    "link"
                  ]
                },
                "default": []
              },
              "unavailable": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "action_id": {
                      "type": "string",
                      "pattern": "^[a-z_]+(\\.[a-z_]+){2}$"
                    },
                    "action_label": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 120
                    },
                    "reason": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 120
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 1000
                        },
                        "retryable": {
                          "type": "boolean"
                        },
                        "recovery_action": {
                          "oneOf": [
                            {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 500
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "retryable",
                        "recovery_action"
                      ]
                    }
                  },
                  "required": [
                    "action_id",
                    "action_label",
                    "reason"
                  ]
                },
                "default": []
              }
            },
            "required": [
              "schema_version",
              "party",
              "party_label",
              "waiting_count"
            ]
          }
        },
        "required": [
          "schema_version",
          "agenda",
          "waiting"
        ]
      },
      "PlayerProfileAvatarV1": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "catalog_head"
                ]
              },
              "avatar_head_id": {
                "type": "string",
                "enum": [
                  "head-01",
                  "head-02",
                  "head-03",
                  "head-04",
                  "head-05",
                  "head-06",
                  "head-07",
                  "head-08",
                  "head-09",
                  "head-10",
                  "head-11",
                  "head-12",
                  "head-13",
                  "head-14",
                  "head-15",
                  "head-16",
                  "head-17",
                  "head-18",
                  "head-19",
                  "head-20",
                  "head-21",
                  "head-22",
                  "head-23",
                  "head-24",
                  "head-25",
                  "head-26",
                  "head-27",
                  "head-28",
                  "head-29",
                  "head-30",
                  "head-31",
                  "head-32",
                  "head-33",
                  "head-34",
                  "head-35",
                  "head-36",
                  "head-37",
                  "head-38",
                  "head-39",
                  "head-40",
                  "head-41",
                  "head-42",
                  "head-43",
                  "head-44",
                  "head-45",
                  "head-46",
                  "head-47",
                  "head-48",
                  "head-49",
                  "head-50",
                  "head-51",
                  "head-52",
                  "head-53",
                  "head-54",
                  "head-55",
                  "head-56",
                  "head-57",
                  "head-58",
                  "head-59",
                  "head-60",
                  "head-61",
                  "head-62",
                  "head-63",
                  "head-64",
                  "head-65",
                  "head-66",
                  "head-67",
                  "head-68",
                  "head-69",
                  "head-70",
                  "head-71",
                  "head-72",
                  "head-73",
                  "head-74",
                  "head-75",
                  "head-76",
                  "head-77",
                  "head-78",
                  "head-79",
                  "head-80",
                  "head-81",
                  "head-82",
                  "head-83",
                  "head-84",
                  "head-85",
                  "head-86",
                  "head-87",
                  "head-88",
                  "head-89",
                  "head-90",
                  "head-91",
                  "head-92",
                  "head-93",
                  "head-94",
                  "head-95",
                  "head-96",
                  "head-97",
                  "head-98",
                  "head-99",
                  "head-100",
                  "head-101",
                  "head-102",
                  "head-103",
                  "head-104",
                  "head-105",
                  "head-106",
                  "head-107",
                  "head-108",
                  "head-109",
                  "head-110",
                  "head-111",
                  "head-112",
                  "head-113",
                  "head-114",
                  "head-115",
                  "head-116",
                  "head-117",
                  "head-118",
                  "head-119",
                  "head-120",
                  "head-121",
                  "head-122",
                  "head-123",
                  "head-124",
                  "head-125",
                  "head-126",
                  "head-127",
                  "head-128",
                  "head-129",
                  "head-130",
                  "head-131",
                  "head-132",
                  "head-133",
                  "head-134",
                  "head-135",
                  "head-136",
                  "head-137",
                  "head-138",
                  "head-139",
                  "head-140",
                  "head-141",
                  "head-142",
                  "head-143",
                  "head-144",
                  "head-145",
                  "head-146",
                  "head-147",
                  "head-148",
                  "head-149",
                  "head-150",
                  "head-151",
                  "head-152",
                  "head-153",
                  "head-154",
                  "head-155",
                  "head-156",
                  "head-157",
                  "head-158",
                  "head-159",
                  "head-160",
                  "head-161",
                  "head-162",
                  "head-163",
                  "head-164",
                  "head-165",
                  "head-166",
                  "head-167",
                  "head-168",
                  "head-169",
                  "head-170",
                  "head-171",
                  "head-172",
                  "head-173",
                  "head-174",
                  "head-175",
                  "head-176",
                  "head-177",
                  "head-178",
                  "head-179",
                  "head-180",
                  "head-181",
                  "head-182",
                  "head-183"
                ]
              }
            },
            "required": [
              "kind",
              "avatar_head_id"
            ]
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "licensed_photo"
                ]
              },
              "public_photo_url": {
                "type": "string",
                "format": "uri"
              }
            },
            "required": [
              "kind",
              "public_photo_url"
            ]
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "none"
                ]
              },
              "reason": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "message": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1000
                  },
                  "retryable": {
                    "type": "boolean"
                  },
                  "recovery_action": {
                    "oneOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "code",
                  "message",
                  "retryable",
                  "recovery_action"
                ]
              }
            },
            "required": [
              "kind",
              "reason"
            ]
          }
        ]
      },
      "PlayerProfileIdentityV1": {
        "type": "object",
        "properties": {
          "schema_version": {
            "type": "number",
            "enum": [
              1
            ]
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "player_id": {
            "type": "string",
            "format": "uuid"
          },
          "organization_id": {
            "type": "string",
            "format": "uuid"
          },
          "account_user_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "slug": {
            "type": "string",
            "minLength": 2,
            "maxLength": 64,
            "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
          },
          "sport_name": {
            "type": "string",
            "minLength": 1
          },
          "role": {
            "type": "string",
            "enum": [
              "GK",
              "DEF",
              "MID",
              "FWD"
            ]
          },
          "avatar": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "catalog_head"
                    ]
                  },
                  "avatar_head_id": {
                    "type": "string",
                    "enum": [
                      "head-01",
                      "head-02",
                      "head-03",
                      "head-04",
                      "head-05",
                      "head-06",
                      "head-07",
                      "head-08",
                      "head-09",
                      "head-10",
                      "head-11",
                      "head-12",
                      "head-13",
                      "head-14",
                      "head-15",
                      "head-16",
                      "head-17",
                      "head-18",
                      "head-19",
                      "head-20",
                      "head-21",
                      "head-22",
                      "head-23",
                      "head-24",
                      "head-25",
                      "head-26",
                      "head-27",
                      "head-28",
                      "head-29",
                      "head-30",
                      "head-31",
                      "head-32",
                      "head-33",
                      "head-34",
                      "head-35",
                      "head-36",
                      "head-37",
                      "head-38",
                      "head-39",
                      "head-40",
                      "head-41",
                      "head-42",
                      "head-43",
                      "head-44",
                      "head-45",
                      "head-46",
                      "head-47",
                      "head-48",
                      "head-49",
                      "head-50",
                      "head-51",
                      "head-52",
                      "head-53",
                      "head-54",
                      "head-55",
                      "head-56",
                      "head-57",
                      "head-58",
                      "head-59",
                      "head-60",
                      "head-61",
                      "head-62",
                      "head-63",
                      "head-64",
                      "head-65",
                      "head-66",
                      "head-67",
                      "head-68",
                      "head-69",
                      "head-70",
                      "head-71",
                      "head-72",
                      "head-73",
                      "head-74",
                      "head-75",
                      "head-76",
                      "head-77",
                      "head-78",
                      "head-79",
                      "head-80",
                      "head-81",
                      "head-82",
                      "head-83",
                      "head-84",
                      "head-85",
                      "head-86",
                      "head-87",
                      "head-88",
                      "head-89",
                      "head-90",
                      "head-91",
                      "head-92",
                      "head-93",
                      "head-94",
                      "head-95",
                      "head-96",
                      "head-97",
                      "head-98",
                      "head-99",
                      "head-100",
                      "head-101",
                      "head-102",
                      "head-103",
                      "head-104",
                      "head-105",
                      "head-106",
                      "head-107",
                      "head-108",
                      "head-109",
                      "head-110",
                      "head-111",
                      "head-112",
                      "head-113",
                      "head-114",
                      "head-115",
                      "head-116",
                      "head-117",
                      "head-118",
                      "head-119",
                      "head-120",
                      "head-121",
                      "head-122",
                      "head-123",
                      "head-124",
                      "head-125",
                      "head-126",
                      "head-127",
                      "head-128",
                      "head-129",
                      "head-130",
                      "head-131",
                      "head-132",
                      "head-133",
                      "head-134",
                      "head-135",
                      "head-136",
                      "head-137",
                      "head-138",
                      "head-139",
                      "head-140",
                      "head-141",
                      "head-142",
                      "head-143",
                      "head-144",
                      "head-145",
                      "head-146",
                      "head-147",
                      "head-148",
                      "head-149",
                      "head-150",
                      "head-151",
                      "head-152",
                      "head-153",
                      "head-154",
                      "head-155",
                      "head-156",
                      "head-157",
                      "head-158",
                      "head-159",
                      "head-160",
                      "head-161",
                      "head-162",
                      "head-163",
                      "head-164",
                      "head-165",
                      "head-166",
                      "head-167",
                      "head-168",
                      "head-169",
                      "head-170",
                      "head-171",
                      "head-172",
                      "head-173",
                      "head-174",
                      "head-175",
                      "head-176",
                      "head-177",
                      "head-178",
                      "head-179",
                      "head-180",
                      "head-181",
                      "head-182",
                      "head-183"
                    ]
                  }
                },
                "required": [
                  "kind",
                  "avatar_head_id"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "licensed_photo"
                    ]
                  },
                  "public_photo_url": {
                    "type": "string",
                    "format": "uri"
                  }
                },
                "required": [
                  "kind",
                  "public_photo_url"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "none"
                    ]
                  },
                  "reason": {
                    "type": "object",
                    "properties": {
                      "code": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "message": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 1000
                      },
                      "retryable": {
                        "type": "boolean"
                      },
                      "recovery_action": {
                        "oneOf": [
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 500
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "code",
                      "message",
                      "retryable",
                      "recovery_action"
                    ]
                  }
                },
                "required": [
                  "kind",
                  "reason"
                ]
              }
            ]
          },
          "verification": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "state": {
                    "type": "string",
                    "enum": [
                      "unclaimed"
                    ]
                  },
                  "verified_at": {
                    "type": "null"
                  },
                  "evidence_revision_id": {
                    "type": "null"
                  }
                },
                "required": [
                  "state",
                  "verified_at",
                  "evidence_revision_id"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "state": {
                    "type": "string",
                    "enum": [
                      "verified"
                    ]
                  },
                  "verified_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "evidence_revision_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "state",
                  "verified_at",
                  "evidence_revision_id"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "state": {
                    "type": "string",
                    "enum": [
                      "suspended"
                    ]
                  },
                  "verified_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "evidence_revision_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "state",
                  "verified_at",
                  "evidence_revision_id"
                ]
              }
            ]
          },
          "identity_revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "schema_version",
          "tenant_id",
          "player_id",
          "organization_id",
          "account_user_id",
          "slug",
          "sport_name",
          "role",
          "avatar",
          "verification",
          "identity_revision",
          "updated_at"
        ]
      },
      "EvaluationRulesetV1": {
        "type": "object",
        "properties": {
          "schema_version": {
            "type": "number",
            "enum": [
              1
            ]
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "scope": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "schema_version": {
                    "type": "number",
                    "enum": [
                      1
                    ]
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "tenant"
                    ]
                  },
                  "tenant_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "league_id": {
                    "type": "null"
                  },
                  "match_id": {
                    "type": "null"
                  }
                },
                "required": [
                  "schema_version",
                  "kind",
                  "tenant_id",
                  "league_id",
                  "match_id"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "schema_version": {
                    "type": "number",
                    "enum": [
                      1
                    ]
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "league"
                    ]
                  },
                  "tenant_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "league_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "match_id": {
                    "type": "null"
                  }
                },
                "required": [
                  "schema_version",
                  "kind",
                  "tenant_id",
                  "league_id",
                  "match_id"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "schema_version": {
                    "type": "number",
                    "enum": [
                      1
                    ]
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "match"
                    ]
                  },
                  "tenant_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "league_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "match_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "schema_version",
                  "kind",
                  "tenant_id",
                  "league_id",
                  "match_id"
                ]
              }
            ]
          },
          "ruleset": {
            "type": "object",
            "properties": {
              "schema_version": {
                "type": "number",
                "enum": [
                  1
                ]
              },
              "revision_id": {
                "type": "string",
                "format": "uuid"
              },
              "content_hash": {
                "type": "string",
                "pattern": "^[0-9a-f]{64}$"
              },
              "provenance_label": {
                "type": "string",
                "minLength": 1,
                "maxLength": 240
              },
              "signed_document": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "state": {
                        "type": "string",
                        "enum": [
                          "disabled"
                        ]
                      },
                      "reason": {
                        "type": "string",
                        "enum": [
                          "owner_input_required",
                          "provider_not_configured",
                          "bridge_not_implemented"
                        ]
                      },
                      "enabled_at": {
                        "type": "null"
                      }
                    },
                    "required": [
                      "state",
                      "reason",
                      "enabled_at"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "state": {
                        "type": "string",
                        "enum": [
                          "enabled"
                        ]
                      },
                      "configuration_revision_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "enabled_at": {
                        "type": "string",
                        "format": "date-time"
                      }
                    },
                    "required": [
                      "state",
                      "configuration_revision_id",
                      "enabled_at"
                    ]
                  }
                ]
              }
            },
            "required": [
              "schema_version",
              "revision_id",
              "content_hash",
              "provenance_label",
              "signed_document"
            ]
          },
          "scale": {
            "type": "object",
            "properties": {
              "minimum": {
                "type": "number"
              },
              "maximum": {
                "type": "number"
              },
              "step": {
                "type": "number",
                "exclusiveMinimum": 0
              },
              "neutral": {
                "type": "number"
              }
            },
            "required": [
              "minimum",
              "maximum",
              "step",
              "neutral"
            ]
          },
          "no_grade_reasons": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120
                },
                "label": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 240
                }
              },
              "required": [
                "code",
                "label"
              ]
            }
          },
          "rubric": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "value": {
                  "type": "number"
                },
                "label": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120
                },
                "description": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 1000
                }
              },
              "required": [
                "value",
                "label",
                "description"
              ]
            }
          },
          "performance_tags": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120
                },
                "label": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120
                },
                "description": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 500
                },
                "max_per_match": {
                  "oneOf": [
                    {
                      "type": "integer",
                      "exclusiveMinimum": 0
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "code",
                "label",
                "description",
                "max_per_match"
              ]
            }
          },
          "mvp": {
            "type": "object",
            "properties": {
              "required": {
                "type": "boolean"
              },
              "allow_none": {
                "type": "boolean"
              },
              "max_selections": {
                "type": "integer",
                "exclusiveMinimum": 0
              }
            },
            "required": [
              "required",
              "allow_none",
              "max_selections"
            ]
          },
          "shared_definitions": {
            "type": "string",
            "maxLength": 4000
          }
        },
        "required": [
          "schema_version",
          "tenant_id",
          "scope",
          "ruleset",
          "scale",
          "no_grade_reasons",
          "rubric",
          "performance_tags",
          "mvp"
        ]
      },
      "ReportSignatureArtifact": {
        "type": "object",
        "properties": {
          "actor_user_id": {
            "type": "string",
            "format": "uuid"
          },
          "signed_at": {
            "type": "string",
            "format": "date-time"
          },
          "method": {
            "type": "string",
            "enum": [
              "typed",
              "drawn"
            ]
          },
          "artifact_ref": {
            "type": "string",
            "minLength": 1,
            "maxLength": 512
          }
        },
        "required": [
          "actor_user_id",
          "signed_at",
          "method",
          "artifact_ref"
        ]
      },
      "ReportDraftCreateRequest": {
        "type": "object",
        "properties": {
          "score_home": {
            "type": "integer",
            "minimum": 0
          },
          "score_away": {
            "type": "integer",
            "minimum": 0
          },
          "ended_after": {
            "type": "string",
            "enum": [
              "regulation",
              "extra_time",
              "penalties"
            ]
          },
          "penalty_shootout": {
            "type": "object",
            "properties": {
              "home": {
                "type": "integer",
                "minimum": 0
              },
              "away": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "home",
              "away"
            ]
          },
          "result_origin": {
            "type": "string",
            "enum": [
              "played",
              "forfeit"
            ]
          },
          "forfeit_trigger": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "no_show",
                  "ineligible_player",
                  "roster_below_minimum",
                  "late_result_confirmation_both_secretariats"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "event_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "base_event_sequence": {
            "type": "integer",
            "minimum": 0
          },
          "notes": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "score_home",
          "score_away",
          "event_ids",
          "base_event_sequence",
          "notes"
        ]
      },
      "ReportDraftSubmitRequest": {
        "type": "object",
        "properties": {
          "signature": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "actor_user_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "signed_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "method": {
                    "type": "string",
                    "enum": [
                      "typed",
                      "drawn"
                    ]
                  },
                  "artifact_ref": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 512
                  }
                },
                "required": [
                  "actor_user_id",
                  "signed_at",
                  "method",
                  "artifact_ref"
                ]
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": []
      },
      "ReportSubmissionSubmitRequest": {
        "type": "object",
        "properties": {
          "report_version_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "idempotency_key": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "queued": {
            "type": "boolean"
          },
          "signature": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "actor_user_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "signed_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "method": {
                    "type": "string",
                    "enum": [
                      "typed",
                      "drawn"
                    ]
                  },
                  "artifact_ref": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 512
                  }
                },
                "required": [
                  "actor_user_id",
                  "signed_at",
                  "method",
                  "artifact_ref"
                ]
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "report_version_id",
          "idempotency_key",
          "queued"
        ]
      },
      "AdminReportSubmissionDecideRequest": {
        "type": "object",
        "properties": {
          "decision": {
            "type": "string",
            "enum": [
              "approved",
              "needs_correction",
              "rejected"
            ]
          },
          "reason": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "decision",
          "reason"
        ]
      },
      "AdminReportSubmissionSyncRequest": {
        "type": "object",
        "properties": {
          "report_version_id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "report_version_id"
        ]
      },
      "AdminReportSubmissionRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "match_id": {
            "type": "string",
            "format": "uuid"
          },
          "report_version_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "queued",
              "submitted",
              "needs_correction",
              "approved",
              "rejected"
            ]
          },
          "submitted_at": {
            "type": "string",
            "format": "date-time"
          },
          "decided_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "reviewed_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "decision_reason": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "officiality": {
            "type": "string",
            "enum": [
              "draft",
              "submitted",
              "reviewed",
              "corrected",
              "homologated",
              "superseded"
            ]
          },
          "idempotency_label": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "signature_method": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "typed",
                  "drawn"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "signature_artifact_ref": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 512
              },
              {
                "type": "null"
              }
            ]
          },
          "report_version_status": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "draft",
                  "submitted",
                  "official",
                  "superseded"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "origin": {
            "type": "string",
            "enum": [
              "submission",
              "report_v2"
            ]
          },
          "v2_lifecycle_state": {
            "type": "string",
            "enum": [
              "submitted",
              "approved"
            ]
          }
        },
        "required": [
          "id",
          "match_id",
          "report_version_id",
          "status",
          "submitted_at",
          "decided_at",
          "reviewed_by",
          "decision_reason",
          "officiality",
          "idempotency_label",
          "signature_method",
          "signature_artifact_ref",
          "report_version_status"
        ]
      },
      "AdminReportSubmissionList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "match_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "report_version_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "draft",
                    "queued",
                    "submitted",
                    "needs_correction",
                    "approved",
                    "rejected"
                  ]
                },
                "submitted_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "decided_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "reviewed_by": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "decision_reason": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "officiality": {
                  "type": "string",
                  "enum": [
                    "draft",
                    "submitted",
                    "reviewed",
                    "corrected",
                    "homologated",
                    "superseded"
                  ]
                },
                "idempotency_label": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "signature_method": {
                  "oneOf": [
                    {
                      "type": "string",
                      "enum": [
                        "typed",
                        "drawn"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "signature_artifact_ref": {
                  "oneOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 512
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "report_version_status": {
                  "oneOf": [
                    {
                      "type": "string",
                      "enum": [
                        "draft",
                        "submitted",
                        "official",
                        "superseded"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "origin": {
                  "type": "string",
                  "enum": [
                    "submission",
                    "report_v2"
                  ]
                },
                "v2_lifecycle_state": {
                  "type": "string",
                  "enum": [
                    "submitted",
                    "approved"
                  ]
                }
              },
              "required": [
                "id",
                "match_id",
                "report_version_id",
                "status",
                "submitted_at",
                "decided_at",
                "reviewed_by",
                "decision_reason",
                "officiality",
                "idempotency_label",
                "signature_method",
                "signature_artifact_ref",
                "report_version_status"
              ]
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "AssignedReportSubmissionRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "match_id": {
            "type": "string",
            "format": "uuid"
          },
          "report_version_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "queued",
              "submitted",
              "needs_correction",
              "approved",
              "rejected"
            ]
          },
          "submitted_at": {
            "type": "string",
            "format": "date-time"
          },
          "decided_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "reviewed_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "decision_reason": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "officiality": {
            "type": "string",
            "enum": [
              "draft",
              "submitted",
              "reviewed",
              "corrected",
              "homologated",
              "superseded"
            ]
          },
          "idempotency_label": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "signature_method": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "typed",
                  "drawn"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "signature_artifact_ref": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 512
              },
              {
                "type": "null"
              }
            ]
          },
          "report_version_status": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "draft",
                  "submitted",
                  "official",
                  "superseded"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "origin": {
            "type": "string",
            "enum": [
              "submission",
              "report_v2"
            ]
          },
          "v2_lifecycle_state": {
            "type": "string",
            "enum": [
              "submitted",
              "approved"
            ]
          },
          "receipt_id": {
            "type": "string",
            "format": "uuid"
          },
          "operation_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          }
        },
        "required": [
          "id",
          "match_id",
          "report_version_id",
          "status",
          "submitted_at",
          "decided_at",
          "reviewed_by",
          "decision_reason",
          "officiality",
          "idempotency_label",
          "signature_method",
          "signature_artifact_ref",
          "report_version_status",
          "receipt_id",
          "operation_id"
        ]
      },
      "AssignedReportSubmissionList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "match_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "report_version_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "draft",
                    "queued",
                    "submitted",
                    "needs_correction",
                    "approved",
                    "rejected"
                  ]
                },
                "submitted_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "decided_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "reviewed_by": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "decision_reason": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "officiality": {
                  "type": "string",
                  "enum": [
                    "draft",
                    "submitted",
                    "reviewed",
                    "corrected",
                    "homologated",
                    "superseded"
                  ]
                },
                "idempotency_label": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "signature_method": {
                  "oneOf": [
                    {
                      "type": "string",
                      "enum": [
                        "typed",
                        "drawn"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "signature_artifact_ref": {
                  "oneOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 512
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "report_version_status": {
                  "oneOf": [
                    {
                      "type": "string",
                      "enum": [
                        "draft",
                        "submitted",
                        "official",
                        "superseded"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "origin": {
                  "type": "string",
                  "enum": [
                    "submission",
                    "report_v2"
                  ]
                },
                "v2_lifecycle_state": {
                  "type": "string",
                  "enum": [
                    "submitted",
                    "approved"
                  ]
                },
                "receipt_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "operation_id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                }
              },
              "required": [
                "id",
                "match_id",
                "report_version_id",
                "status",
                "submitted_at",
                "decided_at",
                "reviewed_by",
                "decision_reason",
                "officiality",
                "idempotency_label",
                "signature_method",
                "signature_artifact_ref",
                "report_version_status",
                "receipt_id",
                "operation_id"
              ]
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "AdminReportVersionPickerRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "match_id": {
            "type": "string",
            "format": "uuid"
          },
          "version": {
            "type": "integer",
            "minimum": 1
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "submitted",
              "official",
              "superseded"
            ]
          },
          "score_home": {
            "type": "integer",
            "minimum": 0
          },
          "score_away": {
            "type": "integer",
            "minimum": 0
          },
          "ended_after": {
            "type": "string",
            "enum": [
              "regulation",
              "extra_time",
              "penalties"
            ]
          },
          "penalty_shootout": {
            "type": "object",
            "properties": {
              "home": {
                "type": "integer",
                "minimum": 0
              },
              "away": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "home",
              "away"
            ]
          },
          "submitted_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "approved_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "match_id",
          "version",
          "status",
          "score_home",
          "score_away",
          "submitted_at",
          "approved_at",
          "updated_at"
        ]
      },
      "AdminReportVersionList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "match_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "version": {
                  "type": "integer",
                  "minimum": 1
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "draft",
                    "submitted",
                    "official",
                    "superseded"
                  ]
                },
                "score_home": {
                  "type": "integer",
                  "minimum": 0
                },
                "score_away": {
                  "type": "integer",
                  "minimum": 0
                },
                "ended_after": {
                  "type": "string",
                  "enum": [
                    "regulation",
                    "extra_time",
                    "penalties"
                  ]
                },
                "penalty_shootout": {
                  "type": "object",
                  "properties": {
                    "home": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "away": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "home",
                    "away"
                  ]
                },
                "submitted_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "approved_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "id",
                "match_id",
                "version",
                "status",
                "score_home",
                "score_away",
                "submitted_at",
                "approved_at",
                "updated_at"
              ]
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "RatingSubmissionSubmitRequest": {
        "type": "object",
        "properties": {
          "player_id": {
            "type": "string",
            "format": "uuid"
          },
          "value": {
            "type": "number",
            "minimum": 1,
            "maximum": 10
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "mvp_candidate",
                "clutch_goal",
                "defensive_wall",
                "creator",
                "discipline_issue",
                "fair_play",
                "gk_save_streak"
              ]
            },
            "default": []
          },
          "notes_private": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "idempotency_key": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "player_id",
          "value",
          "notes_private",
          "idempotency_key"
        ]
      },
      "AdminRatingSubmissionRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "match_id": {
            "type": "string",
            "format": "uuid"
          },
          "player_id": {
            "type": "string",
            "format": "uuid"
          },
          "value": {
            "type": "number"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "mvp_candidate",
                "clutch_goal",
                "defensive_wall",
                "creator",
                "discipline_issue",
                "fair_play",
                "gk_save_streak"
              ]
            }
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "submitted",
              "pending_admin_validation",
              "approved",
              "corrected",
              "rejected"
            ]
          },
          "submitted_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "decided_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "decision_reason": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "match_id",
          "player_id",
          "value",
          "tags",
          "status",
          "submitted_at",
          "decided_at",
          "decision_reason"
        ]
      },
      "AdminRatingSubmissionList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "match_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "player_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "value": {
                  "type": "number"
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "mvp_candidate",
                      "clutch_goal",
                      "defensive_wall",
                      "creator",
                      "discipline_issue",
                      "fair_play",
                      "gk_save_streak"
                    ]
                  }
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "draft",
                    "submitted",
                    "pending_admin_validation",
                    "approved",
                    "corrected",
                    "rejected"
                  ]
                },
                "submitted_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "decided_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "decision_reason": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "match_id",
                "player_id",
                "value",
                "tags",
                "status",
                "submitted_at",
                "decided_at",
                "decision_reason"
              ]
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "EvaluatorRatingSubmissionRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "match_id": {
            "type": "string",
            "format": "uuid"
          },
          "player_id": {
            "type": "string",
            "format": "uuid"
          },
          "value": {
            "type": "number"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "mvp_candidate",
                "clutch_goal",
                "defensive_wall",
                "creator",
                "discipline_issue",
                "fair_play",
                "gk_save_streak"
              ]
            }
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "submitted",
              "pending_admin_validation",
              "approved",
              "corrected",
              "rejected"
            ]
          },
          "submitted_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "decided_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "decision_reason": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "operation_id": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "id",
          "match_id",
          "player_id",
          "value",
          "tags",
          "status",
          "submitted_at",
          "decided_at",
          "decision_reason",
          "operation_id"
        ]
      },
      "EvaluatorRatingSubmissionList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "match_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "player_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "value": {
                  "type": "number"
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "mvp_candidate",
                      "clutch_goal",
                      "defensive_wall",
                      "creator",
                      "discipline_issue",
                      "fair_play",
                      "gk_save_streak"
                    ]
                  }
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "draft",
                    "submitted",
                    "pending_admin_validation",
                    "approved",
                    "corrected",
                    "rejected"
                  ]
                },
                "submitted_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "decided_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "decision_reason": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "operation_id": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "required": [
                "id",
                "match_id",
                "player_id",
                "value",
                "tags",
                "status",
                "submitted_at",
                "decided_at",
                "decision_reason",
                "operation_id"
              ]
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "EvaluatorRatingBatchManifest": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "manifest_version": {
                "type": "number",
                "enum": [
                  1
                ]
              },
              "match_id": {
                "type": "string",
                "format": "uuid"
              },
              "evaluations": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "player_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "participation": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "status": {
                              "type": "string",
                              "enum": [
                                "not_listed"
                              ]
                            },
                            "lineup_entry_id": {
                              "type": "null"
                            },
                            "player_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "in_lineup": {
                              "type": "boolean",
                              "enum": [
                                false
                              ]
                            },
                            "starting": {
                              "type": "boolean",
                              "enum": [
                                false
                              ]
                            },
                            "entered": {
                              "type": "boolean",
                              "enum": [
                                false
                              ]
                            },
                            "minutes_played": {
                              "type": "number",
                              "enum": [
                                0
                              ]
                            },
                            "intervals": {
                              "type": "array",
                              "prefixItems": []
                            }
                          },
                          "required": [
                            "status",
                            "lineup_entry_id",
                            "player_id",
                            "in_lineup",
                            "starting",
                            "entered",
                            "minutes_played",
                            "intervals"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "lineup_entry_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "player_id": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "in_lineup": {
                              "type": "boolean",
                              "enum": [
                                true
                              ]
                            },
                            "minutes_played": {
                              "oneOf": [
                                {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "intervals": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "entered_at": {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "period"
                                        ]
                                      },
                                      "period": {
                                        "oneOf": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "kind": {
                                                "type": "string",
                                                "enum": [
                                                  "regulation"
                                                ]
                                              },
                                              "number": {
                                                "type": "integer",
                                                "minimum": 1,
                                                "maximum": 4
                                              }
                                            },
                                            "required": [
                                              "kind",
                                              "number"
                                            ]
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "kind": {
                                                "type": "string",
                                                "enum": [
                                                  "extra_time"
                                                ]
                                              },
                                              "number": {
                                                "type": "integer",
                                                "minimum": 1,
                                                "maximum": 2
                                              }
                                            },
                                            "required": [
                                              "kind",
                                              "number"
                                            ]
                                          }
                                        ]
                                      },
                                      "minute": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "stoppage_minute": {
                                        "type": "integer",
                                        "minimum": 0
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "period",
                                      "minute",
                                      "stoppage_minute"
                                    ]
                                  },
                                  "left_at": {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "kind": {
                                            "type": "string",
                                            "enum": [
                                              "period"
                                            ]
                                          },
                                          "period": {
                                            "oneOf": [
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "kind": {
                                                    "type": "string",
                                                    "enum": [
                                                      "regulation"
                                                    ]
                                                  },
                                                  "number": {
                                                    "type": "integer",
                                                    "minimum": 1,
                                                    "maximum": 4
                                                  }
                                                },
                                                "required": [
                                                  "kind",
                                                  "number"
                                                ]
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "kind": {
                                                    "type": "string",
                                                    "enum": [
                                                      "extra_time"
                                                    ]
                                                  },
                                                  "number": {
                                                    "type": "integer",
                                                    "minimum": 1,
                                                    "maximum": 2
                                                  }
                                                },
                                                "required": [
                                                  "kind",
                                                  "number"
                                                ]
                                              }
                                            ]
                                          },
                                          "minute": {
                                            "type": "integer",
                                            "minimum": 0
                                          },
                                          "stoppage_minute": {
                                            "type": "integer",
                                            "minimum": 0
                                          }
                                        },
                                        "required": [
                                          "kind",
                                          "period",
                                          "minute",
                                          "stoppage_minute"
                                        ]
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "entered_at",
                                  "left_at"
                                ]
                              }
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "starter"
                              ]
                            },
                            "starting": {
                              "type": "boolean",
                              "enum": [
                                true
                              ]
                            },
                            "entered": {
                              "type": "boolean",
                              "enum": [
                                true
                              ]
                            }
                          },
                          "required": [
                            "lineup_entry_id",
                            "player_id",
                            "in_lineup",
                            "minutes_played",
                            "intervals",
                            "status",
                            "starting",
                            "entered"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "lineup_entry_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "player_id": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "in_lineup": {
                              "type": "boolean",
                              "enum": [
                                true
                              ]
                            },
                            "minutes_played": {
                              "oneOf": [
                                {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "intervals": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "entered_at": {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "period"
                                        ]
                                      },
                                      "period": {
                                        "oneOf": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "kind": {
                                                "type": "string",
                                                "enum": [
                                                  "regulation"
                                                ]
                                              },
                                              "number": {
                                                "type": "integer",
                                                "minimum": 1,
                                                "maximum": 4
                                              }
                                            },
                                            "required": [
                                              "kind",
                                              "number"
                                            ]
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "kind": {
                                                "type": "string",
                                                "enum": [
                                                  "extra_time"
                                                ]
                                              },
                                              "number": {
                                                "type": "integer",
                                                "minimum": 1,
                                                "maximum": 2
                                              }
                                            },
                                            "required": [
                                              "kind",
                                              "number"
                                            ]
                                          }
                                        ]
                                      },
                                      "minute": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "stoppage_minute": {
                                        "type": "integer",
                                        "minimum": 0
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "period",
                                      "minute",
                                      "stoppage_minute"
                                    ]
                                  },
                                  "left_at": {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "kind": {
                                            "type": "string",
                                            "enum": [
                                              "period"
                                            ]
                                          },
                                          "period": {
                                            "oneOf": [
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "kind": {
                                                    "type": "string",
                                                    "enum": [
                                                      "regulation"
                                                    ]
                                                  },
                                                  "number": {
                                                    "type": "integer",
                                                    "minimum": 1,
                                                    "maximum": 4
                                                  }
                                                },
                                                "required": [
                                                  "kind",
                                                  "number"
                                                ]
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "kind": {
                                                    "type": "string",
                                                    "enum": [
                                                      "extra_time"
                                                    ]
                                                  },
                                                  "number": {
                                                    "type": "integer",
                                                    "minimum": 1,
                                                    "maximum": 2
                                                  }
                                                },
                                                "required": [
                                                  "kind",
                                                  "number"
                                                ]
                                              }
                                            ]
                                          },
                                          "minute": {
                                            "type": "integer",
                                            "minimum": 0
                                          },
                                          "stoppage_minute": {
                                            "type": "integer",
                                            "minimum": 0
                                          }
                                        },
                                        "required": [
                                          "kind",
                                          "period",
                                          "minute",
                                          "stoppage_minute"
                                        ]
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "entered_at",
                                  "left_at"
                                ]
                              }
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "substitute_entered"
                              ]
                            },
                            "starting": {
                              "type": "boolean",
                              "enum": [
                                false
                              ]
                            },
                            "entered": {
                              "type": "boolean",
                              "enum": [
                                true
                              ]
                            }
                          },
                          "required": [
                            "lineup_entry_id",
                            "player_id",
                            "in_lineup",
                            "minutes_played",
                            "intervals",
                            "status",
                            "starting",
                            "entered"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "lineup_entry_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "player_id": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "in_lineup": {
                              "type": "boolean",
                              "enum": [
                                true
                              ]
                            },
                            "minutes_played": {
                              "type": "number",
                              "enum": [
                                0
                              ]
                            },
                            "intervals": {
                              "type": "array",
                              "prefixItems": []
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "substitute_not_entered"
                              ]
                            },
                            "starting": {
                              "type": "boolean",
                              "enum": [
                                false
                              ]
                            },
                            "entered": {
                              "type": "boolean",
                              "enum": [
                                false
                              ]
                            }
                          },
                          "required": [
                            "lineup_entry_id",
                            "player_id",
                            "in_lineup",
                            "minutes_played",
                            "intervals",
                            "status",
                            "starting",
                            "entered"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "lineup_entry_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "player_id": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "in_lineup": {
                              "type": "boolean",
                              "enum": [
                                true
                              ]
                            },
                            "minutes_played": {
                              "type": "null"
                            },
                            "intervals": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "entered_at": {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "period"
                                        ]
                                      },
                                      "period": {
                                        "oneOf": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "kind": {
                                                "type": "string",
                                                "enum": [
                                                  "regulation"
                                                ]
                                              },
                                              "number": {
                                                "type": "integer",
                                                "minimum": 1,
                                                "maximum": 4
                                              }
                                            },
                                            "required": [
                                              "kind",
                                              "number"
                                            ]
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "kind": {
                                                "type": "string",
                                                "enum": [
                                                  "extra_time"
                                                ]
                                              },
                                              "number": {
                                                "type": "integer",
                                                "minimum": 1,
                                                "maximum": 2
                                              }
                                            },
                                            "required": [
                                              "kind",
                                              "number"
                                            ]
                                          }
                                        ]
                                      },
                                      "minute": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "stoppage_minute": {
                                        "type": "integer",
                                        "minimum": 0
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "period",
                                      "minute",
                                      "stoppage_minute"
                                    ]
                                  },
                                  "left_at": {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "kind": {
                                            "type": "string",
                                            "enum": [
                                              "period"
                                            ]
                                          },
                                          "period": {
                                            "oneOf": [
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "kind": {
                                                    "type": "string",
                                                    "enum": [
                                                      "regulation"
                                                    ]
                                                  },
                                                  "number": {
                                                    "type": "integer",
                                                    "minimum": 1,
                                                    "maximum": 4
                                                  }
                                                },
                                                "required": [
                                                  "kind",
                                                  "number"
                                                ]
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "kind": {
                                                    "type": "string",
                                                    "enum": [
                                                      "extra_time"
                                                    ]
                                                  },
                                                  "number": {
                                                    "type": "integer",
                                                    "minimum": 1,
                                                    "maximum": 2
                                                  }
                                                },
                                                "required": [
                                                  "kind",
                                                  "number"
                                                ]
                                              }
                                            ]
                                          },
                                          "minute": {
                                            "type": "integer",
                                            "minimum": 0
                                          },
                                          "stoppage_minute": {
                                            "type": "integer",
                                            "minimum": 0
                                          }
                                        },
                                        "required": [
                                          "kind",
                                          "period",
                                          "minute",
                                          "stoppage_minute"
                                        ]
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "entered_at",
                                  "left_at"
                                ]
                              }
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "not_verifiable"
                              ]
                            },
                            "starting": {
                              "type": "boolean"
                            },
                            "entered": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "lineup_entry_id",
                            "player_id",
                            "in_lineup",
                            "minutes_played",
                            "intervals",
                            "status",
                            "starting",
                            "entered"
                          ]
                        }
                      ]
                    },
                    "outcome": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "graded"
                              ]
                            },
                            "value": {
                              "type": "number",
                              "minimum": 1,
                              "maximum": 10
                            }
                          },
                          "required": [
                            "kind",
                            "value"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "no_grade"
                              ]
                            },
                            "reason": {
                              "type": "string",
                              "enum": [
                                "not_entered",
                                "not_listed",
                                "insufficient_observation",
                                "match_not_played",
                                "not_verifiable"
                              ]
                            }
                          },
                          "required": [
                            "kind",
                            "reason"
                          ]
                        }
                      ]
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "mvp_candidate",
                          "clutch_goal",
                          "defensive_wall",
                          "creator",
                          "discipline_issue",
                          "fair_play",
                          "gk_save_streak"
                        ]
                      },
                      "default": []
                    },
                    "notes_private": {
                      "oneOf": [
                        {
                          "type": "string",
                          "maxLength": 2000
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "player_id",
                    "participation",
                    "outcome",
                    "notes_private"
                  ]
                },
                "minItems": 1,
                "maxItems": 100
              }
            },
            "required": [
              "manifest_version",
              "match_id",
              "evaluations"
            ]
          },
          {
            "type": "object",
            "properties": {
              "manifest_version": {
                "type": "number",
                "enum": [
                  2
                ]
              },
              "match_id": {
                "type": "string",
                "format": "uuid"
              },
              "scope": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "schema_version": {
                        "type": "number",
                        "enum": [
                          1
                        ]
                      },
                      "kind": {
                        "type": "string",
                        "enum": [
                          "tenant"
                        ]
                      },
                      "tenant_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "league_id": {
                        "type": "null"
                      },
                      "match_id": {
                        "type": "null"
                      }
                    },
                    "required": [
                      "schema_version",
                      "kind",
                      "tenant_id",
                      "league_id",
                      "match_id"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "schema_version": {
                        "type": "number",
                        "enum": [
                          1
                        ]
                      },
                      "kind": {
                        "type": "string",
                        "enum": [
                          "league"
                        ]
                      },
                      "tenant_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "league_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "match_id": {
                        "type": "null"
                      }
                    },
                    "required": [
                      "schema_version",
                      "kind",
                      "tenant_id",
                      "league_id",
                      "match_id"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "schema_version": {
                        "type": "number",
                        "enum": [
                          1
                        ]
                      },
                      "kind": {
                        "type": "string",
                        "enum": [
                          "match"
                        ]
                      },
                      "tenant_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "league_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "match_id": {
                        "type": "string",
                        "format": "uuid"
                      }
                    },
                    "required": [
                      "schema_version",
                      "kind",
                      "tenant_id",
                      "league_id",
                      "match_id"
                    ]
                  }
                ]
              },
              "report_version_id": {
                "type": "string",
                "format": "uuid"
              },
              "participation_revision": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "ruleset": {
                "type": "object",
                "properties": {
                  "schema_version": {
                    "type": "number",
                    "enum": [
                      1
                    ]
                  },
                  "revision_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "content_hash": {
                    "type": "string",
                    "pattern": "^[0-9a-f]{64}$"
                  },
                  "provenance_label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 240
                  },
                  "signed_document": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "state": {
                            "type": "string",
                            "enum": [
                              "disabled"
                            ]
                          },
                          "reason": {
                            "type": "string",
                            "enum": [
                              "owner_input_required",
                              "provider_not_configured",
                              "bridge_not_implemented"
                            ]
                          },
                          "enabled_at": {
                            "type": "null"
                          }
                        },
                        "required": [
                          "state",
                          "reason",
                          "enabled_at"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "state": {
                            "type": "string",
                            "enum": [
                              "enabled"
                            ]
                          },
                          "configuration_revision_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "enabled_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "state",
                          "configuration_revision_id",
                          "enabled_at"
                        ]
                      }
                    ]
                  }
                },
                "required": [
                  "schema_version",
                  "revision_id",
                  "content_hash",
                  "provenance_label",
                  "signed_document"
                ]
              },
              "evaluation_ruleset": {
                "type": "object",
                "properties": {
                  "schema_version": {
                    "type": "number",
                    "enum": [
                      1
                    ]
                  },
                  "tenant_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "scope": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "tenant"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "null"
                          },
                          "match_id": {
                            "type": "null"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "league"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "match_id": {
                            "type": "null"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "match"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "match_id": {
                            "type": "string",
                            "format": "uuid"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      }
                    ]
                  },
                  "ruleset": {
                    "type": "object",
                    "properties": {
                      "schema_version": {
                        "type": "number",
                        "enum": [
                          1
                        ]
                      },
                      "revision_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "content_hash": {
                        "type": "string",
                        "pattern": "^[0-9a-f]{64}$"
                      },
                      "provenance_label": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 240
                      },
                      "signed_document": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "state": {
                                "type": "string",
                                "enum": [
                                  "disabled"
                                ]
                              },
                              "reason": {
                                "type": "string",
                                "enum": [
                                  "owner_input_required",
                                  "provider_not_configured",
                                  "bridge_not_implemented"
                                ]
                              },
                              "enabled_at": {
                                "type": "null"
                              }
                            },
                            "required": [
                              "state",
                              "reason",
                              "enabled_at"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "state": {
                                "type": "string",
                                "enum": [
                                  "enabled"
                                ]
                              },
                              "configuration_revision_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "enabled_at": {
                                "type": "string",
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "state",
                              "configuration_revision_id",
                              "enabled_at"
                            ]
                          }
                        ]
                      }
                    },
                    "required": [
                      "schema_version",
                      "revision_id",
                      "content_hash",
                      "provenance_label",
                      "signed_document"
                    ]
                  },
                  "scale": {
                    "type": "object",
                    "properties": {
                      "minimum": {
                        "type": "number"
                      },
                      "maximum": {
                        "type": "number"
                      },
                      "step": {
                        "type": "number",
                        "exclusiveMinimum": 0
                      },
                      "neutral": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "minimum",
                      "maximum",
                      "step",
                      "neutral"
                    ]
                  },
                  "no_grade_reasons": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 120
                        },
                        "label": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 240
                        }
                      },
                      "required": [
                        "code",
                        "label"
                      ]
                    }
                  },
                  "rubric": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "number"
                        },
                        "label": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 120
                        },
                        "description": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 1000
                        }
                      },
                      "required": [
                        "value",
                        "label",
                        "description"
                      ]
                    }
                  },
                  "performance_tags": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 120
                        },
                        "label": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 120
                        },
                        "description": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 500
                        },
                        "max_per_match": {
                          "oneOf": [
                            {
                              "type": "integer",
                              "exclusiveMinimum": 0
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "label",
                        "description",
                        "max_per_match"
                      ]
                    }
                  },
                  "mvp": {
                    "type": "object",
                    "properties": {
                      "required": {
                        "type": "boolean"
                      },
                      "allow_none": {
                        "type": "boolean"
                      },
                      "max_selections": {
                        "type": "integer",
                        "exclusiveMinimum": 0
                      }
                    },
                    "required": [
                      "required",
                      "allow_none",
                      "max_selections"
                    ]
                  },
                  "shared_definitions": {
                    "type": "string",
                    "maxLength": 4000
                  }
                },
                "required": [
                  "schema_version",
                  "tenant_id",
                  "scope",
                  "ruleset",
                  "scale",
                  "no_grade_reasons",
                  "rubric",
                  "performance_tags",
                  "mvp"
                ]
              },
              "finality": {
                "type": "string",
                "enum": [
                  "ratings_and_mvp"
                ]
              },
              "mvp_player_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "evaluations": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "player_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "participation": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "status": {
                              "type": "string",
                              "enum": [
                                "not_listed"
                              ]
                            },
                            "lineup_entry_id": {
                              "type": "null"
                            },
                            "player_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "in_lineup": {
                              "type": "boolean",
                              "enum": [
                                false
                              ]
                            },
                            "starting": {
                              "type": "boolean",
                              "enum": [
                                false
                              ]
                            },
                            "entered": {
                              "type": "boolean",
                              "enum": [
                                false
                              ]
                            },
                            "minutes_played": {
                              "type": "number",
                              "enum": [
                                0
                              ]
                            },
                            "intervals": {
                              "type": "array",
                              "prefixItems": []
                            }
                          },
                          "required": [
                            "status",
                            "lineup_entry_id",
                            "player_id",
                            "in_lineup",
                            "starting",
                            "entered",
                            "minutes_played",
                            "intervals"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "lineup_entry_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "player_id": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "in_lineup": {
                              "type": "boolean",
                              "enum": [
                                true
                              ]
                            },
                            "minutes_played": {
                              "oneOf": [
                                {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "intervals": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "entered_at": {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "period"
                                        ]
                                      },
                                      "period": {
                                        "oneOf": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "kind": {
                                                "type": "string",
                                                "enum": [
                                                  "regulation"
                                                ]
                                              },
                                              "number": {
                                                "type": "integer",
                                                "minimum": 1,
                                                "maximum": 4
                                              }
                                            },
                                            "required": [
                                              "kind",
                                              "number"
                                            ]
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "kind": {
                                                "type": "string",
                                                "enum": [
                                                  "extra_time"
                                                ]
                                              },
                                              "number": {
                                                "type": "integer",
                                                "minimum": 1,
                                                "maximum": 2
                                              }
                                            },
                                            "required": [
                                              "kind",
                                              "number"
                                            ]
                                          }
                                        ]
                                      },
                                      "minute": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "stoppage_minute": {
                                        "type": "integer",
                                        "minimum": 0
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "period",
                                      "minute",
                                      "stoppage_minute"
                                    ]
                                  },
                                  "left_at": {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "kind": {
                                            "type": "string",
                                            "enum": [
                                              "period"
                                            ]
                                          },
                                          "period": {
                                            "oneOf": [
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "kind": {
                                                    "type": "string",
                                                    "enum": [
                                                      "regulation"
                                                    ]
                                                  },
                                                  "number": {
                                                    "type": "integer",
                                                    "minimum": 1,
                                                    "maximum": 4
                                                  }
                                                },
                                                "required": [
                                                  "kind",
                                                  "number"
                                                ]
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "kind": {
                                                    "type": "string",
                                                    "enum": [
                                                      "extra_time"
                                                    ]
                                                  },
                                                  "number": {
                                                    "type": "integer",
                                                    "minimum": 1,
                                                    "maximum": 2
                                                  }
                                                },
                                                "required": [
                                                  "kind",
                                                  "number"
                                                ]
                                              }
                                            ]
                                          },
                                          "minute": {
                                            "type": "integer",
                                            "minimum": 0
                                          },
                                          "stoppage_minute": {
                                            "type": "integer",
                                            "minimum": 0
                                          }
                                        },
                                        "required": [
                                          "kind",
                                          "period",
                                          "minute",
                                          "stoppage_minute"
                                        ]
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "entered_at",
                                  "left_at"
                                ]
                              }
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "starter"
                              ]
                            },
                            "starting": {
                              "type": "boolean",
                              "enum": [
                                true
                              ]
                            },
                            "entered": {
                              "type": "boolean",
                              "enum": [
                                true
                              ]
                            }
                          },
                          "required": [
                            "lineup_entry_id",
                            "player_id",
                            "in_lineup",
                            "minutes_played",
                            "intervals",
                            "status",
                            "starting",
                            "entered"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "lineup_entry_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "player_id": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "in_lineup": {
                              "type": "boolean",
                              "enum": [
                                true
                              ]
                            },
                            "minutes_played": {
                              "oneOf": [
                                {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "intervals": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "entered_at": {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "period"
                                        ]
                                      },
                                      "period": {
                                        "oneOf": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "kind": {
                                                "type": "string",
                                                "enum": [
                                                  "regulation"
                                                ]
                                              },
                                              "number": {
                                                "type": "integer",
                                                "minimum": 1,
                                                "maximum": 4
                                              }
                                            },
                                            "required": [
                                              "kind",
                                              "number"
                                            ]
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "kind": {
                                                "type": "string",
                                                "enum": [
                                                  "extra_time"
                                                ]
                                              },
                                              "number": {
                                                "type": "integer",
                                                "minimum": 1,
                                                "maximum": 2
                                              }
                                            },
                                            "required": [
                                              "kind",
                                              "number"
                                            ]
                                          }
                                        ]
                                      },
                                      "minute": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "stoppage_minute": {
                                        "type": "integer",
                                        "minimum": 0
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "period",
                                      "minute",
                                      "stoppage_minute"
                                    ]
                                  },
                                  "left_at": {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "kind": {
                                            "type": "string",
                                            "enum": [
                                              "period"
                                            ]
                                          },
                                          "period": {
                                            "oneOf": [
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "kind": {
                                                    "type": "string",
                                                    "enum": [
                                                      "regulation"
                                                    ]
                                                  },
                                                  "number": {
                                                    "type": "integer",
                                                    "minimum": 1,
                                                    "maximum": 4
                                                  }
                                                },
                                                "required": [
                                                  "kind",
                                                  "number"
                                                ]
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "kind": {
                                                    "type": "string",
                                                    "enum": [
                                                      "extra_time"
                                                    ]
                                                  },
                                                  "number": {
                                                    "type": "integer",
                                                    "minimum": 1,
                                                    "maximum": 2
                                                  }
                                                },
                                                "required": [
                                                  "kind",
                                                  "number"
                                                ]
                                              }
                                            ]
                                          },
                                          "minute": {
                                            "type": "integer",
                                            "minimum": 0
                                          },
                                          "stoppage_minute": {
                                            "type": "integer",
                                            "minimum": 0
                                          }
                                        },
                                        "required": [
                                          "kind",
                                          "period",
                                          "minute",
                                          "stoppage_minute"
                                        ]
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "entered_at",
                                  "left_at"
                                ]
                              }
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "substitute_entered"
                              ]
                            },
                            "starting": {
                              "type": "boolean",
                              "enum": [
                                false
                              ]
                            },
                            "entered": {
                              "type": "boolean",
                              "enum": [
                                true
                              ]
                            }
                          },
                          "required": [
                            "lineup_entry_id",
                            "player_id",
                            "in_lineup",
                            "minutes_played",
                            "intervals",
                            "status",
                            "starting",
                            "entered"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "lineup_entry_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "player_id": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "in_lineup": {
                              "type": "boolean",
                              "enum": [
                                true
                              ]
                            },
                            "minutes_played": {
                              "type": "number",
                              "enum": [
                                0
                              ]
                            },
                            "intervals": {
                              "type": "array",
                              "prefixItems": []
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "substitute_not_entered"
                              ]
                            },
                            "starting": {
                              "type": "boolean",
                              "enum": [
                                false
                              ]
                            },
                            "entered": {
                              "type": "boolean",
                              "enum": [
                                false
                              ]
                            }
                          },
                          "required": [
                            "lineup_entry_id",
                            "player_id",
                            "in_lineup",
                            "minutes_played",
                            "intervals",
                            "status",
                            "starting",
                            "entered"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "lineup_entry_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "player_id": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "in_lineup": {
                              "type": "boolean",
                              "enum": [
                                true
                              ]
                            },
                            "minutes_played": {
                              "type": "null"
                            },
                            "intervals": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "entered_at": {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "period"
                                        ]
                                      },
                                      "period": {
                                        "oneOf": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "kind": {
                                                "type": "string",
                                                "enum": [
                                                  "regulation"
                                                ]
                                              },
                                              "number": {
                                                "type": "integer",
                                                "minimum": 1,
                                                "maximum": 4
                                              }
                                            },
                                            "required": [
                                              "kind",
                                              "number"
                                            ]
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "kind": {
                                                "type": "string",
                                                "enum": [
                                                  "extra_time"
                                                ]
                                              },
                                              "number": {
                                                "type": "integer",
                                                "minimum": 1,
                                                "maximum": 2
                                              }
                                            },
                                            "required": [
                                              "kind",
                                              "number"
                                            ]
                                          }
                                        ]
                                      },
                                      "minute": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "stoppage_minute": {
                                        "type": "integer",
                                        "minimum": 0
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "period",
                                      "minute",
                                      "stoppage_minute"
                                    ]
                                  },
                                  "left_at": {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "kind": {
                                            "type": "string",
                                            "enum": [
                                              "period"
                                            ]
                                          },
                                          "period": {
                                            "oneOf": [
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "kind": {
                                                    "type": "string",
                                                    "enum": [
                                                      "regulation"
                                                    ]
                                                  },
                                                  "number": {
                                                    "type": "integer",
                                                    "minimum": 1,
                                                    "maximum": 4
                                                  }
                                                },
                                                "required": [
                                                  "kind",
                                                  "number"
                                                ]
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "kind": {
                                                    "type": "string",
                                                    "enum": [
                                                      "extra_time"
                                                    ]
                                                  },
                                                  "number": {
                                                    "type": "integer",
                                                    "minimum": 1,
                                                    "maximum": 2
                                                  }
                                                },
                                                "required": [
                                                  "kind",
                                                  "number"
                                                ]
                                              }
                                            ]
                                          },
                                          "minute": {
                                            "type": "integer",
                                            "minimum": 0
                                          },
                                          "stoppage_minute": {
                                            "type": "integer",
                                            "minimum": 0
                                          }
                                        },
                                        "required": [
                                          "kind",
                                          "period",
                                          "minute",
                                          "stoppage_minute"
                                        ]
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "entered_at",
                                  "left_at"
                                ]
                              }
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "not_verifiable"
                              ]
                            },
                            "starting": {
                              "type": "boolean"
                            },
                            "entered": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "lineup_entry_id",
                            "player_id",
                            "in_lineup",
                            "minutes_played",
                            "intervals",
                            "status",
                            "starting",
                            "entered"
                          ]
                        }
                      ]
                    },
                    "outcome": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "graded"
                              ]
                            },
                            "value": {
                              "type": "number",
                              "minimum": 1,
                              "maximum": 10
                            }
                          },
                          "required": [
                            "kind",
                            "value"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "no_grade"
                              ]
                            },
                            "reason": {
                              "type": "string",
                              "enum": [
                                "not_entered",
                                "not_listed",
                                "insufficient_observation",
                                "match_not_played",
                                "not_verifiable"
                              ]
                            }
                          },
                          "required": [
                            "kind",
                            "reason"
                          ]
                        }
                      ]
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "mvp_candidate",
                          "clutch_goal",
                          "defensive_wall",
                          "creator",
                          "discipline_issue",
                          "fair_play",
                          "gk_save_streak"
                        ]
                      },
                      "default": []
                    },
                    "notes_private": {
                      "oneOf": [
                        {
                          "type": "string",
                          "maxLength": 2000
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "player_id",
                    "participation",
                    "outcome",
                    "notes_private"
                  ]
                },
                "minItems": 1,
                "maxItems": 100
              }
            },
            "required": [
              "manifest_version",
              "match_id",
              "scope",
              "report_version_id",
              "participation_revision",
              "ruleset",
              "evaluation_ruleset",
              "finality",
              "mvp_player_id",
              "evaluations"
            ]
          }
        ]
      },
      "EvaluatorRatingBatchSubmitRequest": {
        "type": "object",
        "properties": {
          "idempotency_key": {
            "type": "string",
            "minLength": 8,
            "maxLength": 200
          },
          "manifest": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "manifest_version": {
                    "type": "number",
                    "enum": [
                      1
                    ]
                  },
                  "match_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "evaluations": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "player_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "participation": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "not_listed"
                                  ]
                                },
                                "lineup_entry_id": {
                                  "type": "null"
                                },
                                "player_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "in_lineup": {
                                  "type": "boolean",
                                  "enum": [
                                    false
                                  ]
                                },
                                "starting": {
                                  "type": "boolean",
                                  "enum": [
                                    false
                                  ]
                                },
                                "entered": {
                                  "type": "boolean",
                                  "enum": [
                                    false
                                  ]
                                },
                                "minutes_played": {
                                  "type": "number",
                                  "enum": [
                                    0
                                  ]
                                },
                                "intervals": {
                                  "type": "array",
                                  "prefixItems": []
                                }
                              },
                              "required": [
                                "status",
                                "lineup_entry_id",
                                "player_id",
                                "in_lineup",
                                "starting",
                                "entered",
                                "minutes_played",
                                "intervals"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "lineup_entry_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "player_id": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "in_lineup": {
                                  "type": "boolean",
                                  "enum": [
                                    true
                                  ]
                                },
                                "minutes_played": {
                                  "oneOf": [
                                    {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "intervals": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "entered_at": {
                                        "type": "object",
                                        "properties": {
                                          "kind": {
                                            "type": "string",
                                            "enum": [
                                              "period"
                                            ]
                                          },
                                          "period": {
                                            "oneOf": [
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "kind": {
                                                    "type": "string",
                                                    "enum": [
                                                      "regulation"
                                                    ]
                                                  },
                                                  "number": {
                                                    "type": "integer",
                                                    "minimum": 1,
                                                    "maximum": 4
                                                  }
                                                },
                                                "required": [
                                                  "kind",
                                                  "number"
                                                ]
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "kind": {
                                                    "type": "string",
                                                    "enum": [
                                                      "extra_time"
                                                    ]
                                                  },
                                                  "number": {
                                                    "type": "integer",
                                                    "minimum": 1,
                                                    "maximum": 2
                                                  }
                                                },
                                                "required": [
                                                  "kind",
                                                  "number"
                                                ]
                                              }
                                            ]
                                          },
                                          "minute": {
                                            "type": "integer",
                                            "minimum": 0
                                          },
                                          "stoppage_minute": {
                                            "type": "integer",
                                            "minimum": 0
                                          }
                                        },
                                        "required": [
                                          "kind",
                                          "period",
                                          "minute",
                                          "stoppage_minute"
                                        ]
                                      },
                                      "left_at": {
                                        "oneOf": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "kind": {
                                                "type": "string",
                                                "enum": [
                                                  "period"
                                                ]
                                              },
                                              "period": {
                                                "oneOf": [
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "kind": {
                                                        "type": "string",
                                                        "enum": [
                                                          "regulation"
                                                        ]
                                                      },
                                                      "number": {
                                                        "type": "integer",
                                                        "minimum": 1,
                                                        "maximum": 4
                                                      }
                                                    },
                                                    "required": [
                                                      "kind",
                                                      "number"
                                                    ]
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "kind": {
                                                        "type": "string",
                                                        "enum": [
                                                          "extra_time"
                                                        ]
                                                      },
                                                      "number": {
                                                        "type": "integer",
                                                        "minimum": 1,
                                                        "maximum": 2
                                                      }
                                                    },
                                                    "required": [
                                                      "kind",
                                                      "number"
                                                    ]
                                                  }
                                                ]
                                              },
                                              "minute": {
                                                "type": "integer",
                                                "minimum": 0
                                              },
                                              "stoppage_minute": {
                                                "type": "integer",
                                                "minimum": 0
                                              }
                                            },
                                            "required": [
                                              "kind",
                                              "period",
                                              "minute",
                                              "stoppage_minute"
                                            ]
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "entered_at",
                                      "left_at"
                                    ]
                                  }
                                },
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "starter"
                                  ]
                                },
                                "starting": {
                                  "type": "boolean",
                                  "enum": [
                                    true
                                  ]
                                },
                                "entered": {
                                  "type": "boolean",
                                  "enum": [
                                    true
                                  ]
                                }
                              },
                              "required": [
                                "lineup_entry_id",
                                "player_id",
                                "in_lineup",
                                "minutes_played",
                                "intervals",
                                "status",
                                "starting",
                                "entered"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "lineup_entry_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "player_id": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "in_lineup": {
                                  "type": "boolean",
                                  "enum": [
                                    true
                                  ]
                                },
                                "minutes_played": {
                                  "oneOf": [
                                    {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "intervals": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "entered_at": {
                                        "type": "object",
                                        "properties": {
                                          "kind": {
                                            "type": "string",
                                            "enum": [
                                              "period"
                                            ]
                                          },
                                          "period": {
                                            "oneOf": [
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "kind": {
                                                    "type": "string",
                                                    "enum": [
                                                      "regulation"
                                                    ]
                                                  },
                                                  "number": {
                                                    "type": "integer",
                                                    "minimum": 1,
                                                    "maximum": 4
                                                  }
                                                },
                                                "required": [
                                                  "kind",
                                                  "number"
                                                ]
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "kind": {
                                                    "type": "string",
                                                    "enum": [
                                                      "extra_time"
                                                    ]
                                                  },
                                                  "number": {
                                                    "type": "integer",
                                                    "minimum": 1,
                                                    "maximum": 2
                                                  }
                                                },
                                                "required": [
                                                  "kind",
                                                  "number"
                                                ]
                                              }
                                            ]
                                          },
                                          "minute": {
                                            "type": "integer",
                                            "minimum": 0
                                          },
                                          "stoppage_minute": {
                                            "type": "integer",
                                            "minimum": 0
                                          }
                                        },
                                        "required": [
                                          "kind",
                                          "period",
                                          "minute",
                                          "stoppage_minute"
                                        ]
                                      },
                                      "left_at": {
                                        "oneOf": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "kind": {
                                                "type": "string",
                                                "enum": [
                                                  "period"
                                                ]
                                              },
                                              "period": {
                                                "oneOf": [
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "kind": {
                                                        "type": "string",
                                                        "enum": [
                                                          "regulation"
                                                        ]
                                                      },
                                                      "number": {
                                                        "type": "integer",
                                                        "minimum": 1,
                                                        "maximum": 4
                                                      }
                                                    },
                                                    "required": [
                                                      "kind",
                                                      "number"
                                                    ]
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "kind": {
                                                        "type": "string",
                                                        "enum": [
                                                          "extra_time"
                                                        ]
                                                      },
                                                      "number": {
                                                        "type": "integer",
                                                        "minimum": 1,
                                                        "maximum": 2
                                                      }
                                                    },
                                                    "required": [
                                                      "kind",
                                                      "number"
                                                    ]
                                                  }
                                                ]
                                              },
                                              "minute": {
                                                "type": "integer",
                                                "minimum": 0
                                              },
                                              "stoppage_minute": {
                                                "type": "integer",
                                                "minimum": 0
                                              }
                                            },
                                            "required": [
                                              "kind",
                                              "period",
                                              "minute",
                                              "stoppage_minute"
                                            ]
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "entered_at",
                                      "left_at"
                                    ]
                                  }
                                },
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "substitute_entered"
                                  ]
                                },
                                "starting": {
                                  "type": "boolean",
                                  "enum": [
                                    false
                                  ]
                                },
                                "entered": {
                                  "type": "boolean",
                                  "enum": [
                                    true
                                  ]
                                }
                              },
                              "required": [
                                "lineup_entry_id",
                                "player_id",
                                "in_lineup",
                                "minutes_played",
                                "intervals",
                                "status",
                                "starting",
                                "entered"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "lineup_entry_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "player_id": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "in_lineup": {
                                  "type": "boolean",
                                  "enum": [
                                    true
                                  ]
                                },
                                "minutes_played": {
                                  "type": "number",
                                  "enum": [
                                    0
                                  ]
                                },
                                "intervals": {
                                  "type": "array",
                                  "prefixItems": []
                                },
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "substitute_not_entered"
                                  ]
                                },
                                "starting": {
                                  "type": "boolean",
                                  "enum": [
                                    false
                                  ]
                                },
                                "entered": {
                                  "type": "boolean",
                                  "enum": [
                                    false
                                  ]
                                }
                              },
                              "required": [
                                "lineup_entry_id",
                                "player_id",
                                "in_lineup",
                                "minutes_played",
                                "intervals",
                                "status",
                                "starting",
                                "entered"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "lineup_entry_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "player_id": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "in_lineup": {
                                  "type": "boolean",
                                  "enum": [
                                    true
                                  ]
                                },
                                "minutes_played": {
                                  "type": "null"
                                },
                                "intervals": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "entered_at": {
                                        "type": "object",
                                        "properties": {
                                          "kind": {
                                            "type": "string",
                                            "enum": [
                                              "period"
                                            ]
                                          },
                                          "period": {
                                            "oneOf": [
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "kind": {
                                                    "type": "string",
                                                    "enum": [
                                                      "regulation"
                                                    ]
                                                  },
                                                  "number": {
                                                    "type": "integer",
                                                    "minimum": 1,
                                                    "maximum": 4
                                                  }
                                                },
                                                "required": [
                                                  "kind",
                                                  "number"
                                                ]
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "kind": {
                                                    "type": "string",
                                                    "enum": [
                                                      "extra_time"
                                                    ]
                                                  },
                                                  "number": {
                                                    "type": "integer",
                                                    "minimum": 1,
                                                    "maximum": 2
                                                  }
                                                },
                                                "required": [
                                                  "kind",
                                                  "number"
                                                ]
                                              }
                                            ]
                                          },
                                          "minute": {
                                            "type": "integer",
                                            "minimum": 0
                                          },
                                          "stoppage_minute": {
                                            "type": "integer",
                                            "minimum": 0
                                          }
                                        },
                                        "required": [
                                          "kind",
                                          "period",
                                          "minute",
                                          "stoppage_minute"
                                        ]
                                      },
                                      "left_at": {
                                        "oneOf": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "kind": {
                                                "type": "string",
                                                "enum": [
                                                  "period"
                                                ]
                                              },
                                              "period": {
                                                "oneOf": [
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "kind": {
                                                        "type": "string",
                                                        "enum": [
                                                          "regulation"
                                                        ]
                                                      },
                                                      "number": {
                                                        "type": "integer",
                                                        "minimum": 1,
                                                        "maximum": 4
                                                      }
                                                    },
                                                    "required": [
                                                      "kind",
                                                      "number"
                                                    ]
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "kind": {
                                                        "type": "string",
                                                        "enum": [
                                                          "extra_time"
                                                        ]
                                                      },
                                                      "number": {
                                                        "type": "integer",
                                                        "minimum": 1,
                                                        "maximum": 2
                                                      }
                                                    },
                                                    "required": [
                                                      "kind",
                                                      "number"
                                                    ]
                                                  }
                                                ]
                                              },
                                              "minute": {
                                                "type": "integer",
                                                "minimum": 0
                                              },
                                              "stoppage_minute": {
                                                "type": "integer",
                                                "minimum": 0
                                              }
                                            },
                                            "required": [
                                              "kind",
                                              "period",
                                              "minute",
                                              "stoppage_minute"
                                            ]
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "entered_at",
                                      "left_at"
                                    ]
                                  }
                                },
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "not_verifiable"
                                  ]
                                },
                                "starting": {
                                  "type": "boolean"
                                },
                                "entered": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "lineup_entry_id",
                                "player_id",
                                "in_lineup",
                                "minutes_played",
                                "intervals",
                                "status",
                                "starting",
                                "entered"
                              ]
                            }
                          ]
                        },
                        "outcome": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "graded"
                                  ]
                                },
                                "value": {
                                  "type": "number",
                                  "minimum": 1,
                                  "maximum": 10
                                }
                              },
                              "required": [
                                "kind",
                                "value"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "no_grade"
                                  ]
                                },
                                "reason": {
                                  "type": "string",
                                  "enum": [
                                    "not_entered",
                                    "not_listed",
                                    "insufficient_observation",
                                    "match_not_played",
                                    "not_verifiable"
                                  ]
                                }
                              },
                              "required": [
                                "kind",
                                "reason"
                              ]
                            }
                          ]
                        },
                        "tags": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "mvp_candidate",
                              "clutch_goal",
                              "defensive_wall",
                              "creator",
                              "discipline_issue",
                              "fair_play",
                              "gk_save_streak"
                            ]
                          },
                          "default": []
                        },
                        "notes_private": {
                          "oneOf": [
                            {
                              "type": "string",
                              "maxLength": 2000
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "player_id",
                        "participation",
                        "outcome",
                        "notes_private"
                      ]
                    },
                    "minItems": 1,
                    "maxItems": 100
                  }
                },
                "required": [
                  "manifest_version",
                  "match_id",
                  "evaluations"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "manifest_version": {
                    "type": "number",
                    "enum": [
                      2
                    ]
                  },
                  "match_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "scope": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "tenant"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "null"
                          },
                          "match_id": {
                            "type": "null"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "league"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "match_id": {
                            "type": "null"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "match"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "match_id": {
                            "type": "string",
                            "format": "uuid"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      }
                    ]
                  },
                  "report_version_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "participation_revision": {
                    "type": "integer",
                    "exclusiveMinimum": 0
                  },
                  "ruleset": {
                    "type": "object",
                    "properties": {
                      "schema_version": {
                        "type": "number",
                        "enum": [
                          1
                        ]
                      },
                      "revision_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "content_hash": {
                        "type": "string",
                        "pattern": "^[0-9a-f]{64}$"
                      },
                      "provenance_label": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 240
                      },
                      "signed_document": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "state": {
                                "type": "string",
                                "enum": [
                                  "disabled"
                                ]
                              },
                              "reason": {
                                "type": "string",
                                "enum": [
                                  "owner_input_required",
                                  "provider_not_configured",
                                  "bridge_not_implemented"
                                ]
                              },
                              "enabled_at": {
                                "type": "null"
                              }
                            },
                            "required": [
                              "state",
                              "reason",
                              "enabled_at"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "state": {
                                "type": "string",
                                "enum": [
                                  "enabled"
                                ]
                              },
                              "configuration_revision_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "enabled_at": {
                                "type": "string",
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "state",
                              "configuration_revision_id",
                              "enabled_at"
                            ]
                          }
                        ]
                      }
                    },
                    "required": [
                      "schema_version",
                      "revision_id",
                      "content_hash",
                      "provenance_label",
                      "signed_document"
                    ]
                  },
                  "evaluation_ruleset": {
                    "type": "object",
                    "properties": {
                      "schema_version": {
                        "type": "number",
                        "enum": [
                          1
                        ]
                      },
                      "tenant_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "scope": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "schema_version": {
                                "type": "number",
                                "enum": [
                                  1
                                ]
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "tenant"
                                ]
                              },
                              "tenant_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "league_id": {
                                "type": "null"
                              },
                              "match_id": {
                                "type": "null"
                              }
                            },
                            "required": [
                              "schema_version",
                              "kind",
                              "tenant_id",
                              "league_id",
                              "match_id"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "schema_version": {
                                "type": "number",
                                "enum": [
                                  1
                                ]
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "league"
                                ]
                              },
                              "tenant_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "league_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "match_id": {
                                "type": "null"
                              }
                            },
                            "required": [
                              "schema_version",
                              "kind",
                              "tenant_id",
                              "league_id",
                              "match_id"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "schema_version": {
                                "type": "number",
                                "enum": [
                                  1
                                ]
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "match"
                                ]
                              },
                              "tenant_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "league_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "match_id": {
                                "type": "string",
                                "format": "uuid"
                              }
                            },
                            "required": [
                              "schema_version",
                              "kind",
                              "tenant_id",
                              "league_id",
                              "match_id"
                            ]
                          }
                        ]
                      },
                      "ruleset": {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "revision_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "content_hash": {
                            "type": "string",
                            "pattern": "^[0-9a-f]{64}$"
                          },
                          "provenance_label": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 240
                          },
                          "signed_document": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "disabled"
                                    ]
                                  },
                                  "reason": {
                                    "type": "string",
                                    "enum": [
                                      "owner_input_required",
                                      "provider_not_configured",
                                      "bridge_not_implemented"
                                    ]
                                  },
                                  "enabled_at": {
                                    "type": "null"
                                  }
                                },
                                "required": [
                                  "state",
                                  "reason",
                                  "enabled_at"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "enabled"
                                    ]
                                  },
                                  "configuration_revision_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "enabled_at": {
                                    "type": "string",
                                    "format": "date-time"
                                  }
                                },
                                "required": [
                                  "state",
                                  "configuration_revision_id",
                                  "enabled_at"
                                ]
                              }
                            ]
                          }
                        },
                        "required": [
                          "schema_version",
                          "revision_id",
                          "content_hash",
                          "provenance_label",
                          "signed_document"
                        ]
                      },
                      "scale": {
                        "type": "object",
                        "properties": {
                          "minimum": {
                            "type": "number"
                          },
                          "maximum": {
                            "type": "number"
                          },
                          "step": {
                            "type": "number",
                            "exclusiveMinimum": 0
                          },
                          "neutral": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "minimum",
                          "maximum",
                          "step",
                          "neutral"
                        ]
                      },
                      "no_grade_reasons": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "label": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 240
                            }
                          },
                          "required": [
                            "code",
                            "label"
                          ]
                        }
                      },
                      "rubric": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "value": {
                              "type": "number"
                            },
                            "label": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "description": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 1000
                            }
                          },
                          "required": [
                            "value",
                            "label",
                            "description"
                          ]
                        }
                      },
                      "performance_tags": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "label": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "description": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 500
                            },
                            "max_per_match": {
                              "oneOf": [
                                {
                                  "type": "integer",
                                  "exclusiveMinimum": 0
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "label",
                            "description",
                            "max_per_match"
                          ]
                        }
                      },
                      "mvp": {
                        "type": "object",
                        "properties": {
                          "required": {
                            "type": "boolean"
                          },
                          "allow_none": {
                            "type": "boolean"
                          },
                          "max_selections": {
                            "type": "integer",
                            "exclusiveMinimum": 0
                          }
                        },
                        "required": [
                          "required",
                          "allow_none",
                          "max_selections"
                        ]
                      },
                      "shared_definitions": {
                        "type": "string",
                        "maxLength": 4000
                      }
                    },
                    "required": [
                      "schema_version",
                      "tenant_id",
                      "scope",
                      "ruleset",
                      "scale",
                      "no_grade_reasons",
                      "rubric",
                      "performance_tags",
                      "mvp"
                    ]
                  },
                  "finality": {
                    "type": "string",
                    "enum": [
                      "ratings_and_mvp"
                    ]
                  },
                  "mvp_player_id": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "evaluations": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "player_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "participation": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "not_listed"
                                  ]
                                },
                                "lineup_entry_id": {
                                  "type": "null"
                                },
                                "player_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "in_lineup": {
                                  "type": "boolean",
                                  "enum": [
                                    false
                                  ]
                                },
                                "starting": {
                                  "type": "boolean",
                                  "enum": [
                                    false
                                  ]
                                },
                                "entered": {
                                  "type": "boolean",
                                  "enum": [
                                    false
                                  ]
                                },
                                "minutes_played": {
                                  "type": "number",
                                  "enum": [
                                    0
                                  ]
                                },
                                "intervals": {
                                  "type": "array",
                                  "prefixItems": []
                                }
                              },
                              "required": [
                                "status",
                                "lineup_entry_id",
                                "player_id",
                                "in_lineup",
                                "starting",
                                "entered",
                                "minutes_played",
                                "intervals"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "lineup_entry_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "player_id": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "in_lineup": {
                                  "type": "boolean",
                                  "enum": [
                                    true
                                  ]
                                },
                                "minutes_played": {
                                  "oneOf": [
                                    {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "intervals": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "entered_at": {
                                        "type": "object",
                                        "properties": {
                                          "kind": {
                                            "type": "string",
                                            "enum": [
                                              "period"
                                            ]
                                          },
                                          "period": {
                                            "oneOf": [
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "kind": {
                                                    "type": "string",
                                                    "enum": [
                                                      "regulation"
                                                    ]
                                                  },
                                                  "number": {
                                                    "type": "integer",
                                                    "minimum": 1,
                                                    "maximum": 4
                                                  }
                                                },
                                                "required": [
                                                  "kind",
                                                  "number"
                                                ]
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "kind": {
                                                    "type": "string",
                                                    "enum": [
                                                      "extra_time"
                                                    ]
                                                  },
                                                  "number": {
                                                    "type": "integer",
                                                    "minimum": 1,
                                                    "maximum": 2
                                                  }
                                                },
                                                "required": [
                                                  "kind",
                                                  "number"
                                                ]
                                              }
                                            ]
                                          },
                                          "minute": {
                                            "type": "integer",
                                            "minimum": 0
                                          },
                                          "stoppage_minute": {
                                            "type": "integer",
                                            "minimum": 0
                                          }
                                        },
                                        "required": [
                                          "kind",
                                          "period",
                                          "minute",
                                          "stoppage_minute"
                                        ]
                                      },
                                      "left_at": {
                                        "oneOf": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "kind": {
                                                "type": "string",
                                                "enum": [
                                                  "period"
                                                ]
                                              },
                                              "period": {
                                                "oneOf": [
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "kind": {
                                                        "type": "string",
                                                        "enum": [
                                                          "regulation"
                                                        ]
                                                      },
                                                      "number": {
                                                        "type": "integer",
                                                        "minimum": 1,
                                                        "maximum": 4
                                                      }
                                                    },
                                                    "required": [
                                                      "kind",
                                                      "number"
                                                    ]
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "kind": {
                                                        "type": "string",
                                                        "enum": [
                                                          "extra_time"
                                                        ]
                                                      },
                                                      "number": {
                                                        "type": "integer",
                                                        "minimum": 1,
                                                        "maximum": 2
                                                      }
                                                    },
                                                    "required": [
                                                      "kind",
                                                      "number"
                                                    ]
                                                  }
                                                ]
                                              },
                                              "minute": {
                                                "type": "integer",
                                                "minimum": 0
                                              },
                                              "stoppage_minute": {
                                                "type": "integer",
                                                "minimum": 0
                                              }
                                            },
                                            "required": [
                                              "kind",
                                              "period",
                                              "minute",
                                              "stoppage_minute"
                                            ]
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "entered_at",
                                      "left_at"
                                    ]
                                  }
                                },
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "starter"
                                  ]
                                },
                                "starting": {
                                  "type": "boolean",
                                  "enum": [
                                    true
                                  ]
                                },
                                "entered": {
                                  "type": "boolean",
                                  "enum": [
                                    true
                                  ]
                                }
                              },
                              "required": [
                                "lineup_entry_id",
                                "player_id",
                                "in_lineup",
                                "minutes_played",
                                "intervals",
                                "status",
                                "starting",
                                "entered"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "lineup_entry_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "player_id": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "in_lineup": {
                                  "type": "boolean",
                                  "enum": [
                                    true
                                  ]
                                },
                                "minutes_played": {
                                  "oneOf": [
                                    {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "intervals": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "entered_at": {
                                        "type": "object",
                                        "properties": {
                                          "kind": {
                                            "type": "string",
                                            "enum": [
                                              "period"
                                            ]
                                          },
                                          "period": {
                                            "oneOf": [
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "kind": {
                                                    "type": "string",
                                                    "enum": [
                                                      "regulation"
                                                    ]
                                                  },
                                                  "number": {
                                                    "type": "integer",
                                                    "minimum": 1,
                                                    "maximum": 4
                                                  }
                                                },
                                                "required": [
                                                  "kind",
                                                  "number"
                                                ]
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "kind": {
                                                    "type": "string",
                                                    "enum": [
                                                      "extra_time"
                                                    ]
                                                  },
                                                  "number": {
                                                    "type": "integer",
                                                    "minimum": 1,
                                                    "maximum": 2
                                                  }
                                                },
                                                "required": [
                                                  "kind",
                                                  "number"
                                                ]
                                              }
                                            ]
                                          },
                                          "minute": {
                                            "type": "integer",
                                            "minimum": 0
                                          },
                                          "stoppage_minute": {
                                            "type": "integer",
                                            "minimum": 0
                                          }
                                        },
                                        "required": [
                                          "kind",
                                          "period",
                                          "minute",
                                          "stoppage_minute"
                                        ]
                                      },
                                      "left_at": {
                                        "oneOf": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "kind": {
                                                "type": "string",
                                                "enum": [
                                                  "period"
                                                ]
                                              },
                                              "period": {
                                                "oneOf": [
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "kind": {
                                                        "type": "string",
                                                        "enum": [
                                                          "regulation"
                                                        ]
                                                      },
                                                      "number": {
                                                        "type": "integer",
                                                        "minimum": 1,
                                                        "maximum": 4
                                                      }
                                                    },
                                                    "required": [
                                                      "kind",
                                                      "number"
                                                    ]
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "kind": {
                                                        "type": "string",
                                                        "enum": [
                                                          "extra_time"
                                                        ]
                                                      },
                                                      "number": {
                                                        "type": "integer",
                                                        "minimum": 1,
                                                        "maximum": 2
                                                      }
                                                    },
                                                    "required": [
                                                      "kind",
                                                      "number"
                                                    ]
                                                  }
                                                ]
                                              },
                                              "minute": {
                                                "type": "integer",
                                                "minimum": 0
                                              },
                                              "stoppage_minute": {
                                                "type": "integer",
                                                "minimum": 0
                                              }
                                            },
                                            "required": [
                                              "kind",
                                              "period",
                                              "minute",
                                              "stoppage_minute"
                                            ]
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "entered_at",
                                      "left_at"
                                    ]
                                  }
                                },
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "substitute_entered"
                                  ]
                                },
                                "starting": {
                                  "type": "boolean",
                                  "enum": [
                                    false
                                  ]
                                },
                                "entered": {
                                  "type": "boolean",
                                  "enum": [
                                    true
                                  ]
                                }
                              },
                              "required": [
                                "lineup_entry_id",
                                "player_id",
                                "in_lineup",
                                "minutes_played",
                                "intervals",
                                "status",
                                "starting",
                                "entered"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "lineup_entry_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "player_id": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "in_lineup": {
                                  "type": "boolean",
                                  "enum": [
                                    true
                                  ]
                                },
                                "minutes_played": {
                                  "type": "number",
                                  "enum": [
                                    0
                                  ]
                                },
                                "intervals": {
                                  "type": "array",
                                  "prefixItems": []
                                },
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "substitute_not_entered"
                                  ]
                                },
                                "starting": {
                                  "type": "boolean",
                                  "enum": [
                                    false
                                  ]
                                },
                                "entered": {
                                  "type": "boolean",
                                  "enum": [
                                    false
                                  ]
                                }
                              },
                              "required": [
                                "lineup_entry_id",
                                "player_id",
                                "in_lineup",
                                "minutes_played",
                                "intervals",
                                "status",
                                "starting",
                                "entered"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "lineup_entry_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "player_id": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "in_lineup": {
                                  "type": "boolean",
                                  "enum": [
                                    true
                                  ]
                                },
                                "minutes_played": {
                                  "type": "null"
                                },
                                "intervals": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "entered_at": {
                                        "type": "object",
                                        "properties": {
                                          "kind": {
                                            "type": "string",
                                            "enum": [
                                              "period"
                                            ]
                                          },
                                          "period": {
                                            "oneOf": [
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "kind": {
                                                    "type": "string",
                                                    "enum": [
                                                      "regulation"
                                                    ]
                                                  },
                                                  "number": {
                                                    "type": "integer",
                                                    "minimum": 1,
                                                    "maximum": 4
                                                  }
                                                },
                                                "required": [
                                                  "kind",
                                                  "number"
                                                ]
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "kind": {
                                                    "type": "string",
                                                    "enum": [
                                                      "extra_time"
                                                    ]
                                                  },
                                                  "number": {
                                                    "type": "integer",
                                                    "minimum": 1,
                                                    "maximum": 2
                                                  }
                                                },
                                                "required": [
                                                  "kind",
                                                  "number"
                                                ]
                                              }
                                            ]
                                          },
                                          "minute": {
                                            "type": "integer",
                                            "minimum": 0
                                          },
                                          "stoppage_minute": {
                                            "type": "integer",
                                            "minimum": 0
                                          }
                                        },
                                        "required": [
                                          "kind",
                                          "period",
                                          "minute",
                                          "stoppage_minute"
                                        ]
                                      },
                                      "left_at": {
                                        "oneOf": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "kind": {
                                                "type": "string",
                                                "enum": [
                                                  "period"
                                                ]
                                              },
                                              "period": {
                                                "oneOf": [
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "kind": {
                                                        "type": "string",
                                                        "enum": [
                                                          "regulation"
                                                        ]
                                                      },
                                                      "number": {
                                                        "type": "integer",
                                                        "minimum": 1,
                                                        "maximum": 4
                                                      }
                                                    },
                                                    "required": [
                                                      "kind",
                                                      "number"
                                                    ]
                                                  },
                                                  {
                                                    "type": "object",
                                                    "properties": {
                                                      "kind": {
                                                        "type": "string",
                                                        "enum": [
                                                          "extra_time"
                                                        ]
                                                      },
                                                      "number": {
                                                        "type": "integer",
                                                        "minimum": 1,
                                                        "maximum": 2
                                                      }
                                                    },
                                                    "required": [
                                                      "kind",
                                                      "number"
                                                    ]
                                                  }
                                                ]
                                              },
                                              "minute": {
                                                "type": "integer",
                                                "minimum": 0
                                              },
                                              "stoppage_minute": {
                                                "type": "integer",
                                                "minimum": 0
                                              }
                                            },
                                            "required": [
                                              "kind",
                                              "period",
                                              "minute",
                                              "stoppage_minute"
                                            ]
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "entered_at",
                                      "left_at"
                                    ]
                                  }
                                },
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "not_verifiable"
                                  ]
                                },
                                "starting": {
                                  "type": "boolean"
                                },
                                "entered": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "lineup_entry_id",
                                "player_id",
                                "in_lineup",
                                "minutes_played",
                                "intervals",
                                "status",
                                "starting",
                                "entered"
                              ]
                            }
                          ]
                        },
                        "outcome": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "graded"
                                  ]
                                },
                                "value": {
                                  "type": "number",
                                  "minimum": 1,
                                  "maximum": 10
                                }
                              },
                              "required": [
                                "kind",
                                "value"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "no_grade"
                                  ]
                                },
                                "reason": {
                                  "type": "string",
                                  "enum": [
                                    "not_entered",
                                    "not_listed",
                                    "insufficient_observation",
                                    "match_not_played",
                                    "not_verifiable"
                                  ]
                                }
                              },
                              "required": [
                                "kind",
                                "reason"
                              ]
                            }
                          ]
                        },
                        "tags": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "mvp_candidate",
                              "clutch_goal",
                              "defensive_wall",
                              "creator",
                              "discipline_issue",
                              "fair_play",
                              "gk_save_streak"
                            ]
                          },
                          "default": []
                        },
                        "notes_private": {
                          "oneOf": [
                            {
                              "type": "string",
                              "maxLength": 2000
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "player_id",
                        "participation",
                        "outcome",
                        "notes_private"
                      ]
                    },
                    "minItems": 1,
                    "maxItems": 100
                  }
                },
                "required": [
                  "manifest_version",
                  "match_id",
                  "scope",
                  "report_version_id",
                  "participation_revision",
                  "ruleset",
                  "evaluation_ruleset",
                  "finality",
                  "mvp_player_id",
                  "evaluations"
                ]
              }
            ]
          }
        },
        "required": [
          "idempotency_key",
          "manifest"
        ]
      },
      "EvaluatorRatingBatchRowReceiptDto": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "receipt_id": {
                "type": "string",
                "format": "uuid"
              },
              "evaluation_id": {
                "type": "string",
                "format": "uuid"
              },
              "player_id": {
                "type": "string",
                "format": "uuid"
              },
              "status": {
                "type": "string",
                "enum": [
                  "accepted"
                ]
              },
              "participation_status": {
                "type": "string",
                "enum": [
                  "not_listed",
                  "starter",
                  "substitute_entered",
                  "substitute_not_entered",
                  "not_verifiable"
                ]
              },
              "minutes_played": {
                "oneOf": [
                  {
                    "type": "integer",
                    "minimum": 0
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "outcome": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "graded"
                        ]
                      },
                      "value": {
                        "type": "number",
                        "minimum": 1,
                        "maximum": 10
                      }
                    },
                    "required": [
                      "kind",
                      "value"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "no_grade"
                        ]
                      },
                      "reason": {
                        "type": "string",
                        "enum": [
                          "not_entered",
                          "not_listed",
                          "insufficient_observation",
                          "match_not_played",
                          "not_verifiable"
                        ]
                      }
                    },
                    "required": [
                      "kind",
                      "reason"
                    ]
                  }
                ]
              }
            },
            "required": [
              "receipt_id",
              "evaluation_id",
              "player_id",
              "status",
              "participation_status",
              "minutes_played",
              "outcome"
            ]
          },
          {
            "type": "object",
            "properties": {
              "receipt_id": {
                "type": "string",
                "format": "uuid"
              },
              "evaluation_id": {
                "type": "string",
                "format": "uuid"
              },
              "player_id": {
                "type": "string",
                "format": "uuid"
              },
              "status": {
                "type": "string",
                "enum": [
                  "queued",
                  "accepted",
                  "rejected",
                  "superseded"
                ]
              },
              "participation_status": {
                "type": "string",
                "enum": [
                  "not_listed",
                  "starter",
                  "substitute_entered",
                  "substitute_not_entered",
                  "not_verifiable"
                ]
              },
              "minutes_played": {
                "oneOf": [
                  {
                    "type": "integer",
                    "minimum": 0
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "outcome": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "graded"
                        ]
                      },
                      "value": {
                        "type": "number",
                        "minimum": 1,
                        "maximum": 10
                      }
                    },
                    "required": [
                      "kind",
                      "value"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "no_grade"
                        ]
                      },
                      "reason": {
                        "type": "string",
                        "enum": [
                          "not_entered",
                          "not_listed",
                          "insufficient_observation",
                          "match_not_played",
                          "not_verifiable"
                        ]
                      }
                    },
                    "required": [
                      "kind",
                      "reason"
                    ]
                  }
                ]
              },
              "receipt": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "schema_version": {
                        "type": "number",
                        "enum": [
                          1
                        ]
                      },
                      "receipt_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "entity": {
                        "type": "object",
                        "properties": {
                          "entity_type": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 120
                          },
                          "entity_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "entity_version": {
                            "oneOf": [
                              {
                                "type": "integer",
                                "minimum": 0
                              },
                              {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 200
                              }
                            ]
                          }
                        },
                        "required": [
                          "entity_type",
                          "entity_id",
                          "entity_version"
                        ]
                      },
                      "scope": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "schema_version": {
                                "type": "number",
                                "enum": [
                                  1
                                ]
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "tenant"
                                ]
                              },
                              "tenant_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "league_id": {
                                "type": "null"
                              },
                              "match_id": {
                                "type": "null"
                              }
                            },
                            "required": [
                              "schema_version",
                              "kind",
                              "tenant_id",
                              "league_id",
                              "match_id"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "schema_version": {
                                "type": "number",
                                "enum": [
                                  1
                                ]
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "league"
                                ]
                              },
                              "tenant_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "league_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "match_id": {
                                "type": "null"
                              }
                            },
                            "required": [
                              "schema_version",
                              "kind",
                              "tenant_id",
                              "league_id",
                              "match_id"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "schema_version": {
                                "type": "number",
                                "enum": [
                                  1
                                ]
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "match"
                                ]
                              },
                              "tenant_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "league_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "match_id": {
                                "type": "string",
                                "format": "uuid"
                              }
                            },
                            "required": [
                              "schema_version",
                              "kind",
                              "tenant_id",
                              "league_id",
                              "match_id"
                            ]
                          }
                        ]
                      },
                      "actor_user_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "consumers": {
                        "type": "array",
                        "items": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "consumer": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "state": {
                                  "type": "string",
                                  "enum": [
                                    "pending"
                                  ]
                                },
                                "propagated_at": {
                                  "type": "null"
                                },
                                "reason": {
                                  "type": "null"
                                }
                              },
                              "required": [
                                "consumer",
                                "state",
                                "propagated_at",
                                "reason"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "consumer": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "state": {
                                  "type": "string",
                                  "enum": [
                                    "applied"
                                  ]
                                },
                                "propagated_at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "reason": {
                                  "type": "null"
                                }
                              },
                              "required": [
                                "consumer",
                                "state",
                                "propagated_at",
                                "reason"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "consumer": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "state": {
                                  "type": "string",
                                  "enum": [
                                    "failed"
                                  ]
                                },
                                "propagated_at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "reason": {
                                  "type": "object",
                                  "properties": {
                                    "code": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 120
                                    },
                                    "message": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 1000
                                    },
                                    "retryable": {
                                      "type": "boolean"
                                    },
                                    "recovery_action": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 500
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "code",
                                    "message",
                                    "retryable",
                                    "recovery_action"
                                  ]
                                }
                              },
                              "required": [
                                "consumer",
                                "state",
                                "propagated_at",
                                "reason"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "consumer": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "state": {
                                  "type": "string",
                                  "enum": [
                                    "not_applicable"
                                  ]
                                },
                                "propagated_at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "reason": {
                                  "type": "object",
                                  "properties": {
                                    "code": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 120
                                    },
                                    "message": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 1000
                                    },
                                    "retryable": {
                                      "type": "boolean"
                                    },
                                    "recovery_action": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 500
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "code",
                                    "message",
                                    "retryable",
                                    "recovery_action"
                                  ]
                                }
                              },
                              "required": [
                                "consumer",
                                "state",
                                "propagated_at",
                                "reason"
                              ]
                            }
                          ]
                        }
                      },
                      "server_timestamp": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "correlation_id": {
                        "type": "string",
                        "minLength": 8,
                        "maxLength": 200
                      },
                      "status": {
                        "type": "string",
                        "enum": [
                          "queued"
                        ]
                      },
                      "reason": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 120
                              },
                              "message": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1000
                              },
                              "retryable": {
                                "type": "boolean"
                              },
                              "recovery_action": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 500
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "code",
                              "message",
                              "retryable",
                              "recovery_action"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "schema_version",
                      "receipt_id",
                      "entity",
                      "scope",
                      "actor_user_id",
                      "consumers",
                      "server_timestamp",
                      "correlation_id",
                      "status",
                      "reason"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "schema_version": {
                        "type": "number",
                        "enum": [
                          1
                        ]
                      },
                      "receipt_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "entity": {
                        "type": "object",
                        "properties": {
                          "entity_type": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 120
                          },
                          "entity_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "entity_version": {
                            "oneOf": [
                              {
                                "type": "integer",
                                "minimum": 0
                              },
                              {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 200
                              }
                            ]
                          }
                        },
                        "required": [
                          "entity_type",
                          "entity_id",
                          "entity_version"
                        ]
                      },
                      "scope": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "schema_version": {
                                "type": "number",
                                "enum": [
                                  1
                                ]
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "tenant"
                                ]
                              },
                              "tenant_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "league_id": {
                                "type": "null"
                              },
                              "match_id": {
                                "type": "null"
                              }
                            },
                            "required": [
                              "schema_version",
                              "kind",
                              "tenant_id",
                              "league_id",
                              "match_id"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "schema_version": {
                                "type": "number",
                                "enum": [
                                  1
                                ]
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "league"
                                ]
                              },
                              "tenant_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "league_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "match_id": {
                                "type": "null"
                              }
                            },
                            "required": [
                              "schema_version",
                              "kind",
                              "tenant_id",
                              "league_id",
                              "match_id"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "schema_version": {
                                "type": "number",
                                "enum": [
                                  1
                                ]
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "match"
                                ]
                              },
                              "tenant_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "league_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "match_id": {
                                "type": "string",
                                "format": "uuid"
                              }
                            },
                            "required": [
                              "schema_version",
                              "kind",
                              "tenant_id",
                              "league_id",
                              "match_id"
                            ]
                          }
                        ]
                      },
                      "actor_user_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "consumers": {
                        "type": "array",
                        "items": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "consumer": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "state": {
                                  "type": "string",
                                  "enum": [
                                    "pending"
                                  ]
                                },
                                "propagated_at": {
                                  "type": "null"
                                },
                                "reason": {
                                  "type": "null"
                                }
                              },
                              "required": [
                                "consumer",
                                "state",
                                "propagated_at",
                                "reason"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "consumer": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "state": {
                                  "type": "string",
                                  "enum": [
                                    "applied"
                                  ]
                                },
                                "propagated_at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "reason": {
                                  "type": "null"
                                }
                              },
                              "required": [
                                "consumer",
                                "state",
                                "propagated_at",
                                "reason"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "consumer": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "state": {
                                  "type": "string",
                                  "enum": [
                                    "failed"
                                  ]
                                },
                                "propagated_at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "reason": {
                                  "type": "object",
                                  "properties": {
                                    "code": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 120
                                    },
                                    "message": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 1000
                                    },
                                    "retryable": {
                                      "type": "boolean"
                                    },
                                    "recovery_action": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 500
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "code",
                                    "message",
                                    "retryable",
                                    "recovery_action"
                                  ]
                                }
                              },
                              "required": [
                                "consumer",
                                "state",
                                "propagated_at",
                                "reason"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "consumer": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "state": {
                                  "type": "string",
                                  "enum": [
                                    "not_applicable"
                                  ]
                                },
                                "propagated_at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "reason": {
                                  "type": "object",
                                  "properties": {
                                    "code": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 120
                                    },
                                    "message": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 1000
                                    },
                                    "retryable": {
                                      "type": "boolean"
                                    },
                                    "recovery_action": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 500
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "code",
                                    "message",
                                    "retryable",
                                    "recovery_action"
                                  ]
                                }
                              },
                              "required": [
                                "consumer",
                                "state",
                                "propagated_at",
                                "reason"
                              ]
                            }
                          ]
                        }
                      },
                      "server_timestamp": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "correlation_id": {
                        "type": "string",
                        "minLength": 8,
                        "maxLength": 200
                      },
                      "status": {
                        "type": "string",
                        "enum": [
                          "accepted"
                        ]
                      },
                      "reason": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 120
                              },
                              "message": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1000
                              },
                              "retryable": {
                                "type": "boolean"
                              },
                              "recovery_action": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 500
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "code",
                              "message",
                              "retryable",
                              "recovery_action"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "schema_version",
                      "receipt_id",
                      "entity",
                      "scope",
                      "actor_user_id",
                      "consumers",
                      "server_timestamp",
                      "correlation_id",
                      "status",
                      "reason"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "schema_version": {
                        "type": "number",
                        "enum": [
                          1
                        ]
                      },
                      "receipt_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "entity": {
                        "type": "object",
                        "properties": {
                          "entity_type": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 120
                          },
                          "entity_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "entity_version": {
                            "oneOf": [
                              {
                                "type": "integer",
                                "minimum": 0
                              },
                              {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 200
                              }
                            ]
                          }
                        },
                        "required": [
                          "entity_type",
                          "entity_id",
                          "entity_version"
                        ]
                      },
                      "scope": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "schema_version": {
                                "type": "number",
                                "enum": [
                                  1
                                ]
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "tenant"
                                ]
                              },
                              "tenant_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "league_id": {
                                "type": "null"
                              },
                              "match_id": {
                                "type": "null"
                              }
                            },
                            "required": [
                              "schema_version",
                              "kind",
                              "tenant_id",
                              "league_id",
                              "match_id"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "schema_version": {
                                "type": "number",
                                "enum": [
                                  1
                                ]
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "league"
                                ]
                              },
                              "tenant_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "league_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "match_id": {
                                "type": "null"
                              }
                            },
                            "required": [
                              "schema_version",
                              "kind",
                              "tenant_id",
                              "league_id",
                              "match_id"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "schema_version": {
                                "type": "number",
                                "enum": [
                                  1
                                ]
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "match"
                                ]
                              },
                              "tenant_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "league_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "match_id": {
                                "type": "string",
                                "format": "uuid"
                              }
                            },
                            "required": [
                              "schema_version",
                              "kind",
                              "tenant_id",
                              "league_id",
                              "match_id"
                            ]
                          }
                        ]
                      },
                      "actor_user_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "consumers": {
                        "type": "array",
                        "items": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "consumer": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "state": {
                                  "type": "string",
                                  "enum": [
                                    "pending"
                                  ]
                                },
                                "propagated_at": {
                                  "type": "null"
                                },
                                "reason": {
                                  "type": "null"
                                }
                              },
                              "required": [
                                "consumer",
                                "state",
                                "propagated_at",
                                "reason"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "consumer": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "state": {
                                  "type": "string",
                                  "enum": [
                                    "applied"
                                  ]
                                },
                                "propagated_at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "reason": {
                                  "type": "null"
                                }
                              },
                              "required": [
                                "consumer",
                                "state",
                                "propagated_at",
                                "reason"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "consumer": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "state": {
                                  "type": "string",
                                  "enum": [
                                    "failed"
                                  ]
                                },
                                "propagated_at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "reason": {
                                  "type": "object",
                                  "properties": {
                                    "code": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 120
                                    },
                                    "message": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 1000
                                    },
                                    "retryable": {
                                      "type": "boolean"
                                    },
                                    "recovery_action": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 500
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "code",
                                    "message",
                                    "retryable",
                                    "recovery_action"
                                  ]
                                }
                              },
                              "required": [
                                "consumer",
                                "state",
                                "propagated_at",
                                "reason"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "consumer": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "state": {
                                  "type": "string",
                                  "enum": [
                                    "not_applicable"
                                  ]
                                },
                                "propagated_at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "reason": {
                                  "type": "object",
                                  "properties": {
                                    "code": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 120
                                    },
                                    "message": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 1000
                                    },
                                    "retryable": {
                                      "type": "boolean"
                                    },
                                    "recovery_action": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 500
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "code",
                                    "message",
                                    "retryable",
                                    "recovery_action"
                                  ]
                                }
                              },
                              "required": [
                                "consumer",
                                "state",
                                "propagated_at",
                                "reason"
                              ]
                            }
                          ]
                        }
                      },
                      "server_timestamp": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "correlation_id": {
                        "type": "string",
                        "minLength": 8,
                        "maxLength": 200
                      },
                      "status": {
                        "type": "string",
                        "enum": [
                          "rejected"
                        ]
                      },
                      "reason": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 120
                          },
                          "message": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 1000
                          },
                          "retryable": {
                            "type": "boolean"
                          },
                          "recovery_action": {
                            "oneOf": [
                              {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 500
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "code",
                          "message",
                          "retryable",
                          "recovery_action"
                        ]
                      }
                    },
                    "required": [
                      "schema_version",
                      "receipt_id",
                      "entity",
                      "scope",
                      "actor_user_id",
                      "consumers",
                      "server_timestamp",
                      "correlation_id",
                      "status",
                      "reason"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "schema_version": {
                        "type": "number",
                        "enum": [
                          1
                        ]
                      },
                      "receipt_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "entity": {
                        "type": "object",
                        "properties": {
                          "entity_type": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 120
                          },
                          "entity_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "entity_version": {
                            "oneOf": [
                              {
                                "type": "integer",
                                "minimum": 0
                              },
                              {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 200
                              }
                            ]
                          }
                        },
                        "required": [
                          "entity_type",
                          "entity_id",
                          "entity_version"
                        ]
                      },
                      "scope": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "schema_version": {
                                "type": "number",
                                "enum": [
                                  1
                                ]
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "tenant"
                                ]
                              },
                              "tenant_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "league_id": {
                                "type": "null"
                              },
                              "match_id": {
                                "type": "null"
                              }
                            },
                            "required": [
                              "schema_version",
                              "kind",
                              "tenant_id",
                              "league_id",
                              "match_id"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "schema_version": {
                                "type": "number",
                                "enum": [
                                  1
                                ]
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "league"
                                ]
                              },
                              "tenant_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "league_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "match_id": {
                                "type": "null"
                              }
                            },
                            "required": [
                              "schema_version",
                              "kind",
                              "tenant_id",
                              "league_id",
                              "match_id"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "schema_version": {
                                "type": "number",
                                "enum": [
                                  1
                                ]
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "match"
                                ]
                              },
                              "tenant_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "league_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "match_id": {
                                "type": "string",
                                "format": "uuid"
                              }
                            },
                            "required": [
                              "schema_version",
                              "kind",
                              "tenant_id",
                              "league_id",
                              "match_id"
                            ]
                          }
                        ]
                      },
                      "actor_user_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "consumers": {
                        "type": "array",
                        "items": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "consumer": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "state": {
                                  "type": "string",
                                  "enum": [
                                    "pending"
                                  ]
                                },
                                "propagated_at": {
                                  "type": "null"
                                },
                                "reason": {
                                  "type": "null"
                                }
                              },
                              "required": [
                                "consumer",
                                "state",
                                "propagated_at",
                                "reason"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "consumer": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "state": {
                                  "type": "string",
                                  "enum": [
                                    "applied"
                                  ]
                                },
                                "propagated_at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "reason": {
                                  "type": "null"
                                }
                              },
                              "required": [
                                "consumer",
                                "state",
                                "propagated_at",
                                "reason"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "consumer": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "state": {
                                  "type": "string",
                                  "enum": [
                                    "failed"
                                  ]
                                },
                                "propagated_at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "reason": {
                                  "type": "object",
                                  "properties": {
                                    "code": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 120
                                    },
                                    "message": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 1000
                                    },
                                    "retryable": {
                                      "type": "boolean"
                                    },
                                    "recovery_action": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 500
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "code",
                                    "message",
                                    "retryable",
                                    "recovery_action"
                                  ]
                                }
                              },
                              "required": [
                                "consumer",
                                "state",
                                "propagated_at",
                                "reason"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "consumer": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "state": {
                                  "type": "string",
                                  "enum": [
                                    "not_applicable"
                                  ]
                                },
                                "propagated_at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "reason": {
                                  "type": "object",
                                  "properties": {
                                    "code": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 120
                                    },
                                    "message": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 1000
                                    },
                                    "retryable": {
                                      "type": "boolean"
                                    },
                                    "recovery_action": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 500
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "code",
                                    "message",
                                    "retryable",
                                    "recovery_action"
                                  ]
                                }
                              },
                              "required": [
                                "consumer",
                                "state",
                                "propagated_at",
                                "reason"
                              ]
                            }
                          ]
                        }
                      },
                      "server_timestamp": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "correlation_id": {
                        "type": "string",
                        "minLength": 8,
                        "maxLength": 200
                      },
                      "status": {
                        "type": "string",
                        "enum": [
                          "superseded"
                        ]
                      },
                      "reason": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 120
                          },
                          "message": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 1000
                          },
                          "retryable": {
                            "type": "boolean"
                          },
                          "recovery_action": {
                            "oneOf": [
                              {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 500
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "code",
                          "message",
                          "retryable",
                          "recovery_action"
                        ]
                      }
                    },
                    "required": [
                      "schema_version",
                      "receipt_id",
                      "entity",
                      "scope",
                      "actor_user_id",
                      "consumers",
                      "server_timestamp",
                      "correlation_id",
                      "status",
                      "reason"
                    ]
                  }
                ]
              }
            },
            "required": [
              "receipt_id",
              "evaluation_id",
              "player_id",
              "status",
              "participation_status",
              "minutes_played",
              "outcome",
              "receipt"
            ]
          }
        ]
      },
      "EvaluatorRatingBatchReceiptDto": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "receipt_id": {
                "type": "string",
                "format": "uuid"
              },
              "receipt_version": {
                "type": "number",
                "enum": [
                  1
                ]
              },
              "manifest_version": {
                "type": "number",
                "enum": [
                  1
                ]
              },
              "manifest_hash": {
                "type": "string",
                "pattern": "^[0-9a-f]{64}$"
              },
              "match_id": {
                "type": "string",
                "format": "uuid"
              },
              "idempotency_key": {
                "type": "string",
                "minLength": 8,
                "maxLength": 200
              },
              "status": {
                "type": "string",
                "enum": [
                  "accepted"
                ]
              },
              "submitted_at": {
                "type": "string",
                "format": "date-time"
              },
              "rows": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "receipt_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "evaluation_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "player_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "accepted"
                      ]
                    },
                    "participation_status": {
                      "type": "string",
                      "enum": [
                        "not_listed",
                        "starter",
                        "substitute_entered",
                        "substitute_not_entered",
                        "not_verifiable"
                      ]
                    },
                    "minutes_played": {
                      "oneOf": [
                        {
                          "type": "integer",
                          "minimum": 0
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "outcome": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "graded"
                              ]
                            },
                            "value": {
                              "type": "number",
                              "minimum": 1,
                              "maximum": 10
                            }
                          },
                          "required": [
                            "kind",
                            "value"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "no_grade"
                              ]
                            },
                            "reason": {
                              "type": "string",
                              "enum": [
                                "not_entered",
                                "not_listed",
                                "insufficient_observation",
                                "match_not_played",
                                "not_verifiable"
                              ]
                            }
                          },
                          "required": [
                            "kind",
                            "reason"
                          ]
                        }
                      ]
                    }
                  },
                  "required": [
                    "receipt_id",
                    "evaluation_id",
                    "player_id",
                    "status",
                    "participation_status",
                    "minutes_played",
                    "outcome"
                  ]
                },
                "minItems": 1,
                "maxItems": 100
              }
            },
            "required": [
              "receipt_id",
              "receipt_version",
              "manifest_version",
              "manifest_hash",
              "match_id",
              "idempotency_key",
              "status",
              "submitted_at",
              "rows"
            ]
          },
          {
            "type": "object",
            "properties": {
              "receipt_id": {
                "type": "string",
                "format": "uuid"
              },
              "receipt_version": {
                "type": "number",
                "enum": [
                  2
                ]
              },
              "manifest_version": {
                "type": "number",
                "enum": [
                  2
                ]
              },
              "manifest_hash": {
                "type": "string",
                "pattern": "^[0-9a-f]{64}$"
              },
              "match_id": {
                "type": "string",
                "format": "uuid"
              },
              "scope": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "schema_version": {
                        "type": "number",
                        "enum": [
                          1
                        ]
                      },
                      "kind": {
                        "type": "string",
                        "enum": [
                          "tenant"
                        ]
                      },
                      "tenant_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "league_id": {
                        "type": "null"
                      },
                      "match_id": {
                        "type": "null"
                      }
                    },
                    "required": [
                      "schema_version",
                      "kind",
                      "tenant_id",
                      "league_id",
                      "match_id"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "schema_version": {
                        "type": "number",
                        "enum": [
                          1
                        ]
                      },
                      "kind": {
                        "type": "string",
                        "enum": [
                          "league"
                        ]
                      },
                      "tenant_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "league_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "match_id": {
                        "type": "null"
                      }
                    },
                    "required": [
                      "schema_version",
                      "kind",
                      "tenant_id",
                      "league_id",
                      "match_id"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "schema_version": {
                        "type": "number",
                        "enum": [
                          1
                        ]
                      },
                      "kind": {
                        "type": "string",
                        "enum": [
                          "match"
                        ]
                      },
                      "tenant_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "league_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "match_id": {
                        "type": "string",
                        "format": "uuid"
                      }
                    },
                    "required": [
                      "schema_version",
                      "kind",
                      "tenant_id",
                      "league_id",
                      "match_id"
                    ]
                  }
                ]
              },
              "report_version_id": {
                "type": "string",
                "format": "uuid"
              },
              "participation_revision": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "ruleset": {
                "type": "object",
                "properties": {
                  "schema_version": {
                    "type": "number",
                    "enum": [
                      1
                    ]
                  },
                  "revision_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "content_hash": {
                    "type": "string",
                    "pattern": "^[0-9a-f]{64}$"
                  },
                  "provenance_label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 240
                  },
                  "signed_document": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "state": {
                            "type": "string",
                            "enum": [
                              "disabled"
                            ]
                          },
                          "reason": {
                            "type": "string",
                            "enum": [
                              "owner_input_required",
                              "provider_not_configured",
                              "bridge_not_implemented"
                            ]
                          },
                          "enabled_at": {
                            "type": "null"
                          }
                        },
                        "required": [
                          "state",
                          "reason",
                          "enabled_at"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "state": {
                            "type": "string",
                            "enum": [
                              "enabled"
                            ]
                          },
                          "configuration_revision_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "enabled_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "state",
                          "configuration_revision_id",
                          "enabled_at"
                        ]
                      }
                    ]
                  }
                },
                "required": [
                  "schema_version",
                  "revision_id",
                  "content_hash",
                  "provenance_label",
                  "signed_document"
                ]
              },
              "idempotency_key": {
                "type": "string",
                "minLength": 8,
                "maxLength": 200
              },
              "status": {
                "type": "string",
                "enum": [
                  "queued",
                  "accepted",
                  "rejected",
                  "superseded"
                ]
              },
              "submitted_at": {
                "type": "string",
                "format": "date-time"
              },
              "receipt": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "schema_version": {
                        "type": "number",
                        "enum": [
                          1
                        ]
                      },
                      "receipt_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "entity": {
                        "type": "object",
                        "properties": {
                          "entity_type": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 120
                          },
                          "entity_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "entity_version": {
                            "oneOf": [
                              {
                                "type": "integer",
                                "minimum": 0
                              },
                              {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 200
                              }
                            ]
                          }
                        },
                        "required": [
                          "entity_type",
                          "entity_id",
                          "entity_version"
                        ]
                      },
                      "scope": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "schema_version": {
                                "type": "number",
                                "enum": [
                                  1
                                ]
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "tenant"
                                ]
                              },
                              "tenant_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "league_id": {
                                "type": "null"
                              },
                              "match_id": {
                                "type": "null"
                              }
                            },
                            "required": [
                              "schema_version",
                              "kind",
                              "tenant_id",
                              "league_id",
                              "match_id"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "schema_version": {
                                "type": "number",
                                "enum": [
                                  1
                                ]
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "league"
                                ]
                              },
                              "tenant_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "league_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "match_id": {
                                "type": "null"
                              }
                            },
                            "required": [
                              "schema_version",
                              "kind",
                              "tenant_id",
                              "league_id",
                              "match_id"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "schema_version": {
                                "type": "number",
                                "enum": [
                                  1
                                ]
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "match"
                                ]
                              },
                              "tenant_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "league_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "match_id": {
                                "type": "string",
                                "format": "uuid"
                              }
                            },
                            "required": [
                              "schema_version",
                              "kind",
                              "tenant_id",
                              "league_id",
                              "match_id"
                            ]
                          }
                        ]
                      },
                      "actor_user_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "consumers": {
                        "type": "array",
                        "items": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "consumer": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "state": {
                                  "type": "string",
                                  "enum": [
                                    "pending"
                                  ]
                                },
                                "propagated_at": {
                                  "type": "null"
                                },
                                "reason": {
                                  "type": "null"
                                }
                              },
                              "required": [
                                "consumer",
                                "state",
                                "propagated_at",
                                "reason"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "consumer": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "state": {
                                  "type": "string",
                                  "enum": [
                                    "applied"
                                  ]
                                },
                                "propagated_at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "reason": {
                                  "type": "null"
                                }
                              },
                              "required": [
                                "consumer",
                                "state",
                                "propagated_at",
                                "reason"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "consumer": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "state": {
                                  "type": "string",
                                  "enum": [
                                    "failed"
                                  ]
                                },
                                "propagated_at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "reason": {
                                  "type": "object",
                                  "properties": {
                                    "code": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 120
                                    },
                                    "message": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 1000
                                    },
                                    "retryable": {
                                      "type": "boolean"
                                    },
                                    "recovery_action": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 500
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "code",
                                    "message",
                                    "retryable",
                                    "recovery_action"
                                  ]
                                }
                              },
                              "required": [
                                "consumer",
                                "state",
                                "propagated_at",
                                "reason"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "consumer": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "state": {
                                  "type": "string",
                                  "enum": [
                                    "not_applicable"
                                  ]
                                },
                                "propagated_at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "reason": {
                                  "type": "object",
                                  "properties": {
                                    "code": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 120
                                    },
                                    "message": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 1000
                                    },
                                    "retryable": {
                                      "type": "boolean"
                                    },
                                    "recovery_action": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 500
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "code",
                                    "message",
                                    "retryable",
                                    "recovery_action"
                                  ]
                                }
                              },
                              "required": [
                                "consumer",
                                "state",
                                "propagated_at",
                                "reason"
                              ]
                            }
                          ]
                        }
                      },
                      "server_timestamp": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "correlation_id": {
                        "type": "string",
                        "minLength": 8,
                        "maxLength": 200
                      },
                      "status": {
                        "type": "string",
                        "enum": [
                          "queued"
                        ]
                      },
                      "reason": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 120
                              },
                              "message": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1000
                              },
                              "retryable": {
                                "type": "boolean"
                              },
                              "recovery_action": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 500
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "code",
                              "message",
                              "retryable",
                              "recovery_action"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "schema_version",
                      "receipt_id",
                      "entity",
                      "scope",
                      "actor_user_id",
                      "consumers",
                      "server_timestamp",
                      "correlation_id",
                      "status",
                      "reason"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "schema_version": {
                        "type": "number",
                        "enum": [
                          1
                        ]
                      },
                      "receipt_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "entity": {
                        "type": "object",
                        "properties": {
                          "entity_type": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 120
                          },
                          "entity_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "entity_version": {
                            "oneOf": [
                              {
                                "type": "integer",
                                "minimum": 0
                              },
                              {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 200
                              }
                            ]
                          }
                        },
                        "required": [
                          "entity_type",
                          "entity_id",
                          "entity_version"
                        ]
                      },
                      "scope": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "schema_version": {
                                "type": "number",
                                "enum": [
                                  1
                                ]
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "tenant"
                                ]
                              },
                              "tenant_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "league_id": {
                                "type": "null"
                              },
                              "match_id": {
                                "type": "null"
                              }
                            },
                            "required": [
                              "schema_version",
                              "kind",
                              "tenant_id",
                              "league_id",
                              "match_id"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "schema_version": {
                                "type": "number",
                                "enum": [
                                  1
                                ]
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "league"
                                ]
                              },
                              "tenant_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "league_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "match_id": {
                                "type": "null"
                              }
                            },
                            "required": [
                              "schema_version",
                              "kind",
                              "tenant_id",
                              "league_id",
                              "match_id"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "schema_version": {
                                "type": "number",
                                "enum": [
                                  1
                                ]
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "match"
                                ]
                              },
                              "tenant_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "league_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "match_id": {
                                "type": "string",
                                "format": "uuid"
                              }
                            },
                            "required": [
                              "schema_version",
                              "kind",
                              "tenant_id",
                              "league_id",
                              "match_id"
                            ]
                          }
                        ]
                      },
                      "actor_user_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "consumers": {
                        "type": "array",
                        "items": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "consumer": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "state": {
                                  "type": "string",
                                  "enum": [
                                    "pending"
                                  ]
                                },
                                "propagated_at": {
                                  "type": "null"
                                },
                                "reason": {
                                  "type": "null"
                                }
                              },
                              "required": [
                                "consumer",
                                "state",
                                "propagated_at",
                                "reason"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "consumer": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "state": {
                                  "type": "string",
                                  "enum": [
                                    "applied"
                                  ]
                                },
                                "propagated_at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "reason": {
                                  "type": "null"
                                }
                              },
                              "required": [
                                "consumer",
                                "state",
                                "propagated_at",
                                "reason"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "consumer": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "state": {
                                  "type": "string",
                                  "enum": [
                                    "failed"
                                  ]
                                },
                                "propagated_at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "reason": {
                                  "type": "object",
                                  "properties": {
                                    "code": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 120
                                    },
                                    "message": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 1000
                                    },
                                    "retryable": {
                                      "type": "boolean"
                                    },
                                    "recovery_action": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 500
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "code",
                                    "message",
                                    "retryable",
                                    "recovery_action"
                                  ]
                                }
                              },
                              "required": [
                                "consumer",
                                "state",
                                "propagated_at",
                                "reason"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "consumer": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "state": {
                                  "type": "string",
                                  "enum": [
                                    "not_applicable"
                                  ]
                                },
                                "propagated_at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "reason": {
                                  "type": "object",
                                  "properties": {
                                    "code": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 120
                                    },
                                    "message": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 1000
                                    },
                                    "retryable": {
                                      "type": "boolean"
                                    },
                                    "recovery_action": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 500
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "code",
                                    "message",
                                    "retryable",
                                    "recovery_action"
                                  ]
                                }
                              },
                              "required": [
                                "consumer",
                                "state",
                                "propagated_at",
                                "reason"
                              ]
                            }
                          ]
                        }
                      },
                      "server_timestamp": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "correlation_id": {
                        "type": "string",
                        "minLength": 8,
                        "maxLength": 200
                      },
                      "status": {
                        "type": "string",
                        "enum": [
                          "accepted"
                        ]
                      },
                      "reason": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 120
                              },
                              "message": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1000
                              },
                              "retryable": {
                                "type": "boolean"
                              },
                              "recovery_action": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 500
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "code",
                              "message",
                              "retryable",
                              "recovery_action"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "schema_version",
                      "receipt_id",
                      "entity",
                      "scope",
                      "actor_user_id",
                      "consumers",
                      "server_timestamp",
                      "correlation_id",
                      "status",
                      "reason"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "schema_version": {
                        "type": "number",
                        "enum": [
                          1
                        ]
                      },
                      "receipt_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "entity": {
                        "type": "object",
                        "properties": {
                          "entity_type": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 120
                          },
                          "entity_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "entity_version": {
                            "oneOf": [
                              {
                                "type": "integer",
                                "minimum": 0
                              },
                              {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 200
                              }
                            ]
                          }
                        },
                        "required": [
                          "entity_type",
                          "entity_id",
                          "entity_version"
                        ]
                      },
                      "scope": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "schema_version": {
                                "type": "number",
                                "enum": [
                                  1
                                ]
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "tenant"
                                ]
                              },
                              "tenant_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "league_id": {
                                "type": "null"
                              },
                              "match_id": {
                                "type": "null"
                              }
                            },
                            "required": [
                              "schema_version",
                              "kind",
                              "tenant_id",
                              "league_id",
                              "match_id"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "schema_version": {
                                "type": "number",
                                "enum": [
                                  1
                                ]
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "league"
                                ]
                              },
                              "tenant_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "league_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "match_id": {
                                "type": "null"
                              }
                            },
                            "required": [
                              "schema_version",
                              "kind",
                              "tenant_id",
                              "league_id",
                              "match_id"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "schema_version": {
                                "type": "number",
                                "enum": [
                                  1
                                ]
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "match"
                                ]
                              },
                              "tenant_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "league_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "match_id": {
                                "type": "string",
                                "format": "uuid"
                              }
                            },
                            "required": [
                              "schema_version",
                              "kind",
                              "tenant_id",
                              "league_id",
                              "match_id"
                            ]
                          }
                        ]
                      },
                      "actor_user_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "consumers": {
                        "type": "array",
                        "items": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "consumer": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "state": {
                                  "type": "string",
                                  "enum": [
                                    "pending"
                                  ]
                                },
                                "propagated_at": {
                                  "type": "null"
                                },
                                "reason": {
                                  "type": "null"
                                }
                              },
                              "required": [
                                "consumer",
                                "state",
                                "propagated_at",
                                "reason"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "consumer": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "state": {
                                  "type": "string",
                                  "enum": [
                                    "applied"
                                  ]
                                },
                                "propagated_at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "reason": {
                                  "type": "null"
                                }
                              },
                              "required": [
                                "consumer",
                                "state",
                                "propagated_at",
                                "reason"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "consumer": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "state": {
                                  "type": "string",
                                  "enum": [
                                    "failed"
                                  ]
                                },
                                "propagated_at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "reason": {
                                  "type": "object",
                                  "properties": {
                                    "code": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 120
                                    },
                                    "message": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 1000
                                    },
                                    "retryable": {
                                      "type": "boolean"
                                    },
                                    "recovery_action": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 500
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "code",
                                    "message",
                                    "retryable",
                                    "recovery_action"
                                  ]
                                }
                              },
                              "required": [
                                "consumer",
                                "state",
                                "propagated_at",
                                "reason"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "consumer": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "state": {
                                  "type": "string",
                                  "enum": [
                                    "not_applicable"
                                  ]
                                },
                                "propagated_at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "reason": {
                                  "type": "object",
                                  "properties": {
                                    "code": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 120
                                    },
                                    "message": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 1000
                                    },
                                    "retryable": {
                                      "type": "boolean"
                                    },
                                    "recovery_action": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 500
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "code",
                                    "message",
                                    "retryable",
                                    "recovery_action"
                                  ]
                                }
                              },
                              "required": [
                                "consumer",
                                "state",
                                "propagated_at",
                                "reason"
                              ]
                            }
                          ]
                        }
                      },
                      "server_timestamp": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "correlation_id": {
                        "type": "string",
                        "minLength": 8,
                        "maxLength": 200
                      },
                      "status": {
                        "type": "string",
                        "enum": [
                          "rejected"
                        ]
                      },
                      "reason": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 120
                          },
                          "message": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 1000
                          },
                          "retryable": {
                            "type": "boolean"
                          },
                          "recovery_action": {
                            "oneOf": [
                              {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 500
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "code",
                          "message",
                          "retryable",
                          "recovery_action"
                        ]
                      }
                    },
                    "required": [
                      "schema_version",
                      "receipt_id",
                      "entity",
                      "scope",
                      "actor_user_id",
                      "consumers",
                      "server_timestamp",
                      "correlation_id",
                      "status",
                      "reason"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "schema_version": {
                        "type": "number",
                        "enum": [
                          1
                        ]
                      },
                      "receipt_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "entity": {
                        "type": "object",
                        "properties": {
                          "entity_type": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 120
                          },
                          "entity_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "entity_version": {
                            "oneOf": [
                              {
                                "type": "integer",
                                "minimum": 0
                              },
                              {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 200
                              }
                            ]
                          }
                        },
                        "required": [
                          "entity_type",
                          "entity_id",
                          "entity_version"
                        ]
                      },
                      "scope": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "schema_version": {
                                "type": "number",
                                "enum": [
                                  1
                                ]
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "tenant"
                                ]
                              },
                              "tenant_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "league_id": {
                                "type": "null"
                              },
                              "match_id": {
                                "type": "null"
                              }
                            },
                            "required": [
                              "schema_version",
                              "kind",
                              "tenant_id",
                              "league_id",
                              "match_id"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "schema_version": {
                                "type": "number",
                                "enum": [
                                  1
                                ]
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "league"
                                ]
                              },
                              "tenant_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "league_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "match_id": {
                                "type": "null"
                              }
                            },
                            "required": [
                              "schema_version",
                              "kind",
                              "tenant_id",
                              "league_id",
                              "match_id"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "schema_version": {
                                "type": "number",
                                "enum": [
                                  1
                                ]
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "match"
                                ]
                              },
                              "tenant_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "league_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "match_id": {
                                "type": "string",
                                "format": "uuid"
                              }
                            },
                            "required": [
                              "schema_version",
                              "kind",
                              "tenant_id",
                              "league_id",
                              "match_id"
                            ]
                          }
                        ]
                      },
                      "actor_user_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "consumers": {
                        "type": "array",
                        "items": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "consumer": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "state": {
                                  "type": "string",
                                  "enum": [
                                    "pending"
                                  ]
                                },
                                "propagated_at": {
                                  "type": "null"
                                },
                                "reason": {
                                  "type": "null"
                                }
                              },
                              "required": [
                                "consumer",
                                "state",
                                "propagated_at",
                                "reason"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "consumer": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "state": {
                                  "type": "string",
                                  "enum": [
                                    "applied"
                                  ]
                                },
                                "propagated_at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "reason": {
                                  "type": "null"
                                }
                              },
                              "required": [
                                "consumer",
                                "state",
                                "propagated_at",
                                "reason"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "consumer": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "state": {
                                  "type": "string",
                                  "enum": [
                                    "failed"
                                  ]
                                },
                                "propagated_at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "reason": {
                                  "type": "object",
                                  "properties": {
                                    "code": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 120
                                    },
                                    "message": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 1000
                                    },
                                    "retryable": {
                                      "type": "boolean"
                                    },
                                    "recovery_action": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 500
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "code",
                                    "message",
                                    "retryable",
                                    "recovery_action"
                                  ]
                                }
                              },
                              "required": [
                                "consumer",
                                "state",
                                "propagated_at",
                                "reason"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "consumer": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "state": {
                                  "type": "string",
                                  "enum": [
                                    "not_applicable"
                                  ]
                                },
                                "propagated_at": {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                "reason": {
                                  "type": "object",
                                  "properties": {
                                    "code": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 120
                                    },
                                    "message": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 1000
                                    },
                                    "retryable": {
                                      "type": "boolean"
                                    },
                                    "recovery_action": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 500
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "code",
                                    "message",
                                    "retryable",
                                    "recovery_action"
                                  ]
                                }
                              },
                              "required": [
                                "consumer",
                                "state",
                                "propagated_at",
                                "reason"
                              ]
                            }
                          ]
                        }
                      },
                      "server_timestamp": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "correlation_id": {
                        "type": "string",
                        "minLength": 8,
                        "maxLength": 200
                      },
                      "status": {
                        "type": "string",
                        "enum": [
                          "superseded"
                        ]
                      },
                      "reason": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 120
                          },
                          "message": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 1000
                          },
                          "retryable": {
                            "type": "boolean"
                          },
                          "recovery_action": {
                            "oneOf": [
                              {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 500
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "code",
                          "message",
                          "retryable",
                          "recovery_action"
                        ]
                      }
                    },
                    "required": [
                      "schema_version",
                      "receipt_id",
                      "entity",
                      "scope",
                      "actor_user_id",
                      "consumers",
                      "server_timestamp",
                      "correlation_id",
                      "status",
                      "reason"
                    ]
                  }
                ]
              },
              "rows": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "receipt_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "evaluation_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "player_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "queued",
                        "accepted",
                        "rejected",
                        "superseded"
                      ]
                    },
                    "participation_status": {
                      "type": "string",
                      "enum": [
                        "not_listed",
                        "starter",
                        "substitute_entered",
                        "substitute_not_entered",
                        "not_verifiable"
                      ]
                    },
                    "minutes_played": {
                      "oneOf": [
                        {
                          "type": "integer",
                          "minimum": 0
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "outcome": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "graded"
                              ]
                            },
                            "value": {
                              "type": "number",
                              "minimum": 1,
                              "maximum": 10
                            }
                          },
                          "required": [
                            "kind",
                            "value"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "no_grade"
                              ]
                            },
                            "reason": {
                              "type": "string",
                              "enum": [
                                "not_entered",
                                "not_listed",
                                "insufficient_observation",
                                "match_not_played",
                                "not_verifiable"
                              ]
                            }
                          },
                          "required": [
                            "kind",
                            "reason"
                          ]
                        }
                      ]
                    },
                    "receipt": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "schema_version": {
                              "type": "number",
                              "enum": [
                                1
                              ]
                            },
                            "receipt_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "entity": {
                              "type": "object",
                              "properties": {
                                "entity_type": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "entity_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "entity_version": {
                                  "oneOf": [
                                    {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 200
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "entity_type",
                                "entity_id",
                                "entity_version"
                              ]
                            },
                            "scope": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "schema_version": {
                                      "type": "number",
                                      "enum": [
                                        1
                                      ]
                                    },
                                    "kind": {
                                      "type": "string",
                                      "enum": [
                                        "tenant"
                                      ]
                                    },
                                    "tenant_id": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "league_id": {
                                      "type": "null"
                                    },
                                    "match_id": {
                                      "type": "null"
                                    }
                                  },
                                  "required": [
                                    "schema_version",
                                    "kind",
                                    "tenant_id",
                                    "league_id",
                                    "match_id"
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "schema_version": {
                                      "type": "number",
                                      "enum": [
                                        1
                                      ]
                                    },
                                    "kind": {
                                      "type": "string",
                                      "enum": [
                                        "league"
                                      ]
                                    },
                                    "tenant_id": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "league_id": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "match_id": {
                                      "type": "null"
                                    }
                                  },
                                  "required": [
                                    "schema_version",
                                    "kind",
                                    "tenant_id",
                                    "league_id",
                                    "match_id"
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "schema_version": {
                                      "type": "number",
                                      "enum": [
                                        1
                                      ]
                                    },
                                    "kind": {
                                      "type": "string",
                                      "enum": [
                                        "match"
                                      ]
                                    },
                                    "tenant_id": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "league_id": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "match_id": {
                                      "type": "string",
                                      "format": "uuid"
                                    }
                                  },
                                  "required": [
                                    "schema_version",
                                    "kind",
                                    "tenant_id",
                                    "league_id",
                                    "match_id"
                                  ]
                                }
                              ]
                            },
                            "actor_user_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "consumers": {
                              "type": "array",
                              "items": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "consumer": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 120
                                      },
                                      "state": {
                                        "type": "string",
                                        "enum": [
                                          "pending"
                                        ]
                                      },
                                      "propagated_at": {
                                        "type": "null"
                                      },
                                      "reason": {
                                        "type": "null"
                                      }
                                    },
                                    "required": [
                                      "consumer",
                                      "state",
                                      "propagated_at",
                                      "reason"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "consumer": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 120
                                      },
                                      "state": {
                                        "type": "string",
                                        "enum": [
                                          "applied"
                                        ]
                                      },
                                      "propagated_at": {
                                        "type": "string",
                                        "format": "date-time"
                                      },
                                      "reason": {
                                        "type": "null"
                                      }
                                    },
                                    "required": [
                                      "consumer",
                                      "state",
                                      "propagated_at",
                                      "reason"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "consumer": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 120
                                      },
                                      "state": {
                                        "type": "string",
                                        "enum": [
                                          "failed"
                                        ]
                                      },
                                      "propagated_at": {
                                        "type": "string",
                                        "format": "date-time"
                                      },
                                      "reason": {
                                        "type": "object",
                                        "properties": {
                                          "code": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 120
                                          },
                                          "message": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 1000
                                          },
                                          "retryable": {
                                            "type": "boolean"
                                          },
                                          "recovery_action": {
                                            "oneOf": [
                                              {
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 500
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "code",
                                          "message",
                                          "retryable",
                                          "recovery_action"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "consumer",
                                      "state",
                                      "propagated_at",
                                      "reason"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "consumer": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 120
                                      },
                                      "state": {
                                        "type": "string",
                                        "enum": [
                                          "not_applicable"
                                        ]
                                      },
                                      "propagated_at": {
                                        "type": "string",
                                        "format": "date-time"
                                      },
                                      "reason": {
                                        "type": "object",
                                        "properties": {
                                          "code": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 120
                                          },
                                          "message": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 1000
                                          },
                                          "retryable": {
                                            "type": "boolean"
                                          },
                                          "recovery_action": {
                                            "oneOf": [
                                              {
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 500
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "code",
                                          "message",
                                          "retryable",
                                          "recovery_action"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "consumer",
                                      "state",
                                      "propagated_at",
                                      "reason"
                                    ]
                                  }
                                ]
                              }
                            },
                            "server_timestamp": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "correlation_id": {
                              "type": "string",
                              "minLength": 8,
                              "maxLength": 200
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "queued"
                              ]
                            },
                            "reason": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "code": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 120
                                    },
                                    "message": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 1000
                                    },
                                    "retryable": {
                                      "type": "boolean"
                                    },
                                    "recovery_action": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 500
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "code",
                                    "message",
                                    "retryable",
                                    "recovery_action"
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "schema_version",
                            "receipt_id",
                            "entity",
                            "scope",
                            "actor_user_id",
                            "consumers",
                            "server_timestamp",
                            "correlation_id",
                            "status",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "schema_version": {
                              "type": "number",
                              "enum": [
                                1
                              ]
                            },
                            "receipt_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "entity": {
                              "type": "object",
                              "properties": {
                                "entity_type": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "entity_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "entity_version": {
                                  "oneOf": [
                                    {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 200
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "entity_type",
                                "entity_id",
                                "entity_version"
                              ]
                            },
                            "scope": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "schema_version": {
                                      "type": "number",
                                      "enum": [
                                        1
                                      ]
                                    },
                                    "kind": {
                                      "type": "string",
                                      "enum": [
                                        "tenant"
                                      ]
                                    },
                                    "tenant_id": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "league_id": {
                                      "type": "null"
                                    },
                                    "match_id": {
                                      "type": "null"
                                    }
                                  },
                                  "required": [
                                    "schema_version",
                                    "kind",
                                    "tenant_id",
                                    "league_id",
                                    "match_id"
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "schema_version": {
                                      "type": "number",
                                      "enum": [
                                        1
                                      ]
                                    },
                                    "kind": {
                                      "type": "string",
                                      "enum": [
                                        "league"
                                      ]
                                    },
                                    "tenant_id": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "league_id": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "match_id": {
                                      "type": "null"
                                    }
                                  },
                                  "required": [
                                    "schema_version",
                                    "kind",
                                    "tenant_id",
                                    "league_id",
                                    "match_id"
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "schema_version": {
                                      "type": "number",
                                      "enum": [
                                        1
                                      ]
                                    },
                                    "kind": {
                                      "type": "string",
                                      "enum": [
                                        "match"
                                      ]
                                    },
                                    "tenant_id": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "league_id": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "match_id": {
                                      "type": "string",
                                      "format": "uuid"
                                    }
                                  },
                                  "required": [
                                    "schema_version",
                                    "kind",
                                    "tenant_id",
                                    "league_id",
                                    "match_id"
                                  ]
                                }
                              ]
                            },
                            "actor_user_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "consumers": {
                              "type": "array",
                              "items": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "consumer": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 120
                                      },
                                      "state": {
                                        "type": "string",
                                        "enum": [
                                          "pending"
                                        ]
                                      },
                                      "propagated_at": {
                                        "type": "null"
                                      },
                                      "reason": {
                                        "type": "null"
                                      }
                                    },
                                    "required": [
                                      "consumer",
                                      "state",
                                      "propagated_at",
                                      "reason"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "consumer": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 120
                                      },
                                      "state": {
                                        "type": "string",
                                        "enum": [
                                          "applied"
                                        ]
                                      },
                                      "propagated_at": {
                                        "type": "string",
                                        "format": "date-time"
                                      },
                                      "reason": {
                                        "type": "null"
                                      }
                                    },
                                    "required": [
                                      "consumer",
                                      "state",
                                      "propagated_at",
                                      "reason"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "consumer": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 120
                                      },
                                      "state": {
                                        "type": "string",
                                        "enum": [
                                          "failed"
                                        ]
                                      },
                                      "propagated_at": {
                                        "type": "string",
                                        "format": "date-time"
                                      },
                                      "reason": {
                                        "type": "object",
                                        "properties": {
                                          "code": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 120
                                          },
                                          "message": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 1000
                                          },
                                          "retryable": {
                                            "type": "boolean"
                                          },
                                          "recovery_action": {
                                            "oneOf": [
                                              {
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 500
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "code",
                                          "message",
                                          "retryable",
                                          "recovery_action"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "consumer",
                                      "state",
                                      "propagated_at",
                                      "reason"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "consumer": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 120
                                      },
                                      "state": {
                                        "type": "string",
                                        "enum": [
                                          "not_applicable"
                                        ]
                                      },
                                      "propagated_at": {
                                        "type": "string",
                                        "format": "date-time"
                                      },
                                      "reason": {
                                        "type": "object",
                                        "properties": {
                                          "code": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 120
                                          },
                                          "message": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 1000
                                          },
                                          "retryable": {
                                            "type": "boolean"
                                          },
                                          "recovery_action": {
                                            "oneOf": [
                                              {
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 500
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "code",
                                          "message",
                                          "retryable",
                                          "recovery_action"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "consumer",
                                      "state",
                                      "propagated_at",
                                      "reason"
                                    ]
                                  }
                                ]
                              }
                            },
                            "server_timestamp": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "correlation_id": {
                              "type": "string",
                              "minLength": 8,
                              "maxLength": 200
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "accepted"
                              ]
                            },
                            "reason": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "code": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 120
                                    },
                                    "message": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 1000
                                    },
                                    "retryable": {
                                      "type": "boolean"
                                    },
                                    "recovery_action": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 500
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "code",
                                    "message",
                                    "retryable",
                                    "recovery_action"
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "schema_version",
                            "receipt_id",
                            "entity",
                            "scope",
                            "actor_user_id",
                            "consumers",
                            "server_timestamp",
                            "correlation_id",
                            "status",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "schema_version": {
                              "type": "number",
                              "enum": [
                                1
                              ]
                            },
                            "receipt_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "entity": {
                              "type": "object",
                              "properties": {
                                "entity_type": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "entity_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "entity_version": {
                                  "oneOf": [
                                    {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 200
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "entity_type",
                                "entity_id",
                                "entity_version"
                              ]
                            },
                            "scope": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "schema_version": {
                                      "type": "number",
                                      "enum": [
                                        1
                                      ]
                                    },
                                    "kind": {
                                      "type": "string",
                                      "enum": [
                                        "tenant"
                                      ]
                                    },
                                    "tenant_id": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "league_id": {
                                      "type": "null"
                                    },
                                    "match_id": {
                                      "type": "null"
                                    }
                                  },
                                  "required": [
                                    "schema_version",
                                    "kind",
                                    "tenant_id",
                                    "league_id",
                                    "match_id"
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "schema_version": {
                                      "type": "number",
                                      "enum": [
                                        1
                                      ]
                                    },
                                    "kind": {
                                      "type": "string",
                                      "enum": [
                                        "league"
                                      ]
                                    },
                                    "tenant_id": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "league_id": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "match_id": {
                                      "type": "null"
                                    }
                                  },
                                  "required": [
                                    "schema_version",
                                    "kind",
                                    "tenant_id",
                                    "league_id",
                                    "match_id"
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "schema_version": {
                                      "type": "number",
                                      "enum": [
                                        1
                                      ]
                                    },
                                    "kind": {
                                      "type": "string",
                                      "enum": [
                                        "match"
                                      ]
                                    },
                                    "tenant_id": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "league_id": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "match_id": {
                                      "type": "string",
                                      "format": "uuid"
                                    }
                                  },
                                  "required": [
                                    "schema_version",
                                    "kind",
                                    "tenant_id",
                                    "league_id",
                                    "match_id"
                                  ]
                                }
                              ]
                            },
                            "actor_user_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "consumers": {
                              "type": "array",
                              "items": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "consumer": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 120
                                      },
                                      "state": {
                                        "type": "string",
                                        "enum": [
                                          "pending"
                                        ]
                                      },
                                      "propagated_at": {
                                        "type": "null"
                                      },
                                      "reason": {
                                        "type": "null"
                                      }
                                    },
                                    "required": [
                                      "consumer",
                                      "state",
                                      "propagated_at",
                                      "reason"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "consumer": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 120
                                      },
                                      "state": {
                                        "type": "string",
                                        "enum": [
                                          "applied"
                                        ]
                                      },
                                      "propagated_at": {
                                        "type": "string",
                                        "format": "date-time"
                                      },
                                      "reason": {
                                        "type": "null"
                                      }
                                    },
                                    "required": [
                                      "consumer",
                                      "state",
                                      "propagated_at",
                                      "reason"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "consumer": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 120
                                      },
                                      "state": {
                                        "type": "string",
                                        "enum": [
                                          "failed"
                                        ]
                                      },
                                      "propagated_at": {
                                        "type": "string",
                                        "format": "date-time"
                                      },
                                      "reason": {
                                        "type": "object",
                                        "properties": {
                                          "code": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 120
                                          },
                                          "message": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 1000
                                          },
                                          "retryable": {
                                            "type": "boolean"
                                          },
                                          "recovery_action": {
                                            "oneOf": [
                                              {
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 500
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "code",
                                          "message",
                                          "retryable",
                                          "recovery_action"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "consumer",
                                      "state",
                                      "propagated_at",
                                      "reason"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "consumer": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 120
                                      },
                                      "state": {
                                        "type": "string",
                                        "enum": [
                                          "not_applicable"
                                        ]
                                      },
                                      "propagated_at": {
                                        "type": "string",
                                        "format": "date-time"
                                      },
                                      "reason": {
                                        "type": "object",
                                        "properties": {
                                          "code": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 120
                                          },
                                          "message": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 1000
                                          },
                                          "retryable": {
                                            "type": "boolean"
                                          },
                                          "recovery_action": {
                                            "oneOf": [
                                              {
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 500
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "code",
                                          "message",
                                          "retryable",
                                          "recovery_action"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "consumer",
                                      "state",
                                      "propagated_at",
                                      "reason"
                                    ]
                                  }
                                ]
                              }
                            },
                            "server_timestamp": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "correlation_id": {
                              "type": "string",
                              "minLength": 8,
                              "maxLength": 200
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "rejected"
                              ]
                            },
                            "reason": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "message": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1000
                                },
                                "retryable": {
                                  "type": "boolean"
                                },
                                "recovery_action": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 500
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "code",
                                "message",
                                "retryable",
                                "recovery_action"
                              ]
                            }
                          },
                          "required": [
                            "schema_version",
                            "receipt_id",
                            "entity",
                            "scope",
                            "actor_user_id",
                            "consumers",
                            "server_timestamp",
                            "correlation_id",
                            "status",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "schema_version": {
                              "type": "number",
                              "enum": [
                                1
                              ]
                            },
                            "receipt_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "entity": {
                              "type": "object",
                              "properties": {
                                "entity_type": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "entity_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "entity_version": {
                                  "oneOf": [
                                    {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 200
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "entity_type",
                                "entity_id",
                                "entity_version"
                              ]
                            },
                            "scope": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "schema_version": {
                                      "type": "number",
                                      "enum": [
                                        1
                                      ]
                                    },
                                    "kind": {
                                      "type": "string",
                                      "enum": [
                                        "tenant"
                                      ]
                                    },
                                    "tenant_id": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "league_id": {
                                      "type": "null"
                                    },
                                    "match_id": {
                                      "type": "null"
                                    }
                                  },
                                  "required": [
                                    "schema_version",
                                    "kind",
                                    "tenant_id",
                                    "league_id",
                                    "match_id"
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "schema_version": {
                                      "type": "number",
                                      "enum": [
                                        1
                                      ]
                                    },
                                    "kind": {
                                      "type": "string",
                                      "enum": [
                                        "league"
                                      ]
                                    },
                                    "tenant_id": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "league_id": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "match_id": {
                                      "type": "null"
                                    }
                                  },
                                  "required": [
                                    "schema_version",
                                    "kind",
                                    "tenant_id",
                                    "league_id",
                                    "match_id"
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "schema_version": {
                                      "type": "number",
                                      "enum": [
                                        1
                                      ]
                                    },
                                    "kind": {
                                      "type": "string",
                                      "enum": [
                                        "match"
                                      ]
                                    },
                                    "tenant_id": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "league_id": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "match_id": {
                                      "type": "string",
                                      "format": "uuid"
                                    }
                                  },
                                  "required": [
                                    "schema_version",
                                    "kind",
                                    "tenant_id",
                                    "league_id",
                                    "match_id"
                                  ]
                                }
                              ]
                            },
                            "actor_user_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "consumers": {
                              "type": "array",
                              "items": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "consumer": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 120
                                      },
                                      "state": {
                                        "type": "string",
                                        "enum": [
                                          "pending"
                                        ]
                                      },
                                      "propagated_at": {
                                        "type": "null"
                                      },
                                      "reason": {
                                        "type": "null"
                                      }
                                    },
                                    "required": [
                                      "consumer",
                                      "state",
                                      "propagated_at",
                                      "reason"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "consumer": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 120
                                      },
                                      "state": {
                                        "type": "string",
                                        "enum": [
                                          "applied"
                                        ]
                                      },
                                      "propagated_at": {
                                        "type": "string",
                                        "format": "date-time"
                                      },
                                      "reason": {
                                        "type": "null"
                                      }
                                    },
                                    "required": [
                                      "consumer",
                                      "state",
                                      "propagated_at",
                                      "reason"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "consumer": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 120
                                      },
                                      "state": {
                                        "type": "string",
                                        "enum": [
                                          "failed"
                                        ]
                                      },
                                      "propagated_at": {
                                        "type": "string",
                                        "format": "date-time"
                                      },
                                      "reason": {
                                        "type": "object",
                                        "properties": {
                                          "code": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 120
                                          },
                                          "message": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 1000
                                          },
                                          "retryable": {
                                            "type": "boolean"
                                          },
                                          "recovery_action": {
                                            "oneOf": [
                                              {
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 500
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "code",
                                          "message",
                                          "retryable",
                                          "recovery_action"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "consumer",
                                      "state",
                                      "propagated_at",
                                      "reason"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "consumer": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 120
                                      },
                                      "state": {
                                        "type": "string",
                                        "enum": [
                                          "not_applicable"
                                        ]
                                      },
                                      "propagated_at": {
                                        "type": "string",
                                        "format": "date-time"
                                      },
                                      "reason": {
                                        "type": "object",
                                        "properties": {
                                          "code": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 120
                                          },
                                          "message": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 1000
                                          },
                                          "retryable": {
                                            "type": "boolean"
                                          },
                                          "recovery_action": {
                                            "oneOf": [
                                              {
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 500
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "code",
                                          "message",
                                          "retryable",
                                          "recovery_action"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "consumer",
                                      "state",
                                      "propagated_at",
                                      "reason"
                                    ]
                                  }
                                ]
                              }
                            },
                            "server_timestamp": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "correlation_id": {
                              "type": "string",
                              "minLength": 8,
                              "maxLength": 200
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "superseded"
                              ]
                            },
                            "reason": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "message": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1000
                                },
                                "retryable": {
                                  "type": "boolean"
                                },
                                "recovery_action": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 500
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "code",
                                "message",
                                "retryable",
                                "recovery_action"
                              ]
                            }
                          },
                          "required": [
                            "schema_version",
                            "receipt_id",
                            "entity",
                            "scope",
                            "actor_user_id",
                            "consumers",
                            "server_timestamp",
                            "correlation_id",
                            "status",
                            "reason"
                          ]
                        }
                      ]
                    }
                  },
                  "required": [
                    "receipt_id",
                    "evaluation_id",
                    "player_id",
                    "status",
                    "participation_status",
                    "minutes_played",
                    "outcome",
                    "receipt"
                  ]
                },
                "minItems": 1,
                "maxItems": 100
              }
            },
            "required": [
              "receipt_id",
              "receipt_version",
              "manifest_version",
              "manifest_hash",
              "match_id",
              "scope",
              "report_version_id",
              "participation_revision",
              "ruleset",
              "idempotency_key",
              "status",
              "submitted_at",
              "receipt",
              "rows"
            ]
          }
        ],
        "properties": {
          "evaluation_authority": {
            "$ref": "#/components/schemas/EvaluationAuthorityV2"
          }
        },
        "required": [
          "evaluation_authority"
        ]
      },
      "EvaluatorRatingBatchReceiptList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "receipt_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "receipt_version": {
                      "type": "number",
                      "enum": [
                        1
                      ]
                    },
                    "manifest_version": {
                      "type": "number",
                      "enum": [
                        1
                      ]
                    },
                    "manifest_hash": {
                      "type": "string",
                      "pattern": "^[0-9a-f]{64}$"
                    },
                    "match_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "idempotency_key": {
                      "type": "string",
                      "minLength": 8,
                      "maxLength": 200
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "accepted"
                      ]
                    },
                    "submitted_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "rows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "receipt_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "evaluation_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "player_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "accepted"
                            ]
                          },
                          "participation_status": {
                            "type": "string",
                            "enum": [
                              "not_listed",
                              "starter",
                              "substitute_entered",
                              "substitute_not_entered",
                              "not_verifiable"
                            ]
                          },
                          "minutes_played": {
                            "oneOf": [
                              {
                                "type": "integer",
                                "minimum": 0
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "outcome": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "graded"
                                    ]
                                  },
                                  "value": {
                                    "type": "number",
                                    "minimum": 1,
                                    "maximum": 10
                                  }
                                },
                                "required": [
                                  "kind",
                                  "value"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "no_grade"
                                    ]
                                  },
                                  "reason": {
                                    "type": "string",
                                    "enum": [
                                      "not_entered",
                                      "not_listed",
                                      "insufficient_observation",
                                      "match_not_played",
                                      "not_verifiable"
                                    ]
                                  }
                                },
                                "required": [
                                  "kind",
                                  "reason"
                                ]
                              }
                            ]
                          }
                        },
                        "required": [
                          "receipt_id",
                          "evaluation_id",
                          "player_id",
                          "status",
                          "participation_status",
                          "minutes_played",
                          "outcome"
                        ]
                      },
                      "minItems": 1,
                      "maxItems": 100
                    }
                  },
                  "required": [
                    "receipt_id",
                    "receipt_version",
                    "manifest_version",
                    "manifest_hash",
                    "match_id",
                    "idempotency_key",
                    "status",
                    "submitted_at",
                    "rows"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "receipt_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "receipt_version": {
                      "type": "number",
                      "enum": [
                        2
                      ]
                    },
                    "manifest_version": {
                      "type": "number",
                      "enum": [
                        2
                      ]
                    },
                    "manifest_hash": {
                      "type": "string",
                      "pattern": "^[0-9a-f]{64}$"
                    },
                    "match_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "scope": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "schema_version": {
                              "type": "number",
                              "enum": [
                                1
                              ]
                            },
                            "kind": {
                              "type": "string",
                              "enum": [
                                "tenant"
                              ]
                            },
                            "tenant_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "league_id": {
                              "type": "null"
                            },
                            "match_id": {
                              "type": "null"
                            }
                          },
                          "required": [
                            "schema_version",
                            "kind",
                            "tenant_id",
                            "league_id",
                            "match_id"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "schema_version": {
                              "type": "number",
                              "enum": [
                                1
                              ]
                            },
                            "kind": {
                              "type": "string",
                              "enum": [
                                "league"
                              ]
                            },
                            "tenant_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "league_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "match_id": {
                              "type": "null"
                            }
                          },
                          "required": [
                            "schema_version",
                            "kind",
                            "tenant_id",
                            "league_id",
                            "match_id"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "schema_version": {
                              "type": "number",
                              "enum": [
                                1
                              ]
                            },
                            "kind": {
                              "type": "string",
                              "enum": [
                                "match"
                              ]
                            },
                            "tenant_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "league_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "match_id": {
                              "type": "string",
                              "format": "uuid"
                            }
                          },
                          "required": [
                            "schema_version",
                            "kind",
                            "tenant_id",
                            "league_id",
                            "match_id"
                          ]
                        }
                      ]
                    },
                    "report_version_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "participation_revision": {
                      "type": "integer",
                      "exclusiveMinimum": 0
                    },
                    "ruleset": {
                      "type": "object",
                      "properties": {
                        "schema_version": {
                          "type": "number",
                          "enum": [
                            1
                          ]
                        },
                        "revision_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "content_hash": {
                          "type": "string",
                          "pattern": "^[0-9a-f]{64}$"
                        },
                        "provenance_label": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 240
                        },
                        "signed_document": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "state": {
                                  "type": "string",
                                  "enum": [
                                    "disabled"
                                  ]
                                },
                                "reason": {
                                  "type": "string",
                                  "enum": [
                                    "owner_input_required",
                                    "provider_not_configured",
                                    "bridge_not_implemented"
                                  ]
                                },
                                "enabled_at": {
                                  "type": "null"
                                }
                              },
                              "required": [
                                "state",
                                "reason",
                                "enabled_at"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "state": {
                                  "type": "string",
                                  "enum": [
                                    "enabled"
                                  ]
                                },
                                "configuration_revision_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "enabled_at": {
                                  "type": "string",
                                  "format": "date-time"
                                }
                              },
                              "required": [
                                "state",
                                "configuration_revision_id",
                                "enabled_at"
                              ]
                            }
                          ]
                        }
                      },
                      "required": [
                        "schema_version",
                        "revision_id",
                        "content_hash",
                        "provenance_label",
                        "signed_document"
                      ]
                    },
                    "idempotency_key": {
                      "type": "string",
                      "minLength": 8,
                      "maxLength": 200
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "queued",
                        "accepted",
                        "rejected",
                        "superseded"
                      ]
                    },
                    "submitted_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "receipt": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "schema_version": {
                              "type": "number",
                              "enum": [
                                1
                              ]
                            },
                            "receipt_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "entity": {
                              "type": "object",
                              "properties": {
                                "entity_type": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "entity_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "entity_version": {
                                  "oneOf": [
                                    {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 200
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "entity_type",
                                "entity_id",
                                "entity_version"
                              ]
                            },
                            "scope": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "schema_version": {
                                      "type": "number",
                                      "enum": [
                                        1
                                      ]
                                    },
                                    "kind": {
                                      "type": "string",
                                      "enum": [
                                        "tenant"
                                      ]
                                    },
                                    "tenant_id": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "league_id": {
                                      "type": "null"
                                    },
                                    "match_id": {
                                      "type": "null"
                                    }
                                  },
                                  "required": [
                                    "schema_version",
                                    "kind",
                                    "tenant_id",
                                    "league_id",
                                    "match_id"
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "schema_version": {
                                      "type": "number",
                                      "enum": [
                                        1
                                      ]
                                    },
                                    "kind": {
                                      "type": "string",
                                      "enum": [
                                        "league"
                                      ]
                                    },
                                    "tenant_id": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "league_id": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "match_id": {
                                      "type": "null"
                                    }
                                  },
                                  "required": [
                                    "schema_version",
                                    "kind",
                                    "tenant_id",
                                    "league_id",
                                    "match_id"
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "schema_version": {
                                      "type": "number",
                                      "enum": [
                                        1
                                      ]
                                    },
                                    "kind": {
                                      "type": "string",
                                      "enum": [
                                        "match"
                                      ]
                                    },
                                    "tenant_id": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "league_id": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "match_id": {
                                      "type": "string",
                                      "format": "uuid"
                                    }
                                  },
                                  "required": [
                                    "schema_version",
                                    "kind",
                                    "tenant_id",
                                    "league_id",
                                    "match_id"
                                  ]
                                }
                              ]
                            },
                            "actor_user_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "consumers": {
                              "type": "array",
                              "items": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "consumer": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 120
                                      },
                                      "state": {
                                        "type": "string",
                                        "enum": [
                                          "pending"
                                        ]
                                      },
                                      "propagated_at": {
                                        "type": "null"
                                      },
                                      "reason": {
                                        "type": "null"
                                      }
                                    },
                                    "required": [
                                      "consumer",
                                      "state",
                                      "propagated_at",
                                      "reason"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "consumer": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 120
                                      },
                                      "state": {
                                        "type": "string",
                                        "enum": [
                                          "applied"
                                        ]
                                      },
                                      "propagated_at": {
                                        "type": "string",
                                        "format": "date-time"
                                      },
                                      "reason": {
                                        "type": "null"
                                      }
                                    },
                                    "required": [
                                      "consumer",
                                      "state",
                                      "propagated_at",
                                      "reason"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "consumer": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 120
                                      },
                                      "state": {
                                        "type": "string",
                                        "enum": [
                                          "failed"
                                        ]
                                      },
                                      "propagated_at": {
                                        "type": "string",
                                        "format": "date-time"
                                      },
                                      "reason": {
                                        "type": "object",
                                        "properties": {
                                          "code": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 120
                                          },
                                          "message": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 1000
                                          },
                                          "retryable": {
                                            "type": "boolean"
                                          },
                                          "recovery_action": {
                                            "oneOf": [
                                              {
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 500
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "code",
                                          "message",
                                          "retryable",
                                          "recovery_action"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "consumer",
                                      "state",
                                      "propagated_at",
                                      "reason"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "consumer": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 120
                                      },
                                      "state": {
                                        "type": "string",
                                        "enum": [
                                          "not_applicable"
                                        ]
                                      },
                                      "propagated_at": {
                                        "type": "string",
                                        "format": "date-time"
                                      },
                                      "reason": {
                                        "type": "object",
                                        "properties": {
                                          "code": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 120
                                          },
                                          "message": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 1000
                                          },
                                          "retryable": {
                                            "type": "boolean"
                                          },
                                          "recovery_action": {
                                            "oneOf": [
                                              {
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 500
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "code",
                                          "message",
                                          "retryable",
                                          "recovery_action"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "consumer",
                                      "state",
                                      "propagated_at",
                                      "reason"
                                    ]
                                  }
                                ]
                              }
                            },
                            "server_timestamp": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "correlation_id": {
                              "type": "string",
                              "minLength": 8,
                              "maxLength": 200
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "queued"
                              ]
                            },
                            "reason": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "code": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 120
                                    },
                                    "message": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 1000
                                    },
                                    "retryable": {
                                      "type": "boolean"
                                    },
                                    "recovery_action": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 500
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "code",
                                    "message",
                                    "retryable",
                                    "recovery_action"
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "schema_version",
                            "receipt_id",
                            "entity",
                            "scope",
                            "actor_user_id",
                            "consumers",
                            "server_timestamp",
                            "correlation_id",
                            "status",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "schema_version": {
                              "type": "number",
                              "enum": [
                                1
                              ]
                            },
                            "receipt_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "entity": {
                              "type": "object",
                              "properties": {
                                "entity_type": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "entity_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "entity_version": {
                                  "oneOf": [
                                    {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 200
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "entity_type",
                                "entity_id",
                                "entity_version"
                              ]
                            },
                            "scope": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "schema_version": {
                                      "type": "number",
                                      "enum": [
                                        1
                                      ]
                                    },
                                    "kind": {
                                      "type": "string",
                                      "enum": [
                                        "tenant"
                                      ]
                                    },
                                    "tenant_id": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "league_id": {
                                      "type": "null"
                                    },
                                    "match_id": {
                                      "type": "null"
                                    }
                                  },
                                  "required": [
                                    "schema_version",
                                    "kind",
                                    "tenant_id",
                                    "league_id",
                                    "match_id"
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "schema_version": {
                                      "type": "number",
                                      "enum": [
                                        1
                                      ]
                                    },
                                    "kind": {
                                      "type": "string",
                                      "enum": [
                                        "league"
                                      ]
                                    },
                                    "tenant_id": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "league_id": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "match_id": {
                                      "type": "null"
                                    }
                                  },
                                  "required": [
                                    "schema_version",
                                    "kind",
                                    "tenant_id",
                                    "league_id",
                                    "match_id"
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "schema_version": {
                                      "type": "number",
                                      "enum": [
                                        1
                                      ]
                                    },
                                    "kind": {
                                      "type": "string",
                                      "enum": [
                                        "match"
                                      ]
                                    },
                                    "tenant_id": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "league_id": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "match_id": {
                                      "type": "string",
                                      "format": "uuid"
                                    }
                                  },
                                  "required": [
                                    "schema_version",
                                    "kind",
                                    "tenant_id",
                                    "league_id",
                                    "match_id"
                                  ]
                                }
                              ]
                            },
                            "actor_user_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "consumers": {
                              "type": "array",
                              "items": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "consumer": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 120
                                      },
                                      "state": {
                                        "type": "string",
                                        "enum": [
                                          "pending"
                                        ]
                                      },
                                      "propagated_at": {
                                        "type": "null"
                                      },
                                      "reason": {
                                        "type": "null"
                                      }
                                    },
                                    "required": [
                                      "consumer",
                                      "state",
                                      "propagated_at",
                                      "reason"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "consumer": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 120
                                      },
                                      "state": {
                                        "type": "string",
                                        "enum": [
                                          "applied"
                                        ]
                                      },
                                      "propagated_at": {
                                        "type": "string",
                                        "format": "date-time"
                                      },
                                      "reason": {
                                        "type": "null"
                                      }
                                    },
                                    "required": [
                                      "consumer",
                                      "state",
                                      "propagated_at",
                                      "reason"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "consumer": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 120
                                      },
                                      "state": {
                                        "type": "string",
                                        "enum": [
                                          "failed"
                                        ]
                                      },
                                      "propagated_at": {
                                        "type": "string",
                                        "format": "date-time"
                                      },
                                      "reason": {
                                        "type": "object",
                                        "properties": {
                                          "code": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 120
                                          },
                                          "message": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 1000
                                          },
                                          "retryable": {
                                            "type": "boolean"
                                          },
                                          "recovery_action": {
                                            "oneOf": [
                                              {
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 500
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "code",
                                          "message",
                                          "retryable",
                                          "recovery_action"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "consumer",
                                      "state",
                                      "propagated_at",
                                      "reason"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "consumer": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 120
                                      },
                                      "state": {
                                        "type": "string",
                                        "enum": [
                                          "not_applicable"
                                        ]
                                      },
                                      "propagated_at": {
                                        "type": "string",
                                        "format": "date-time"
                                      },
                                      "reason": {
                                        "type": "object",
                                        "properties": {
                                          "code": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 120
                                          },
                                          "message": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 1000
                                          },
                                          "retryable": {
                                            "type": "boolean"
                                          },
                                          "recovery_action": {
                                            "oneOf": [
                                              {
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 500
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "code",
                                          "message",
                                          "retryable",
                                          "recovery_action"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "consumer",
                                      "state",
                                      "propagated_at",
                                      "reason"
                                    ]
                                  }
                                ]
                              }
                            },
                            "server_timestamp": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "correlation_id": {
                              "type": "string",
                              "minLength": 8,
                              "maxLength": 200
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "accepted"
                              ]
                            },
                            "reason": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "code": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 120
                                    },
                                    "message": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 1000
                                    },
                                    "retryable": {
                                      "type": "boolean"
                                    },
                                    "recovery_action": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 500
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "code",
                                    "message",
                                    "retryable",
                                    "recovery_action"
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "schema_version",
                            "receipt_id",
                            "entity",
                            "scope",
                            "actor_user_id",
                            "consumers",
                            "server_timestamp",
                            "correlation_id",
                            "status",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "schema_version": {
                              "type": "number",
                              "enum": [
                                1
                              ]
                            },
                            "receipt_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "entity": {
                              "type": "object",
                              "properties": {
                                "entity_type": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "entity_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "entity_version": {
                                  "oneOf": [
                                    {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 200
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "entity_type",
                                "entity_id",
                                "entity_version"
                              ]
                            },
                            "scope": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "schema_version": {
                                      "type": "number",
                                      "enum": [
                                        1
                                      ]
                                    },
                                    "kind": {
                                      "type": "string",
                                      "enum": [
                                        "tenant"
                                      ]
                                    },
                                    "tenant_id": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "league_id": {
                                      "type": "null"
                                    },
                                    "match_id": {
                                      "type": "null"
                                    }
                                  },
                                  "required": [
                                    "schema_version",
                                    "kind",
                                    "tenant_id",
                                    "league_id",
                                    "match_id"
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "schema_version": {
                                      "type": "number",
                                      "enum": [
                                        1
                                      ]
                                    },
                                    "kind": {
                                      "type": "string",
                                      "enum": [
                                        "league"
                                      ]
                                    },
                                    "tenant_id": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "league_id": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "match_id": {
                                      "type": "null"
                                    }
                                  },
                                  "required": [
                                    "schema_version",
                                    "kind",
                                    "tenant_id",
                                    "league_id",
                                    "match_id"
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "schema_version": {
                                      "type": "number",
                                      "enum": [
                                        1
                                      ]
                                    },
                                    "kind": {
                                      "type": "string",
                                      "enum": [
                                        "match"
                                      ]
                                    },
                                    "tenant_id": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "league_id": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "match_id": {
                                      "type": "string",
                                      "format": "uuid"
                                    }
                                  },
                                  "required": [
                                    "schema_version",
                                    "kind",
                                    "tenant_id",
                                    "league_id",
                                    "match_id"
                                  ]
                                }
                              ]
                            },
                            "actor_user_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "consumers": {
                              "type": "array",
                              "items": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "consumer": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 120
                                      },
                                      "state": {
                                        "type": "string",
                                        "enum": [
                                          "pending"
                                        ]
                                      },
                                      "propagated_at": {
                                        "type": "null"
                                      },
                                      "reason": {
                                        "type": "null"
                                      }
                                    },
                                    "required": [
                                      "consumer",
                                      "state",
                                      "propagated_at",
                                      "reason"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "consumer": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 120
                                      },
                                      "state": {
                                        "type": "string",
                                        "enum": [
                                          "applied"
                                        ]
                                      },
                                      "propagated_at": {
                                        "type": "string",
                                        "format": "date-time"
                                      },
                                      "reason": {
                                        "type": "null"
                                      }
                                    },
                                    "required": [
                                      "consumer",
                                      "state",
                                      "propagated_at",
                                      "reason"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "consumer": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 120
                                      },
                                      "state": {
                                        "type": "string",
                                        "enum": [
                                          "failed"
                                        ]
                                      },
                                      "propagated_at": {
                                        "type": "string",
                                        "format": "date-time"
                                      },
                                      "reason": {
                                        "type": "object",
                                        "properties": {
                                          "code": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 120
                                          },
                                          "message": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 1000
                                          },
                                          "retryable": {
                                            "type": "boolean"
                                          },
                                          "recovery_action": {
                                            "oneOf": [
                                              {
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 500
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "code",
                                          "message",
                                          "retryable",
                                          "recovery_action"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "consumer",
                                      "state",
                                      "propagated_at",
                                      "reason"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "consumer": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 120
                                      },
                                      "state": {
                                        "type": "string",
                                        "enum": [
                                          "not_applicable"
                                        ]
                                      },
                                      "propagated_at": {
                                        "type": "string",
                                        "format": "date-time"
                                      },
                                      "reason": {
                                        "type": "object",
                                        "properties": {
                                          "code": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 120
                                          },
                                          "message": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 1000
                                          },
                                          "retryable": {
                                            "type": "boolean"
                                          },
                                          "recovery_action": {
                                            "oneOf": [
                                              {
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 500
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "code",
                                          "message",
                                          "retryable",
                                          "recovery_action"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "consumer",
                                      "state",
                                      "propagated_at",
                                      "reason"
                                    ]
                                  }
                                ]
                              }
                            },
                            "server_timestamp": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "correlation_id": {
                              "type": "string",
                              "minLength": 8,
                              "maxLength": 200
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "rejected"
                              ]
                            },
                            "reason": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "message": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1000
                                },
                                "retryable": {
                                  "type": "boolean"
                                },
                                "recovery_action": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 500
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "code",
                                "message",
                                "retryable",
                                "recovery_action"
                              ]
                            }
                          },
                          "required": [
                            "schema_version",
                            "receipt_id",
                            "entity",
                            "scope",
                            "actor_user_id",
                            "consumers",
                            "server_timestamp",
                            "correlation_id",
                            "status",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "schema_version": {
                              "type": "number",
                              "enum": [
                                1
                              ]
                            },
                            "receipt_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "entity": {
                              "type": "object",
                              "properties": {
                                "entity_type": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "entity_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "entity_version": {
                                  "oneOf": [
                                    {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 200
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "entity_type",
                                "entity_id",
                                "entity_version"
                              ]
                            },
                            "scope": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "schema_version": {
                                      "type": "number",
                                      "enum": [
                                        1
                                      ]
                                    },
                                    "kind": {
                                      "type": "string",
                                      "enum": [
                                        "tenant"
                                      ]
                                    },
                                    "tenant_id": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "league_id": {
                                      "type": "null"
                                    },
                                    "match_id": {
                                      "type": "null"
                                    }
                                  },
                                  "required": [
                                    "schema_version",
                                    "kind",
                                    "tenant_id",
                                    "league_id",
                                    "match_id"
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "schema_version": {
                                      "type": "number",
                                      "enum": [
                                        1
                                      ]
                                    },
                                    "kind": {
                                      "type": "string",
                                      "enum": [
                                        "league"
                                      ]
                                    },
                                    "tenant_id": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "league_id": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "match_id": {
                                      "type": "null"
                                    }
                                  },
                                  "required": [
                                    "schema_version",
                                    "kind",
                                    "tenant_id",
                                    "league_id",
                                    "match_id"
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "schema_version": {
                                      "type": "number",
                                      "enum": [
                                        1
                                      ]
                                    },
                                    "kind": {
                                      "type": "string",
                                      "enum": [
                                        "match"
                                      ]
                                    },
                                    "tenant_id": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "league_id": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "match_id": {
                                      "type": "string",
                                      "format": "uuid"
                                    }
                                  },
                                  "required": [
                                    "schema_version",
                                    "kind",
                                    "tenant_id",
                                    "league_id",
                                    "match_id"
                                  ]
                                }
                              ]
                            },
                            "actor_user_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "consumers": {
                              "type": "array",
                              "items": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "consumer": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 120
                                      },
                                      "state": {
                                        "type": "string",
                                        "enum": [
                                          "pending"
                                        ]
                                      },
                                      "propagated_at": {
                                        "type": "null"
                                      },
                                      "reason": {
                                        "type": "null"
                                      }
                                    },
                                    "required": [
                                      "consumer",
                                      "state",
                                      "propagated_at",
                                      "reason"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "consumer": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 120
                                      },
                                      "state": {
                                        "type": "string",
                                        "enum": [
                                          "applied"
                                        ]
                                      },
                                      "propagated_at": {
                                        "type": "string",
                                        "format": "date-time"
                                      },
                                      "reason": {
                                        "type": "null"
                                      }
                                    },
                                    "required": [
                                      "consumer",
                                      "state",
                                      "propagated_at",
                                      "reason"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "consumer": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 120
                                      },
                                      "state": {
                                        "type": "string",
                                        "enum": [
                                          "failed"
                                        ]
                                      },
                                      "propagated_at": {
                                        "type": "string",
                                        "format": "date-time"
                                      },
                                      "reason": {
                                        "type": "object",
                                        "properties": {
                                          "code": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 120
                                          },
                                          "message": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 1000
                                          },
                                          "retryable": {
                                            "type": "boolean"
                                          },
                                          "recovery_action": {
                                            "oneOf": [
                                              {
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 500
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "code",
                                          "message",
                                          "retryable",
                                          "recovery_action"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "consumer",
                                      "state",
                                      "propagated_at",
                                      "reason"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "consumer": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 120
                                      },
                                      "state": {
                                        "type": "string",
                                        "enum": [
                                          "not_applicable"
                                        ]
                                      },
                                      "propagated_at": {
                                        "type": "string",
                                        "format": "date-time"
                                      },
                                      "reason": {
                                        "type": "object",
                                        "properties": {
                                          "code": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 120
                                          },
                                          "message": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 1000
                                          },
                                          "retryable": {
                                            "type": "boolean"
                                          },
                                          "recovery_action": {
                                            "oneOf": [
                                              {
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 500
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "code",
                                          "message",
                                          "retryable",
                                          "recovery_action"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "consumer",
                                      "state",
                                      "propagated_at",
                                      "reason"
                                    ]
                                  }
                                ]
                              }
                            },
                            "server_timestamp": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "correlation_id": {
                              "type": "string",
                              "minLength": 8,
                              "maxLength": 200
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "superseded"
                              ]
                            },
                            "reason": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "message": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1000
                                },
                                "retryable": {
                                  "type": "boolean"
                                },
                                "recovery_action": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 500
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "code",
                                "message",
                                "retryable",
                                "recovery_action"
                              ]
                            }
                          },
                          "required": [
                            "schema_version",
                            "receipt_id",
                            "entity",
                            "scope",
                            "actor_user_id",
                            "consumers",
                            "server_timestamp",
                            "correlation_id",
                            "status",
                            "reason"
                          ]
                        }
                      ]
                    },
                    "rows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "receipt_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "evaluation_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "player_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "queued",
                              "accepted",
                              "rejected",
                              "superseded"
                            ]
                          },
                          "participation_status": {
                            "type": "string",
                            "enum": [
                              "not_listed",
                              "starter",
                              "substitute_entered",
                              "substitute_not_entered",
                              "not_verifiable"
                            ]
                          },
                          "minutes_played": {
                            "oneOf": [
                              {
                                "type": "integer",
                                "minimum": 0
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "outcome": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "graded"
                                    ]
                                  },
                                  "value": {
                                    "type": "number",
                                    "minimum": 1,
                                    "maximum": 10
                                  }
                                },
                                "required": [
                                  "kind",
                                  "value"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "no_grade"
                                    ]
                                  },
                                  "reason": {
                                    "type": "string",
                                    "enum": [
                                      "not_entered",
                                      "not_listed",
                                      "insufficient_observation",
                                      "match_not_played",
                                      "not_verifiable"
                                    ]
                                  }
                                },
                                "required": [
                                  "kind",
                                  "reason"
                                ]
                              }
                            ]
                          },
                          "receipt": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "schema_version": {
                                    "type": "number",
                                    "enum": [
                                      1
                                    ]
                                  },
                                  "receipt_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "entity": {
                                    "type": "object",
                                    "properties": {
                                      "entity_type": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 120
                                      },
                                      "entity_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "entity_version": {
                                        "oneOf": [
                                          {
                                            "type": "integer",
                                            "minimum": 0
                                          },
                                          {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 200
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "entity_type",
                                      "entity_id",
                                      "entity_version"
                                    ]
                                  },
                                  "scope": {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "schema_version": {
                                            "type": "number",
                                            "enum": [
                                              1
                                            ]
                                          },
                                          "kind": {
                                            "type": "string",
                                            "enum": [
                                              "tenant"
                                            ]
                                          },
                                          "tenant_id": {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          "league_id": {
                                            "type": "null"
                                          },
                                          "match_id": {
                                            "type": "null"
                                          }
                                        },
                                        "required": [
                                          "schema_version",
                                          "kind",
                                          "tenant_id",
                                          "league_id",
                                          "match_id"
                                        ]
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "schema_version": {
                                            "type": "number",
                                            "enum": [
                                              1
                                            ]
                                          },
                                          "kind": {
                                            "type": "string",
                                            "enum": [
                                              "league"
                                            ]
                                          },
                                          "tenant_id": {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          "league_id": {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          "match_id": {
                                            "type": "null"
                                          }
                                        },
                                        "required": [
                                          "schema_version",
                                          "kind",
                                          "tenant_id",
                                          "league_id",
                                          "match_id"
                                        ]
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "schema_version": {
                                            "type": "number",
                                            "enum": [
                                              1
                                            ]
                                          },
                                          "kind": {
                                            "type": "string",
                                            "enum": [
                                              "match"
                                            ]
                                          },
                                          "tenant_id": {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          "league_id": {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          "match_id": {
                                            "type": "string",
                                            "format": "uuid"
                                          }
                                        },
                                        "required": [
                                          "schema_version",
                                          "kind",
                                          "tenant_id",
                                          "league_id",
                                          "match_id"
                                        ]
                                      }
                                    ]
                                  },
                                  "actor_user_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "consumers": {
                                    "type": "array",
                                    "items": {
                                      "oneOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "consumer": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 120
                                            },
                                            "state": {
                                              "type": "string",
                                              "enum": [
                                                "pending"
                                              ]
                                            },
                                            "propagated_at": {
                                              "type": "null"
                                            },
                                            "reason": {
                                              "type": "null"
                                            }
                                          },
                                          "required": [
                                            "consumer",
                                            "state",
                                            "propagated_at",
                                            "reason"
                                          ]
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "consumer": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 120
                                            },
                                            "state": {
                                              "type": "string",
                                              "enum": [
                                                "applied"
                                              ]
                                            },
                                            "propagated_at": {
                                              "type": "string",
                                              "format": "date-time"
                                            },
                                            "reason": {
                                              "type": "null"
                                            }
                                          },
                                          "required": [
                                            "consumer",
                                            "state",
                                            "propagated_at",
                                            "reason"
                                          ]
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "consumer": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 120
                                            },
                                            "state": {
                                              "type": "string",
                                              "enum": [
                                                "failed"
                                              ]
                                            },
                                            "propagated_at": {
                                              "type": "string",
                                              "format": "date-time"
                                            },
                                            "reason": {
                                              "type": "object",
                                              "properties": {
                                                "code": {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 120
                                                },
                                                "message": {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 1000
                                                },
                                                "retryable": {
                                                  "type": "boolean"
                                                },
                                                "recovery_action": {
                                                  "oneOf": [
                                                    {
                                                      "type": "string",
                                                      "minLength": 1,
                                                      "maxLength": 500
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "code",
                                                "message",
                                                "retryable",
                                                "recovery_action"
                                              ]
                                            }
                                          },
                                          "required": [
                                            "consumer",
                                            "state",
                                            "propagated_at",
                                            "reason"
                                          ]
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "consumer": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 120
                                            },
                                            "state": {
                                              "type": "string",
                                              "enum": [
                                                "not_applicable"
                                              ]
                                            },
                                            "propagated_at": {
                                              "type": "string",
                                              "format": "date-time"
                                            },
                                            "reason": {
                                              "type": "object",
                                              "properties": {
                                                "code": {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 120
                                                },
                                                "message": {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 1000
                                                },
                                                "retryable": {
                                                  "type": "boolean"
                                                },
                                                "recovery_action": {
                                                  "oneOf": [
                                                    {
                                                      "type": "string",
                                                      "minLength": 1,
                                                      "maxLength": 500
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "code",
                                                "message",
                                                "retryable",
                                                "recovery_action"
                                              ]
                                            }
                                          },
                                          "required": [
                                            "consumer",
                                            "state",
                                            "propagated_at",
                                            "reason"
                                          ]
                                        }
                                      ]
                                    }
                                  },
                                  "server_timestamp": {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  "correlation_id": {
                                    "type": "string",
                                    "minLength": 8,
                                    "maxLength": 200
                                  },
                                  "status": {
                                    "type": "string",
                                    "enum": [
                                      "queued"
                                    ]
                                  },
                                  "reason": {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "code": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 120
                                          },
                                          "message": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 1000
                                          },
                                          "retryable": {
                                            "type": "boolean"
                                          },
                                          "recovery_action": {
                                            "oneOf": [
                                              {
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 500
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "code",
                                          "message",
                                          "retryable",
                                          "recovery_action"
                                        ]
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "schema_version",
                                  "receipt_id",
                                  "entity",
                                  "scope",
                                  "actor_user_id",
                                  "consumers",
                                  "server_timestamp",
                                  "correlation_id",
                                  "status",
                                  "reason"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "schema_version": {
                                    "type": "number",
                                    "enum": [
                                      1
                                    ]
                                  },
                                  "receipt_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "entity": {
                                    "type": "object",
                                    "properties": {
                                      "entity_type": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 120
                                      },
                                      "entity_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "entity_version": {
                                        "oneOf": [
                                          {
                                            "type": "integer",
                                            "minimum": 0
                                          },
                                          {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 200
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "entity_type",
                                      "entity_id",
                                      "entity_version"
                                    ]
                                  },
                                  "scope": {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "schema_version": {
                                            "type": "number",
                                            "enum": [
                                              1
                                            ]
                                          },
                                          "kind": {
                                            "type": "string",
                                            "enum": [
                                              "tenant"
                                            ]
                                          },
                                          "tenant_id": {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          "league_id": {
                                            "type": "null"
                                          },
                                          "match_id": {
                                            "type": "null"
                                          }
                                        },
                                        "required": [
                                          "schema_version",
                                          "kind",
                                          "tenant_id",
                                          "league_id",
                                          "match_id"
                                        ]
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "schema_version": {
                                            "type": "number",
                                            "enum": [
                                              1
                                            ]
                                          },
                                          "kind": {
                                            "type": "string",
                                            "enum": [
                                              "league"
                                            ]
                                          },
                                          "tenant_id": {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          "league_id": {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          "match_id": {
                                            "type": "null"
                                          }
                                        },
                                        "required": [
                                          "schema_version",
                                          "kind",
                                          "tenant_id",
                                          "league_id",
                                          "match_id"
                                        ]
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "schema_version": {
                                            "type": "number",
                                            "enum": [
                                              1
                                            ]
                                          },
                                          "kind": {
                                            "type": "string",
                                            "enum": [
                                              "match"
                                            ]
                                          },
                                          "tenant_id": {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          "league_id": {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          "match_id": {
                                            "type": "string",
                                            "format": "uuid"
                                          }
                                        },
                                        "required": [
                                          "schema_version",
                                          "kind",
                                          "tenant_id",
                                          "league_id",
                                          "match_id"
                                        ]
                                      }
                                    ]
                                  },
                                  "actor_user_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "consumers": {
                                    "type": "array",
                                    "items": {
                                      "oneOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "consumer": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 120
                                            },
                                            "state": {
                                              "type": "string",
                                              "enum": [
                                                "pending"
                                              ]
                                            },
                                            "propagated_at": {
                                              "type": "null"
                                            },
                                            "reason": {
                                              "type": "null"
                                            }
                                          },
                                          "required": [
                                            "consumer",
                                            "state",
                                            "propagated_at",
                                            "reason"
                                          ]
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "consumer": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 120
                                            },
                                            "state": {
                                              "type": "string",
                                              "enum": [
                                                "applied"
                                              ]
                                            },
                                            "propagated_at": {
                                              "type": "string",
                                              "format": "date-time"
                                            },
                                            "reason": {
                                              "type": "null"
                                            }
                                          },
                                          "required": [
                                            "consumer",
                                            "state",
                                            "propagated_at",
                                            "reason"
                                          ]
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "consumer": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 120
                                            },
                                            "state": {
                                              "type": "string",
                                              "enum": [
                                                "failed"
                                              ]
                                            },
                                            "propagated_at": {
                                              "type": "string",
                                              "format": "date-time"
                                            },
                                            "reason": {
                                              "type": "object",
                                              "properties": {
                                                "code": {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 120
                                                },
                                                "message": {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 1000
                                                },
                                                "retryable": {
                                                  "type": "boolean"
                                                },
                                                "recovery_action": {
                                                  "oneOf": [
                                                    {
                                                      "type": "string",
                                                      "minLength": 1,
                                                      "maxLength": 500
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "code",
                                                "message",
                                                "retryable",
                                                "recovery_action"
                                              ]
                                            }
                                          },
                                          "required": [
                                            "consumer",
                                            "state",
                                            "propagated_at",
                                            "reason"
                                          ]
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "consumer": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 120
                                            },
                                            "state": {
                                              "type": "string",
                                              "enum": [
                                                "not_applicable"
                                              ]
                                            },
                                            "propagated_at": {
                                              "type": "string",
                                              "format": "date-time"
                                            },
                                            "reason": {
                                              "type": "object",
                                              "properties": {
                                                "code": {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 120
                                                },
                                                "message": {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 1000
                                                },
                                                "retryable": {
                                                  "type": "boolean"
                                                },
                                                "recovery_action": {
                                                  "oneOf": [
                                                    {
                                                      "type": "string",
                                                      "minLength": 1,
                                                      "maxLength": 500
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "code",
                                                "message",
                                                "retryable",
                                                "recovery_action"
                                              ]
                                            }
                                          },
                                          "required": [
                                            "consumer",
                                            "state",
                                            "propagated_at",
                                            "reason"
                                          ]
                                        }
                                      ]
                                    }
                                  },
                                  "server_timestamp": {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  "correlation_id": {
                                    "type": "string",
                                    "minLength": 8,
                                    "maxLength": 200
                                  },
                                  "status": {
                                    "type": "string",
                                    "enum": [
                                      "accepted"
                                    ]
                                  },
                                  "reason": {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "code": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 120
                                          },
                                          "message": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 1000
                                          },
                                          "retryable": {
                                            "type": "boolean"
                                          },
                                          "recovery_action": {
                                            "oneOf": [
                                              {
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 500
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "code",
                                          "message",
                                          "retryable",
                                          "recovery_action"
                                        ]
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "schema_version",
                                  "receipt_id",
                                  "entity",
                                  "scope",
                                  "actor_user_id",
                                  "consumers",
                                  "server_timestamp",
                                  "correlation_id",
                                  "status",
                                  "reason"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "schema_version": {
                                    "type": "number",
                                    "enum": [
                                      1
                                    ]
                                  },
                                  "receipt_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "entity": {
                                    "type": "object",
                                    "properties": {
                                      "entity_type": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 120
                                      },
                                      "entity_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "entity_version": {
                                        "oneOf": [
                                          {
                                            "type": "integer",
                                            "minimum": 0
                                          },
                                          {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 200
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "entity_type",
                                      "entity_id",
                                      "entity_version"
                                    ]
                                  },
                                  "scope": {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "schema_version": {
                                            "type": "number",
                                            "enum": [
                                              1
                                            ]
                                          },
                                          "kind": {
                                            "type": "string",
                                            "enum": [
                                              "tenant"
                                            ]
                                          },
                                          "tenant_id": {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          "league_id": {
                                            "type": "null"
                                          },
                                          "match_id": {
                                            "type": "null"
                                          }
                                        },
                                        "required": [
                                          "schema_version",
                                          "kind",
                                          "tenant_id",
                                          "league_id",
                                          "match_id"
                                        ]
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "schema_version": {
                                            "type": "number",
                                            "enum": [
                                              1
                                            ]
                                          },
                                          "kind": {
                                            "type": "string",
                                            "enum": [
                                              "league"
                                            ]
                                          },
                                          "tenant_id": {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          "league_id": {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          "match_id": {
                                            "type": "null"
                                          }
                                        },
                                        "required": [
                                          "schema_version",
                                          "kind",
                                          "tenant_id",
                                          "league_id",
                                          "match_id"
                                        ]
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "schema_version": {
                                            "type": "number",
                                            "enum": [
                                              1
                                            ]
                                          },
                                          "kind": {
                                            "type": "string",
                                            "enum": [
                                              "match"
                                            ]
                                          },
                                          "tenant_id": {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          "league_id": {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          "match_id": {
                                            "type": "string",
                                            "format": "uuid"
                                          }
                                        },
                                        "required": [
                                          "schema_version",
                                          "kind",
                                          "tenant_id",
                                          "league_id",
                                          "match_id"
                                        ]
                                      }
                                    ]
                                  },
                                  "actor_user_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "consumers": {
                                    "type": "array",
                                    "items": {
                                      "oneOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "consumer": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 120
                                            },
                                            "state": {
                                              "type": "string",
                                              "enum": [
                                                "pending"
                                              ]
                                            },
                                            "propagated_at": {
                                              "type": "null"
                                            },
                                            "reason": {
                                              "type": "null"
                                            }
                                          },
                                          "required": [
                                            "consumer",
                                            "state",
                                            "propagated_at",
                                            "reason"
                                          ]
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "consumer": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 120
                                            },
                                            "state": {
                                              "type": "string",
                                              "enum": [
                                                "applied"
                                              ]
                                            },
                                            "propagated_at": {
                                              "type": "string",
                                              "format": "date-time"
                                            },
                                            "reason": {
                                              "type": "null"
                                            }
                                          },
                                          "required": [
                                            "consumer",
                                            "state",
                                            "propagated_at",
                                            "reason"
                                          ]
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "consumer": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 120
                                            },
                                            "state": {
                                              "type": "string",
                                              "enum": [
                                                "failed"
                                              ]
                                            },
                                            "propagated_at": {
                                              "type": "string",
                                              "format": "date-time"
                                            },
                                            "reason": {
                                              "type": "object",
                                              "properties": {
                                                "code": {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 120
                                                },
                                                "message": {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 1000
                                                },
                                                "retryable": {
                                                  "type": "boolean"
                                                },
                                                "recovery_action": {
                                                  "oneOf": [
                                                    {
                                                      "type": "string",
                                                      "minLength": 1,
                                                      "maxLength": 500
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "code",
                                                "message",
                                                "retryable",
                                                "recovery_action"
                                              ]
                                            }
                                          },
                                          "required": [
                                            "consumer",
                                            "state",
                                            "propagated_at",
                                            "reason"
                                          ]
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "consumer": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 120
                                            },
                                            "state": {
                                              "type": "string",
                                              "enum": [
                                                "not_applicable"
                                              ]
                                            },
                                            "propagated_at": {
                                              "type": "string",
                                              "format": "date-time"
                                            },
                                            "reason": {
                                              "type": "object",
                                              "properties": {
                                                "code": {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 120
                                                },
                                                "message": {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 1000
                                                },
                                                "retryable": {
                                                  "type": "boolean"
                                                },
                                                "recovery_action": {
                                                  "oneOf": [
                                                    {
                                                      "type": "string",
                                                      "minLength": 1,
                                                      "maxLength": 500
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "code",
                                                "message",
                                                "retryable",
                                                "recovery_action"
                                              ]
                                            }
                                          },
                                          "required": [
                                            "consumer",
                                            "state",
                                            "propagated_at",
                                            "reason"
                                          ]
                                        }
                                      ]
                                    }
                                  },
                                  "server_timestamp": {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  "correlation_id": {
                                    "type": "string",
                                    "minLength": 8,
                                    "maxLength": 200
                                  },
                                  "status": {
                                    "type": "string",
                                    "enum": [
                                      "rejected"
                                    ]
                                  },
                                  "reason": {
                                    "type": "object",
                                    "properties": {
                                      "code": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 120
                                      },
                                      "message": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 1000
                                      },
                                      "retryable": {
                                        "type": "boolean"
                                      },
                                      "recovery_action": {
                                        "oneOf": [
                                          {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 500
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "code",
                                      "message",
                                      "retryable",
                                      "recovery_action"
                                    ]
                                  }
                                },
                                "required": [
                                  "schema_version",
                                  "receipt_id",
                                  "entity",
                                  "scope",
                                  "actor_user_id",
                                  "consumers",
                                  "server_timestamp",
                                  "correlation_id",
                                  "status",
                                  "reason"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "schema_version": {
                                    "type": "number",
                                    "enum": [
                                      1
                                    ]
                                  },
                                  "receipt_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "entity": {
                                    "type": "object",
                                    "properties": {
                                      "entity_type": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 120
                                      },
                                      "entity_id": {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      "entity_version": {
                                        "oneOf": [
                                          {
                                            "type": "integer",
                                            "minimum": 0
                                          },
                                          {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 200
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "entity_type",
                                      "entity_id",
                                      "entity_version"
                                    ]
                                  },
                                  "scope": {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "schema_version": {
                                            "type": "number",
                                            "enum": [
                                              1
                                            ]
                                          },
                                          "kind": {
                                            "type": "string",
                                            "enum": [
                                              "tenant"
                                            ]
                                          },
                                          "tenant_id": {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          "league_id": {
                                            "type": "null"
                                          },
                                          "match_id": {
                                            "type": "null"
                                          }
                                        },
                                        "required": [
                                          "schema_version",
                                          "kind",
                                          "tenant_id",
                                          "league_id",
                                          "match_id"
                                        ]
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "schema_version": {
                                            "type": "number",
                                            "enum": [
                                              1
                                            ]
                                          },
                                          "kind": {
                                            "type": "string",
                                            "enum": [
                                              "league"
                                            ]
                                          },
                                          "tenant_id": {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          "league_id": {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          "match_id": {
                                            "type": "null"
                                          }
                                        },
                                        "required": [
                                          "schema_version",
                                          "kind",
                                          "tenant_id",
                                          "league_id",
                                          "match_id"
                                        ]
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "schema_version": {
                                            "type": "number",
                                            "enum": [
                                              1
                                            ]
                                          },
                                          "kind": {
                                            "type": "string",
                                            "enum": [
                                              "match"
                                            ]
                                          },
                                          "tenant_id": {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          "league_id": {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          "match_id": {
                                            "type": "string",
                                            "format": "uuid"
                                          }
                                        },
                                        "required": [
                                          "schema_version",
                                          "kind",
                                          "tenant_id",
                                          "league_id",
                                          "match_id"
                                        ]
                                      }
                                    ]
                                  },
                                  "actor_user_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "consumers": {
                                    "type": "array",
                                    "items": {
                                      "oneOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "consumer": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 120
                                            },
                                            "state": {
                                              "type": "string",
                                              "enum": [
                                                "pending"
                                              ]
                                            },
                                            "propagated_at": {
                                              "type": "null"
                                            },
                                            "reason": {
                                              "type": "null"
                                            }
                                          },
                                          "required": [
                                            "consumer",
                                            "state",
                                            "propagated_at",
                                            "reason"
                                          ]
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "consumer": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 120
                                            },
                                            "state": {
                                              "type": "string",
                                              "enum": [
                                                "applied"
                                              ]
                                            },
                                            "propagated_at": {
                                              "type": "string",
                                              "format": "date-time"
                                            },
                                            "reason": {
                                              "type": "null"
                                            }
                                          },
                                          "required": [
                                            "consumer",
                                            "state",
                                            "propagated_at",
                                            "reason"
                                          ]
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "consumer": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 120
                                            },
                                            "state": {
                                              "type": "string",
                                              "enum": [
                                                "failed"
                                              ]
                                            },
                                            "propagated_at": {
                                              "type": "string",
                                              "format": "date-time"
                                            },
                                            "reason": {
                                              "type": "object",
                                              "properties": {
                                                "code": {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 120
                                                },
                                                "message": {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 1000
                                                },
                                                "retryable": {
                                                  "type": "boolean"
                                                },
                                                "recovery_action": {
                                                  "oneOf": [
                                                    {
                                                      "type": "string",
                                                      "minLength": 1,
                                                      "maxLength": 500
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "code",
                                                "message",
                                                "retryable",
                                                "recovery_action"
                                              ]
                                            }
                                          },
                                          "required": [
                                            "consumer",
                                            "state",
                                            "propagated_at",
                                            "reason"
                                          ]
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "consumer": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 120
                                            },
                                            "state": {
                                              "type": "string",
                                              "enum": [
                                                "not_applicable"
                                              ]
                                            },
                                            "propagated_at": {
                                              "type": "string",
                                              "format": "date-time"
                                            },
                                            "reason": {
                                              "type": "object",
                                              "properties": {
                                                "code": {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 120
                                                },
                                                "message": {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 1000
                                                },
                                                "retryable": {
                                                  "type": "boolean"
                                                },
                                                "recovery_action": {
                                                  "oneOf": [
                                                    {
                                                      "type": "string",
                                                      "minLength": 1,
                                                      "maxLength": 500
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "code",
                                                "message",
                                                "retryable",
                                                "recovery_action"
                                              ]
                                            }
                                          },
                                          "required": [
                                            "consumer",
                                            "state",
                                            "propagated_at",
                                            "reason"
                                          ]
                                        }
                                      ]
                                    }
                                  },
                                  "server_timestamp": {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  "correlation_id": {
                                    "type": "string",
                                    "minLength": 8,
                                    "maxLength": 200
                                  },
                                  "status": {
                                    "type": "string",
                                    "enum": [
                                      "superseded"
                                    ]
                                  },
                                  "reason": {
                                    "type": "object",
                                    "properties": {
                                      "code": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 120
                                      },
                                      "message": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 1000
                                      },
                                      "retryable": {
                                        "type": "boolean"
                                      },
                                      "recovery_action": {
                                        "oneOf": [
                                          {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 500
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "code",
                                      "message",
                                      "retryable",
                                      "recovery_action"
                                    ]
                                  }
                                },
                                "required": [
                                  "schema_version",
                                  "receipt_id",
                                  "entity",
                                  "scope",
                                  "actor_user_id",
                                  "consumers",
                                  "server_timestamp",
                                  "correlation_id",
                                  "status",
                                  "reason"
                                ]
                              }
                            ]
                          }
                        },
                        "required": [
                          "receipt_id",
                          "evaluation_id",
                          "player_id",
                          "status",
                          "participation_status",
                          "minutes_played",
                          "outcome",
                          "receipt"
                        ]
                      },
                      "minItems": 1,
                      "maxItems": 100
                    }
                  },
                  "required": [
                    "receipt_id",
                    "receipt_version",
                    "manifest_version",
                    "manifest_hash",
                    "match_id",
                    "scope",
                    "report_version_id",
                    "participation_revision",
                    "ruleset",
                    "idempotency_key",
                    "status",
                    "submitted_at",
                    "receipt",
                    "rows"
                  ]
                }
              ]
            }
          },
          "evaluation_authority": {
            "$ref": "#/components/schemas/EvaluationAuthorityV2"
          }
        },
        "required": [
          "items",
          "evaluation_authority"
        ]
      },
      "MvpProposeRequest": {
        "type": "object",
        "properties": {
          "player_id": {
            "type": "string",
            "format": "uuid"
          },
          "idempotency_key": {
            "type": "string",
            "minLength": 8,
            "maxLength": 200
          }
        },
        "required": [
          "player_id"
        ]
      },
      "MvpProposeIdempotentV2Request": {
        "type": "object",
        "properties": {
          "player_id": {
            "type": "string",
            "format": "uuid"
          },
          "idempotency_key": {
            "type": "string",
            "minLength": 8,
            "maxLength": 200
          }
        },
        "required": [
          "player_id",
          "idempotency_key"
        ]
      },
      "AdminMvpDecideRequest": {
        "type": "object",
        "properties": {
          "decision": {
            "type": "string",
            "enum": [
              "accepted",
              "rejected"
            ]
          }
        },
        "required": [
          "decision"
        ]
      },
      "MvpProposalRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "match_id": {
            "type": "string",
            "format": "uuid"
          },
          "player_id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "enum": [
              "proposed",
              "accepted",
              "rejected"
            ]
          },
          "proposed_at": {
            "type": "string",
            "format": "date-time"
          },
          "decided_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "match_id",
          "player_id",
          "status",
          "proposed_at",
          "decided_at"
        ]
      },
      "MvpProposalList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "match_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "player_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "proposed",
                    "accepted",
                    "rejected"
                  ]
                },
                "proposed_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "decided_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "match_id",
                "player_id",
                "status",
                "proposed_at",
                "decided_at"
              ]
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "EvaluatorMvpProposalRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "match_id": {
            "type": "string",
            "format": "uuid"
          },
          "player_id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "enum": [
              "proposed",
              "accepted",
              "rejected"
            ]
          },
          "proposed_at": {
            "type": "string",
            "format": "date-time"
          },
          "decided_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "operation_id": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "match_id",
          "player_id",
          "status",
          "proposed_at",
          "decided_at",
          "operation_id"
        ]
      },
      "EvaluatorMvpProposalList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "match_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "player_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "proposed",
                    "accepted",
                    "rejected"
                  ]
                },
                "proposed_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "decided_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "operation_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "minLength": 1
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "match_id",
                "player_id",
                "status",
                "proposed_at",
                "decided_at",
                "operation_id"
              ]
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "AdminFantasyRecomputeRequest": {
        "type": "object",
        "properties": {
          "match_id": {
            "type": "string",
            "format": "uuid"
          },
          "report_version_id": {
            "type": "string",
            "format": "uuid"
          },
          "league_id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "match_id",
          "report_version_id",
          "league_id"
        ]
      },
      "AdminFantasyFinalizationBatchRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "league_id": {
            "type": "string",
            "format": "uuid"
          },
          "match_id": {
            "type": "string",
            "format": "uuid"
          },
          "report_version_id": {
            "type": "string",
            "format": "uuid"
          },
          "report_version_number": {
            "type": "integer",
            "minimum": 1
          },
          "status": {
            "type": "string",
            "enum": [
              "final",
              "superseded",
              "failed"
            ]
          },
          "scoring_run_batch_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "finalized_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "superseded_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "superseded_by_batch_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "failure_reason": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "failure_code": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "scoring_missing",
                  "scoring_failed",
                  "scoring_provisional",
                  "scoring_evidence_stale",
                  "scoring_empty_output",
                  "report_link_invalid",
                  "report_not_official",
                  "correction_window_expired",
                  "unknown_error"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "failure_metadata": {
            "oneOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ]
          },
          "match_label": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "league_label": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "tenant_id",
          "league_id",
          "match_id",
          "report_version_id",
          "report_version_number",
          "status",
          "scoring_run_batch_ids",
          "finalized_at",
          "superseded_at",
          "superseded_by_batch_id",
          "failure_reason",
          "failure_code",
          "failure_metadata",
          "match_label",
          "league_label"
        ]
      },
      "AdminFantasyFinalizationBatchList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "tenant_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "league_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "match_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "report_version_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "report_version_number": {
                  "type": "integer",
                  "minimum": 1
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "final",
                    "superseded",
                    "failed"
                  ]
                },
                "scoring_run_batch_ids": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "finalized_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "superseded_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "superseded_by_batch_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "failure_reason": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "failure_code": {
                  "oneOf": [
                    {
                      "type": "string",
                      "enum": [
                        "scoring_missing",
                        "scoring_failed",
                        "scoring_provisional",
                        "scoring_evidence_stale",
                        "scoring_empty_output",
                        "report_link_invalid",
                        "report_not_official",
                        "correction_window_expired",
                        "unknown_error"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "failure_metadata": {
                  "oneOf": [
                    {
                      "type": "object",
                      "additionalProperties": true
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "match_label": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "league_label": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "tenant_id",
                "league_id",
                "match_id",
                "report_version_id",
                "report_version_number",
                "status",
                "scoring_run_batch_ids",
                "finalized_at",
                "superseded_at",
                "superseded_by_batch_id",
                "failure_reason",
                "failure_code",
                "failure_metadata",
                "match_label",
                "league_label"
              ]
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "AdminUserRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "email_verified_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "phone_e164": {
            "oneOf": [
              {
                "type": "string",
                "pattern": "^\\+[1-9]\\d{6,14}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "display_name": {
            "type": "string",
            "minLength": 1
          },
          "locale": {
            "type": "string",
            "minLength": 2,
            "maxLength": 8,
            "default": "it-IT"
          },
          "is_minor": {
            "type": "boolean"
          },
          "date_of_birth": {
            "oneOf": [
              {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "guardian_user_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "is_suspended": {
            "type": "boolean"
          },
          "processing_restricted_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "avatar_head_id": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "head-01",
                  "head-02",
                  "head-03",
                  "head-04",
                  "head-05",
                  "head-06",
                  "head-07",
                  "head-08",
                  "head-09",
                  "head-10",
                  "head-11",
                  "head-12",
                  "head-13",
                  "head-14",
                  "head-15",
                  "head-16",
                  "head-17",
                  "head-18",
                  "head-19",
                  "head-20",
                  "head-21",
                  "head-22",
                  "head-23",
                  "head-24",
                  "head-25",
                  "head-26",
                  "head-27",
                  "head-28",
                  "head-29",
                  "head-30",
                  "head-31",
                  "head-32",
                  "head-33",
                  "head-34",
                  "head-35",
                  "head-36",
                  "head-37",
                  "head-38",
                  "head-39",
                  "head-40",
                  "head-41",
                  "head-42",
                  "head-43",
                  "head-44",
                  "head-45",
                  "head-46",
                  "head-47",
                  "head-48",
                  "head-49",
                  "head-50",
                  "head-51",
                  "head-52",
                  "head-53",
                  "head-54",
                  "head-55",
                  "head-56",
                  "head-57",
                  "head-58",
                  "head-59",
                  "head-60",
                  "head-61",
                  "head-62",
                  "head-63",
                  "head-64",
                  "head-65",
                  "head-66",
                  "head-67",
                  "head-68",
                  "head-69",
                  "head-70",
                  "head-71",
                  "head-72",
                  "head-73",
                  "head-74",
                  "head-75",
                  "head-76",
                  "head-77",
                  "head-78",
                  "head-79",
                  "head-80",
                  "head-81",
                  "head-82",
                  "head-83",
                  "head-84",
                  "head-85",
                  "head-86",
                  "head-87",
                  "head-88",
                  "head-89",
                  "head-90",
                  "head-91",
                  "head-92",
                  "head-93",
                  "head-94",
                  "head-95",
                  "head-96",
                  "head-97",
                  "head-98",
                  "head-99",
                  "head-100",
                  "head-101",
                  "head-102",
                  "head-103",
                  "head-104",
                  "head-105",
                  "head-106",
                  "head-107",
                  "head-108",
                  "head-109",
                  "head-110",
                  "head-111",
                  "head-112",
                  "head-113",
                  "head-114",
                  "head-115",
                  "head-116",
                  "head-117",
                  "head-118",
                  "head-119",
                  "head-120",
                  "head-121",
                  "head-122",
                  "head-123",
                  "head-124",
                  "head-125",
                  "head-126",
                  "head-127",
                  "head-128",
                  "head-129",
                  "head-130",
                  "head-131",
                  "head-132",
                  "head-133",
                  "head-134",
                  "head-135",
                  "head-136",
                  "head-137",
                  "head-138",
                  "head-139",
                  "head-140",
                  "head-141",
                  "head-142",
                  "head-143",
                  "head-144",
                  "head-145",
                  "head-146",
                  "head-147",
                  "head-148",
                  "head-149",
                  "head-150",
                  "head-151",
                  "head-152",
                  "head-153",
                  "head-154",
                  "head-155",
                  "head-156",
                  "head-157",
                  "head-158",
                  "head-159",
                  "head-160",
                  "head-161",
                  "head-162",
                  "head-163",
                  "head-164",
                  "head-165",
                  "head-166",
                  "head-167",
                  "head-168",
                  "head-169",
                  "head-170",
                  "head-171",
                  "head-172",
                  "head-173",
                  "head-174",
                  "head-175",
                  "head-176",
                  "head-177",
                  "head-178",
                  "head-179",
                  "head-180",
                  "head-181",
                  "head-182",
                  "head-183"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "updated_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "tenant_id",
          "email",
          "email_verified_at",
          "phone_e164",
          "display_name",
          "is_minor",
          "is_suspended",
          "created_at",
          "updated_at",
          "created_by",
          "updated_by"
        ]
      },
      "AdminUserListResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "tenant_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "email": {
                  "type": "string",
                  "format": "email"
                },
                "email_verified_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "phone_e164": {
                  "oneOf": [
                    {
                      "type": "string",
                      "pattern": "^\\+[1-9]\\d{6,14}$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "display_name": {
                  "type": "string",
                  "minLength": 1
                },
                "locale": {
                  "type": "string",
                  "minLength": 2,
                  "maxLength": 8,
                  "default": "it-IT"
                },
                "is_minor": {
                  "type": "boolean"
                },
                "date_of_birth": {
                  "oneOf": [
                    {
                      "type": "string",
                      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "guardian_user_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "is_suspended": {
                  "type": "boolean"
                },
                "processing_restricted_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "avatar_head_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "enum": [
                        "head-01",
                        "head-02",
                        "head-03",
                        "head-04",
                        "head-05",
                        "head-06",
                        "head-07",
                        "head-08",
                        "head-09",
                        "head-10",
                        "head-11",
                        "head-12",
                        "head-13",
                        "head-14",
                        "head-15",
                        "head-16",
                        "head-17",
                        "head-18",
                        "head-19",
                        "head-20",
                        "head-21",
                        "head-22",
                        "head-23",
                        "head-24",
                        "head-25",
                        "head-26",
                        "head-27",
                        "head-28",
                        "head-29",
                        "head-30",
                        "head-31",
                        "head-32",
                        "head-33",
                        "head-34",
                        "head-35",
                        "head-36",
                        "head-37",
                        "head-38",
                        "head-39",
                        "head-40",
                        "head-41",
                        "head-42",
                        "head-43",
                        "head-44",
                        "head-45",
                        "head-46",
                        "head-47",
                        "head-48",
                        "head-49",
                        "head-50",
                        "head-51",
                        "head-52",
                        "head-53",
                        "head-54",
                        "head-55",
                        "head-56",
                        "head-57",
                        "head-58",
                        "head-59",
                        "head-60",
                        "head-61",
                        "head-62",
                        "head-63",
                        "head-64",
                        "head-65",
                        "head-66",
                        "head-67",
                        "head-68",
                        "head-69",
                        "head-70",
                        "head-71",
                        "head-72",
                        "head-73",
                        "head-74",
                        "head-75",
                        "head-76",
                        "head-77",
                        "head-78",
                        "head-79",
                        "head-80",
                        "head-81",
                        "head-82",
                        "head-83",
                        "head-84",
                        "head-85",
                        "head-86",
                        "head-87",
                        "head-88",
                        "head-89",
                        "head-90",
                        "head-91",
                        "head-92",
                        "head-93",
                        "head-94",
                        "head-95",
                        "head-96",
                        "head-97",
                        "head-98",
                        "head-99",
                        "head-100",
                        "head-101",
                        "head-102",
                        "head-103",
                        "head-104",
                        "head-105",
                        "head-106",
                        "head-107",
                        "head-108",
                        "head-109",
                        "head-110",
                        "head-111",
                        "head-112",
                        "head-113",
                        "head-114",
                        "head-115",
                        "head-116",
                        "head-117",
                        "head-118",
                        "head-119",
                        "head-120",
                        "head-121",
                        "head-122",
                        "head-123",
                        "head-124",
                        "head-125",
                        "head-126",
                        "head-127",
                        "head-128",
                        "head-129",
                        "head-130",
                        "head-131",
                        "head-132",
                        "head-133",
                        "head-134",
                        "head-135",
                        "head-136",
                        "head-137",
                        "head-138",
                        "head-139",
                        "head-140",
                        "head-141",
                        "head-142",
                        "head-143",
                        "head-144",
                        "head-145",
                        "head-146",
                        "head-147",
                        "head-148",
                        "head-149",
                        "head-150",
                        "head-151",
                        "head-152",
                        "head-153",
                        "head-154",
                        "head-155",
                        "head-156",
                        "head-157",
                        "head-158",
                        "head-159",
                        "head-160",
                        "head-161",
                        "head-162",
                        "head-163",
                        "head-164",
                        "head-165",
                        "head-166",
                        "head-167",
                        "head-168",
                        "head-169",
                        "head-170",
                        "head-171",
                        "head-172",
                        "head-173",
                        "head-174",
                        "head-175",
                        "head-176",
                        "head-177",
                        "head-178",
                        "head-179",
                        "head-180",
                        "head-181",
                        "head-182",
                        "head-183"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "created_by": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "updated_by": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "tenant_id",
                "email",
                "email_verified_at",
                "phone_e164",
                "display_name",
                "is_minor",
                "is_suspended",
                "created_at",
                "updated_at",
                "created_by",
                "updated_by"
              ]
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "items",
          "total"
        ]
      },
      "AdminUserDetailResponse": {
        "type": "object",
        "properties": {
          "user": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "tenant_id": {
                "type": "string",
                "format": "uuid"
              },
              "email": {
                "type": "string",
                "format": "email"
              },
              "email_verified_at": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "phone_e164": {
                "oneOf": [
                  {
                    "type": "string",
                    "pattern": "^\\+[1-9]\\d{6,14}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "display_name": {
                "type": "string",
                "minLength": 1
              },
              "locale": {
                "type": "string",
                "minLength": 2,
                "maxLength": 8,
                "default": "it-IT"
              },
              "is_minor": {
                "type": "boolean"
              },
              "date_of_birth": {
                "oneOf": [
                  {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "guardian_user_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "is_suspended": {
                "type": "boolean"
              },
              "processing_restricted_at": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "avatar_head_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "enum": [
                      "head-01",
                      "head-02",
                      "head-03",
                      "head-04",
                      "head-05",
                      "head-06",
                      "head-07",
                      "head-08",
                      "head-09",
                      "head-10",
                      "head-11",
                      "head-12",
                      "head-13",
                      "head-14",
                      "head-15",
                      "head-16",
                      "head-17",
                      "head-18",
                      "head-19",
                      "head-20",
                      "head-21",
                      "head-22",
                      "head-23",
                      "head-24",
                      "head-25",
                      "head-26",
                      "head-27",
                      "head-28",
                      "head-29",
                      "head-30",
                      "head-31",
                      "head-32",
                      "head-33",
                      "head-34",
                      "head-35",
                      "head-36",
                      "head-37",
                      "head-38",
                      "head-39",
                      "head-40",
                      "head-41",
                      "head-42",
                      "head-43",
                      "head-44",
                      "head-45",
                      "head-46",
                      "head-47",
                      "head-48",
                      "head-49",
                      "head-50",
                      "head-51",
                      "head-52",
                      "head-53",
                      "head-54",
                      "head-55",
                      "head-56",
                      "head-57",
                      "head-58",
                      "head-59",
                      "head-60",
                      "head-61",
                      "head-62",
                      "head-63",
                      "head-64",
                      "head-65",
                      "head-66",
                      "head-67",
                      "head-68",
                      "head-69",
                      "head-70",
                      "head-71",
                      "head-72",
                      "head-73",
                      "head-74",
                      "head-75",
                      "head-76",
                      "head-77",
                      "head-78",
                      "head-79",
                      "head-80",
                      "head-81",
                      "head-82",
                      "head-83",
                      "head-84",
                      "head-85",
                      "head-86",
                      "head-87",
                      "head-88",
                      "head-89",
                      "head-90",
                      "head-91",
                      "head-92",
                      "head-93",
                      "head-94",
                      "head-95",
                      "head-96",
                      "head-97",
                      "head-98",
                      "head-99",
                      "head-100",
                      "head-101",
                      "head-102",
                      "head-103",
                      "head-104",
                      "head-105",
                      "head-106",
                      "head-107",
                      "head-108",
                      "head-109",
                      "head-110",
                      "head-111",
                      "head-112",
                      "head-113",
                      "head-114",
                      "head-115",
                      "head-116",
                      "head-117",
                      "head-118",
                      "head-119",
                      "head-120",
                      "head-121",
                      "head-122",
                      "head-123",
                      "head-124",
                      "head-125",
                      "head-126",
                      "head-127",
                      "head-128",
                      "head-129",
                      "head-130",
                      "head-131",
                      "head-132",
                      "head-133",
                      "head-134",
                      "head-135",
                      "head-136",
                      "head-137",
                      "head-138",
                      "head-139",
                      "head-140",
                      "head-141",
                      "head-142",
                      "head-143",
                      "head-144",
                      "head-145",
                      "head-146",
                      "head-147",
                      "head-148",
                      "head-149",
                      "head-150",
                      "head-151",
                      "head-152",
                      "head-153",
                      "head-154",
                      "head-155",
                      "head-156",
                      "head-157",
                      "head-158",
                      "head-159",
                      "head-160",
                      "head-161",
                      "head-162",
                      "head-163",
                      "head-164",
                      "head-165",
                      "head-166",
                      "head-167",
                      "head-168",
                      "head-169",
                      "head-170",
                      "head-171",
                      "head-172",
                      "head-173",
                      "head-174",
                      "head-175",
                      "head-176",
                      "head-177",
                      "head-178",
                      "head-179",
                      "head-180",
                      "head-181",
                      "head-182",
                      "head-183"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "created_by": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "updated_by": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "id",
              "tenant_id",
              "email",
              "email_verified_at",
              "phone_e164",
              "display_name",
              "is_minor",
              "is_suspended",
              "created_at",
              "updated_at",
              "created_by",
              "updated_by"
            ]
          },
          "role_assignments": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "tenant_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "user_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "role": {
                  "type": "string",
                  "enum": [
                    "platform_admin",
                    "tenant_admin",
                    "org_admin",
                    "org_operator",
                    "manager",
                    "assistant",
                    "scorer",
                    "team_captain",
                    "team_coach",
                    "team_staff",
                    "team_member",
                    "coach",
                    "staff",
                    "referee",
                    "evaluator",
                    "fantasy_manager",
                    "media_editor",
                    "sponsor_manager",
                    "dpo",
                    "support",
                    "external_organizer",
                    "public_user",
                    "tournament_admin",
                    "group_admin",
                    "medical_officer",
                    "hostess",
                    "journalist",
                    "photographer",
                    "club_admin"
                  ]
                },
                "organization_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "team_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "tournament_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "phase_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "granted_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "revoked_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "granted_by": {
                  "type": "string",
                  "format": "uuid"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "created_by": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "updated_by": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "tenant_id",
                "user_id",
                "role",
                "organization_id",
                "team_id",
                "granted_at",
                "revoked_at",
                "granted_by",
                "created_at",
                "updated_at",
                "created_by",
                "updated_by"
              ]
            }
          }
        },
        "required": [
          "user",
          "role_assignments"
        ]
      },
      "AdminUserSuspendRequest": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          }
        },
        "required": [
          "reason"
        ]
      },
      "AdminUserProfileUpdateRequest": {
        "type": "object",
        "properties": {
          "display_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "phone_e164": {
            "oneOf": [
              {
                "type": "string",
                "pattern": "^\\+[1-9]\\d{6,14}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "date_of_birth": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "email": {
            "type": "string",
            "format": "email",
            "maxLength": 254
          },
          "reason": {
            "type": "string",
            "minLength": 3,
            "maxLength": 500
          }
        },
        "required": [
          "reason"
        ],
        "additionalProperties": false
      },
      "AdminRoleAssignmentRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "user_id": {
            "type": "string",
            "format": "uuid"
          },
          "role": {
            "type": "string",
            "enum": [
              "platform_admin",
              "tenant_admin",
              "org_admin",
              "org_operator",
              "manager",
              "assistant",
              "scorer",
              "team_captain",
              "team_coach",
              "team_staff",
              "team_member",
              "coach",
              "staff",
              "referee",
              "evaluator",
              "fantasy_manager",
              "media_editor",
              "sponsor_manager",
              "dpo",
              "support",
              "external_organizer",
              "public_user",
              "tournament_admin",
              "group_admin",
              "medical_officer",
              "hostess",
              "journalist",
              "photographer",
              "club_admin"
            ]
          },
          "organization_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "team_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "tournament_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "phase_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "granted_at": {
            "type": "string",
            "format": "date-time"
          },
          "revoked_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "granted_by": {
            "type": "string",
            "format": "uuid"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "updated_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "tenant_id",
          "user_id",
          "role",
          "organization_id",
          "team_id",
          "granted_at",
          "revoked_at",
          "granted_by",
          "created_at",
          "updated_at",
          "created_by",
          "updated_by"
        ]
      },
      "AdminRoleGrantRequest": {
        "type": "object",
        "properties": {
          "user_id": {
            "type": "string",
            "format": "uuid"
          },
          "role": {
            "type": "string",
            "enum": [
              "platform_admin",
              "tenant_admin",
              "org_admin",
              "org_operator",
              "manager",
              "assistant",
              "scorer",
              "team_captain",
              "team_coach",
              "team_staff",
              "team_member",
              "coach",
              "staff",
              "referee",
              "evaluator",
              "fantasy_manager",
              "media_editor",
              "sponsor_manager",
              "dpo",
              "support",
              "external_organizer",
              "public_user",
              "tournament_admin",
              "group_admin",
              "medical_officer",
              "hostess",
              "journalist",
              "photographer",
              "club_admin"
            ]
          },
          "organization_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "team_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "supersede": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "user_id",
          "role",
          "organization_id"
        ]
      },
      "AdminInvitationRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "role": {
            "type": "string",
            "enum": [
              "platform_admin",
              "tenant_admin",
              "org_admin",
              "org_operator",
              "manager",
              "assistant",
              "scorer",
              "team_captain",
              "team_coach",
              "team_staff",
              "team_member",
              "coach",
              "staff",
              "referee",
              "evaluator",
              "fantasy_manager",
              "media_editor",
              "sponsor_manager",
              "dpo",
              "support",
              "external_organizer",
              "public_user",
              "tournament_admin",
              "group_admin",
              "medical_officer",
              "hostess",
              "journalist",
              "photographer",
              "club_admin"
            ]
          },
          "organization_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "team_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "accepted_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "revoked_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "updated_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "tenant_id",
          "email",
          "role",
          "organization_id",
          "team_id",
          "expires_at",
          "accepted_at",
          "revoked_at",
          "created_at",
          "updated_at",
          "created_by",
          "updated_by"
        ]
      },
      "AdminInvitationListResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "tenant_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "email": {
                  "type": "string",
                  "format": "email"
                },
                "role": {
                  "type": "string",
                  "enum": [
                    "platform_admin",
                    "tenant_admin",
                    "org_admin",
                    "org_operator",
                    "manager",
                    "assistant",
                    "scorer",
                    "team_captain",
                    "team_coach",
                    "team_staff",
                    "team_member",
                    "coach",
                    "staff",
                    "referee",
                    "evaluator",
                    "fantasy_manager",
                    "media_editor",
                    "sponsor_manager",
                    "dpo",
                    "support",
                    "external_organizer",
                    "public_user",
                    "tournament_admin",
                    "group_admin",
                    "medical_officer",
                    "hostess",
                    "journalist",
                    "photographer",
                    "club_admin"
                  ]
                },
                "organization_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "team_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "expires_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "accepted_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "revoked_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "created_by": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "updated_by": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "tenant_id",
                "email",
                "role",
                "organization_id",
                "team_id",
                "expires_at",
                "accepted_at",
                "revoked_at",
                "created_at",
                "updated_at",
                "created_by",
                "updated_by"
              ]
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "AdminInvitationCreateRequest": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "maxLength": 200
          },
          "role": {
            "type": "string",
            "enum": [
              "platform_admin",
              "tenant_admin",
              "org_admin",
              "org_operator",
              "manager",
              "assistant",
              "scorer",
              "team_captain",
              "team_coach",
              "team_staff",
              "team_member",
              "coach",
              "staff",
              "referee",
              "evaluator",
              "fantasy_manager",
              "media_editor",
              "sponsor_manager",
              "dpo",
              "support",
              "external_organizer",
              "public_user",
              "tournament_admin",
              "group_admin",
              "medical_officer",
              "hostess",
              "journalist",
              "photographer",
              "club_admin"
            ]
          },
          "organization_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "team_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "ttl_ms": {
            "type": "integer",
            "minimum": 60000,
            "maximum": 5184000000
          }
        },
        "required": [
          "email",
          "role",
          "organization_id"
        ]
      },
      "AdminInvitationCreateResponse": {
        "type": "object",
        "properties": {
          "invitation": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "tenant_id": {
                "type": "string",
                "format": "uuid"
              },
              "email": {
                "type": "string",
                "format": "email"
              },
              "role": {
                "type": "string",
                "enum": [
                  "platform_admin",
                  "tenant_admin",
                  "org_admin",
                  "org_operator",
                  "manager",
                  "assistant",
                  "scorer",
                  "team_captain",
                  "team_coach",
                  "team_staff",
                  "team_member",
                  "coach",
                  "staff",
                  "referee",
                  "evaluator",
                  "fantasy_manager",
                  "media_editor",
                  "sponsor_manager",
                  "dpo",
                  "support",
                  "external_organizer",
                  "public_user",
                  "tournament_admin",
                  "group_admin",
                  "medical_officer",
                  "hostess",
                  "journalist",
                  "photographer",
                  "club_admin"
                ]
              },
              "organization_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "team_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "expires_at": {
                "type": "string",
                "format": "date-time"
              },
              "accepted_at": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "revoked_at": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "created_by": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "updated_by": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "id",
              "tenant_id",
              "email",
              "role",
              "organization_id",
              "team_id",
              "expires_at",
              "accepted_at",
              "revoked_at",
              "created_at",
              "updated_at",
              "created_by",
              "updated_by"
            ]
          },
          "token": {
            "type": "string",
            "minLength": 32
          },
          "email_delivery": {
            "type": "string",
            "enum": [
              "account_notified",
              "sent",
              "failed",
              "not_configured"
            ]
          }
        },
        "required": [
          "invitation",
          "token"
        ]
      },
      "InvitationAcceptRequest": {
        "type": "object",
        "properties": {
          "token": {
            "type": "string",
            "minLength": 32,
            "maxLength": 256
          },
          "user_id": {
            "type": "string",
            "format": "uuid"
          },
          "display_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "locale": {
            "type": "string",
            "minLength": 2,
            "maxLength": 8
          },
          "date_of_birth": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "is_minor": {
            "type": "boolean"
          }
        },
        "required": [
          "token",
          "user_id",
          "display_name"
        ]
      },
      "InvitationAcceptResponse": {
        "type": "object",
        "properties": {
          "invitation": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "tenant_id": {
                "type": "string",
                "format": "uuid"
              },
              "email": {
                "type": "string",
                "format": "email"
              },
              "role": {
                "type": "string",
                "enum": [
                  "platform_admin",
                  "tenant_admin",
                  "org_admin",
                  "org_operator",
                  "manager",
                  "assistant",
                  "scorer",
                  "team_captain",
                  "team_coach",
                  "team_staff",
                  "team_member",
                  "coach",
                  "staff",
                  "referee",
                  "evaluator",
                  "fantasy_manager",
                  "media_editor",
                  "sponsor_manager",
                  "dpo",
                  "support",
                  "external_organizer",
                  "public_user",
                  "tournament_admin",
                  "group_admin",
                  "medical_officer",
                  "hostess",
                  "journalist",
                  "photographer",
                  "club_admin"
                ]
              },
              "organization_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "team_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "expires_at": {
                "type": "string",
                "format": "date-time"
              },
              "accepted_at": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "revoked_at": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "created_by": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "updated_by": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "id",
              "tenant_id",
              "email",
              "role",
              "organization_id",
              "team_id",
              "expires_at",
              "accepted_at",
              "revoked_at",
              "created_at",
              "updated_at",
              "created_by",
              "updated_by"
            ]
          },
          "role_assignment": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "tenant_id": {
                "type": "string",
                "format": "uuid"
              },
              "user_id": {
                "type": "string",
                "format": "uuid"
              },
              "role": {
                "type": "string",
                "enum": [
                  "platform_admin",
                  "tenant_admin",
                  "org_admin",
                  "org_operator",
                  "manager",
                  "assistant",
                  "scorer",
                  "team_captain",
                  "team_coach",
                  "team_staff",
                  "team_member",
                  "coach",
                  "staff",
                  "referee",
                  "evaluator",
                  "fantasy_manager",
                  "media_editor",
                  "sponsor_manager",
                  "dpo",
                  "support",
                  "external_organizer",
                  "public_user",
                  "tournament_admin",
                  "group_admin",
                  "medical_officer",
                  "hostess",
                  "journalist",
                  "photographer",
                  "club_admin"
                ]
              },
              "organization_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "team_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "tournament_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "phase_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "granted_at": {
                "type": "string",
                "format": "date-time"
              },
              "revoked_at": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "granted_by": {
                "type": "string",
                "format": "uuid"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "created_by": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "updated_by": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "id",
              "tenant_id",
              "user_id",
              "role",
              "organization_id",
              "team_id",
              "granted_at",
              "revoked_at",
              "granted_by",
              "created_at",
              "updated_at",
              "created_by",
              "updated_by"
            ]
          },
          "account": {
            "type": "object",
            "properties": {
              "is_minor": {
                "type": "boolean"
              },
              "guardian_required": {
                "type": "boolean"
              }
            },
            "required": [
              "is_minor",
              "guardian_required"
            ]
          }
        },
        "required": [
          "invitation",
          "role_assignment",
          "account"
        ]
      },
      "AuthRegisterSelfRequest": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "maxLength": 200
          },
          "display_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "locale": {
            "type": "string",
            "minLength": 2,
            "maxLength": 8
          },
          "date_of_birth": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "is_minor": {
            "type": "boolean"
          },
          "consents": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "purpose": {
                  "type": "string",
                  "enum": [
                    "marketing",
                    "analytics",
                    "personalization",
                    "push_notifications",
                    "geolocation_checkin",
                    "fantasy_profiling",
                    "media_publication",
                    "social_interactions"
                  ]
                },
                "granted": {
                  "type": "boolean"
                },
                "policy_version": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64
                }
              },
              "required": [
                "purpose",
                "granted",
                "policy_version"
              ]
            },
            "default": []
          },
          "policy_acks": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "privacy_policy",
                    "terms_of_service",
                    "cookie_policy",
                    "fantasy_rules"
                  ]
                },
                "version": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64
                }
              },
              "required": [
                "kind",
                "version"
              ]
            },
            "minItems": 1
          }
        },
        "required": [
          "email",
          "display_name",
          "policy_acks"
        ]
      },
      "AuthRegisterSelfResponse": {
        "type": "object",
        "properties": {
          "user": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "email": {
                "type": "string",
                "format": "email"
              },
              "email_verified_at": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "display_name": {
                "type": "string"
              },
              "locale": {
                "type": "string"
              },
              "phone_e164": {
                "oneOf": [
                  {
                    "type": "string",
                    "pattern": "^\\+[1-9]\\d{6,14}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "is_minor": {
                "type": "boolean"
              },
              "age_status": {
                "type": "string",
                "enum": [
                  "adult",
                  "minor",
                  "unknown"
                ]
              },
              "guardian_required": {
                "type": "boolean"
              },
              "is_suspended": {
                "type": "boolean"
              },
              "avatar_head_id": {
                "oneOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "id",
              "email",
              "email_verified_at",
              "display_name",
              "locale",
              "phone_e164",
              "is_minor",
              "age_status",
              "guardian_required",
              "is_suspended",
              "avatar_head_id"
            ]
          },
          "created": {
            "type": "boolean"
          }
        },
        "required": [
          "user",
          "created"
        ]
      },
      "MeProfileResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "email_verified_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "display_name": {
            "type": "string"
          },
          "locale": {
            "type": "string"
          },
          "phone_e164": {
            "oneOf": [
              {
                "type": "string",
                "pattern": "^\\+[1-9]\\d{6,14}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "is_minor": {
            "type": "boolean"
          },
          "age_status": {
            "type": "string",
            "enum": [
              "adult",
              "minor",
              "unknown"
            ]
          },
          "guardian_required": {
            "type": "boolean"
          },
          "is_suspended": {
            "type": "boolean"
          },
          "avatar_head_id": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "email",
          "email_verified_at",
          "display_name",
          "locale",
          "phone_e164",
          "is_minor",
          "age_status",
          "guardian_required",
          "is_suspended",
          "avatar_head_id"
        ]
      },
      "MeProfileUpdateRequest": {
        "type": "object",
        "properties": {
          "display_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "locale": {
            "type": "string",
            "minLength": 2,
            "maxLength": 8
          },
          "phone_e164": {
            "oneOf": [
              {
                "type": "string",
                "pattern": "^\\+[1-9]\\d{6,14}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "date_of_birth": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          }
        },
        "required": [],
        "additionalProperties": false
      },
      "MeAvatarUpdateRequest": {
        "type": "object",
        "properties": {
          "avatar_head_id": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "head-01",
                  "head-02",
                  "head-03",
                  "head-04",
                  "head-05",
                  "head-06",
                  "head-07",
                  "head-08",
                  "head-09",
                  "head-10",
                  "head-11",
                  "head-12",
                  "head-13",
                  "head-14",
                  "head-15",
                  "head-16",
                  "head-17",
                  "head-18",
                  "head-19",
                  "head-20",
                  "head-21",
                  "head-22",
                  "head-23",
                  "head-24",
                  "head-25",
                  "head-26",
                  "head-27",
                  "head-28",
                  "head-29",
                  "head-30",
                  "head-31",
                  "head-32",
                  "head-33",
                  "head-34",
                  "head-35",
                  "head-36",
                  "head-37",
                  "head-38",
                  "head-39",
                  "head-40",
                  "head-41",
                  "head-42",
                  "head-43",
                  "head-44",
                  "head-45",
                  "head-46",
                  "head-47",
                  "head-48",
                  "head-49",
                  "head-50",
                  "head-51",
                  "head-52",
                  "head-53",
                  "head-54",
                  "head-55",
                  "head-56",
                  "head-57",
                  "head-58",
                  "head-59",
                  "head-60",
                  "head-61",
                  "head-62",
                  "head-63",
                  "head-64",
                  "head-65",
                  "head-66",
                  "head-67",
                  "head-68",
                  "head-69",
                  "head-70",
                  "head-71",
                  "head-72",
                  "head-73",
                  "head-74",
                  "head-75",
                  "head-76",
                  "head-77",
                  "head-78",
                  "head-79",
                  "head-80",
                  "head-81",
                  "head-82",
                  "head-83",
                  "head-84",
                  "head-85",
                  "head-86",
                  "head-87",
                  "head-88",
                  "head-89",
                  "head-90",
                  "head-91",
                  "head-92",
                  "head-93",
                  "head-94",
                  "head-95",
                  "head-96",
                  "head-97",
                  "head-98",
                  "head-99",
                  "head-100",
                  "head-101",
                  "head-102",
                  "head-103",
                  "head-104",
                  "head-105",
                  "head-106",
                  "head-107",
                  "head-108",
                  "head-109",
                  "head-110",
                  "head-111",
                  "head-112",
                  "head-113",
                  "head-114",
                  "head-115",
                  "head-116",
                  "head-117",
                  "head-118",
                  "head-119",
                  "head-120",
                  "head-121",
                  "head-122",
                  "head-123",
                  "head-124",
                  "head-125",
                  "head-126",
                  "head-127",
                  "head-128",
                  "head-129",
                  "head-130",
                  "head-131",
                  "head-132",
                  "head-133",
                  "head-134",
                  "head-135",
                  "head-136",
                  "head-137",
                  "head-138",
                  "head-139",
                  "head-140",
                  "head-141",
                  "head-142",
                  "head-143",
                  "head-144",
                  "head-145",
                  "head-146",
                  "head-147",
                  "head-148",
                  "head-149",
                  "head-150",
                  "head-151",
                  "head-152",
                  "head-153",
                  "head-154",
                  "head-155",
                  "head-156",
                  "head-157",
                  "head-158",
                  "head-159",
                  "head-160",
                  "head-161",
                  "head-162",
                  "head-163",
                  "head-164",
                  "head-165",
                  "head-166",
                  "head-167",
                  "head-168",
                  "head-169",
                  "head-170",
                  "head-171",
                  "head-172",
                  "head-173",
                  "head-174",
                  "head-175",
                  "head-176",
                  "head-177",
                  "head-178",
                  "head-179",
                  "head-180",
                  "head-181",
                  "head-182",
                  "head-183"
                ]
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "avatar_head_id"
        ],
        "additionalProperties": false
      },
      "MeConsentSnapshotResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "object",
            "additionalProperties": true
          },
          "details": {
            "type": "object",
            "additionalProperties": true
          }
        },
        "required": [
          "items"
        ]
      },
      "MeConsentRecordRequest": {
        "type": "object",
        "properties": {
          "purpose": {
            "type": "string",
            "enum": [
              "marketing",
              "analytics",
              "personalization",
              "push_notifications",
              "geolocation_checkin",
              "fantasy_profiling",
              "media_publication",
              "social_interactions"
            ]
          },
          "granted": {
            "type": "boolean"
          },
          "policy_version": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "source": {
            "type": "string",
            "enum": [
              "web_banner",
              "mobile_settings",
              "admin_form",
              "signup"
            ]
          }
        },
        "required": [
          "purpose",
          "granted",
          "policy_version"
        ]
      },
      "MeConsentRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "purpose": {
            "type": "string",
            "enum": [
              "marketing",
              "analytics",
              "personalization",
              "push_notifications",
              "geolocation_checkin",
              "fantasy_profiling",
              "media_publication",
              "social_interactions"
            ]
          },
          "granted": {
            "type": "boolean"
          },
          "policy_version": {
            "type": "string"
          },
          "source": {
            "type": "string",
            "enum": [
              "web_banner",
              "mobile_settings",
              "admin_form",
              "signup",
              "guardian",
              "not_declared"
            ]
          },
          "recorded_via": {
            "type": "string",
            "enum": [
              "authenticated_self_api",
              "authenticated_registration_api",
              "guardian_service_mirror",
              "privacy_objection_handler"
            ]
          },
          "occurred_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "purpose",
          "granted",
          "policy_version",
          "source",
          "occurred_at"
        ]
      },
      "MeGuardianConsentRequest": {
        "type": "object",
        "properties": {
          "minor_user_id": {
            "type": "string",
            "format": "uuid"
          },
          "purpose": {
            "type": "string",
            "enum": [
              "marketing",
              "analytics",
              "personalization",
              "push_notifications",
              "geolocation_checkin",
              "fantasy_profiling",
              "media_publication",
              "social_interactions"
            ]
          },
          "granted": {
            "type": "boolean"
          },
          "policy_version": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "source": {
            "type": "string",
            "enum": [
              "web_form",
              "mobile_settings",
              "admin_form"
            ]
          },
          "idempotency_key": {
            "type": "string",
            "minLength": 8,
            "maxLength": 200
          }
        },
        "required": [
          "minor_user_id",
          "purpose",
          "granted",
          "policy_version"
        ]
      },
      "MeGuardianConsentRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "purpose": {
            "type": "string",
            "enum": [
              "marketing",
              "analytics",
              "personalization",
              "push_notifications",
              "geolocation_checkin",
              "fantasy_profiling",
              "media_publication",
              "social_interactions"
            ]
          },
          "granted": {
            "type": "boolean"
          },
          "policy_version": {
            "type": "string"
          },
          "source": {
            "type": "string",
            "enum": [
              "web_form",
              "mobile_settings",
              "admin_form",
              "not_declared"
            ]
          },
          "recorded_via": {
            "type": "string",
            "enum": [
              "authenticated_guardian_api"
            ]
          },
          "occurred_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "purpose",
          "granted",
          "policy_version",
          "source",
          "occurred_at"
        ]
      },
      "MeGuardianConsentList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "purpose": {
                  "type": "string",
                  "enum": [
                    "marketing",
                    "analytics",
                    "personalization",
                    "push_notifications",
                    "geolocation_checkin",
                    "fantasy_profiling",
                    "media_publication",
                    "social_interactions"
                  ]
                },
                "granted": {
                  "type": "boolean"
                },
                "policy_version": {
                  "type": "string"
                },
                "source": {
                  "type": "string",
                  "enum": [
                    "web_form",
                    "mobile_settings",
                    "admin_form",
                    "not_declared"
                  ]
                },
                "recorded_via": {
                  "type": "string",
                  "enum": [
                    "authenticated_guardian_api"
                  ]
                },
                "occurred_at": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "id",
                "purpose",
                "granted",
                "policy_version",
                "source",
                "occurred_at"
              ]
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "MeGuardianMinorRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "display_name": {
            "type": "string"
          },
          "is_minor": {
            "type": "boolean"
          },
          "is_suspended": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "display_name",
          "is_minor",
          "is_suspended"
        ]
      },
      "MeGuardianMinorList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "display_name": {
                  "type": "string"
                },
                "is_minor": {
                  "type": "boolean"
                },
                "is_suspended": {
                  "type": "boolean"
                }
              },
              "required": [
                "id",
                "display_name",
                "is_minor",
                "is_suspended"
              ]
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "AdminGuardianLinkRequest": {
        "type": "object",
        "properties": {
          "guardian_user_id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "guardian_user_id"
        ]
      },
      "AdminGuardianLinkResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "is_minor": {
            "type": "boolean"
          },
          "guardian_user_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "is_minor",
          "guardian_user_id"
        ]
      },
      "PublicPolicyVersionRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "type": "string",
            "enum": [
              "privacy_policy",
              "terms_of_service",
              "cookie_policy",
              "fantasy_rules"
            ]
          },
          "version": {
            "type": "string",
            "minLength": 1
          },
          "effective_from": {
            "type": "string",
            "format": "date-time"
          },
          "superseded_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "document_url": {
            "type": "string",
            "format": "uri"
          },
          "summary": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "kind",
          "version",
          "effective_from",
          "superseded_at",
          "document_url",
          "summary"
        ]
      },
      "PublicPolicyVersionList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "privacy_policy",
                    "terms_of_service",
                    "cookie_policy",
                    "fantasy_rules"
                  ]
                },
                "version": {
                  "type": "string",
                  "minLength": 1
                },
                "effective_from": {
                  "type": "string",
                  "format": "date-time"
                },
                "superseded_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "document_url": {
                  "type": "string",
                  "format": "uri"
                },
                "summary": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "kind",
                "version",
                "effective_from",
                "superseded_at",
                "document_url",
                "summary"
              ]
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "AdminPolicyVersionPublishRequest": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "privacy_policy",
              "terms_of_service",
              "cookie_policy",
              "fantasy_rules"
            ]
          },
          "version": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "effective_from": {
            "type": "string",
            "format": "date-time"
          },
          "document_url": {
            "type": "string",
            "format": "uri"
          },
          "summary": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2000
          }
        },
        "required": [
          "kind",
          "version",
          "document_url",
          "summary"
        ],
        "additionalProperties": false
      },
      "AdminPolicyVersionPublishResponse": {
        "type": "object",
        "properties": {
          "policy_version": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "tenant_id": {
                "type": "string",
                "format": "uuid"
              },
              "kind": {
                "type": "string",
                "enum": [
                  "privacy_policy",
                  "terms_of_service",
                  "cookie_policy",
                  "fantasy_rules"
                ]
              },
              "version": {
                "type": "string",
                "minLength": 1
              },
              "effective_from": {
                "type": "string",
                "format": "date-time"
              },
              "superseded_at": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "document_url": {
                "type": "string",
                "format": "uri"
              },
              "summary": {
                "type": "string"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "created_by": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "updated_by": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "id",
              "tenant_id",
              "kind",
              "version",
              "effective_from",
              "superseded_at",
              "document_url",
              "summary",
              "created_at",
              "updated_at",
              "created_by",
              "updated_by"
            ]
          }
        },
        "required": [
          "policy_version"
        ]
      },
      "AdminPolicyVersionList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "tenant_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "privacy_policy",
                    "terms_of_service",
                    "cookie_policy",
                    "fantasy_rules"
                  ]
                },
                "version": {
                  "type": "string",
                  "minLength": 1
                },
                "effective_from": {
                  "type": "string",
                  "format": "date-time"
                },
                "superseded_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "document_url": {
                  "type": "string",
                  "format": "uri"
                },
                "summary": {
                  "type": "string"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "created_by": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "updated_by": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "tenant_id",
                "kind",
                "version",
                "effective_from",
                "superseded_at",
                "document_url",
                "summary",
                "created_at",
                "updated_at",
                "created_by",
                "updated_by"
              ]
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "MePrivacyRequestRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "type": "string",
            "enum": [
              "export",
              "deletion",
              "rectification",
              "restriction",
              "objection",
              "portability"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "received",
              "in_progress",
              "completed",
              "rejected"
            ]
          },
          "submitted_at": {
            "type": "string",
            "format": "date-time"
          },
          "due_by": {
            "type": "string",
            "format": "date-time"
          },
          "completed_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "rejected_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "rejection_reason": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "export_delivery_requested_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "kind",
          "status",
          "submitted_at",
          "due_by",
          "completed_at",
          "rejected_at",
          "rejection_reason",
          "export_delivery_requested_at"
        ],
        "additionalProperties": false
      },
      "MePrivacyRequestList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "export",
                    "deletion",
                    "rectification",
                    "restriction",
                    "objection",
                    "portability"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "received",
                    "in_progress",
                    "completed",
                    "rejected"
                  ]
                },
                "submitted_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "due_by": {
                  "type": "string",
                  "format": "date-time"
                },
                "completed_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "rejected_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "rejection_reason": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "export_delivery_requested_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "kind",
                "status",
                "submitted_at",
                "due_by",
                "completed_at",
                "rejected_at",
                "rejection_reason",
                "export_delivery_requested_at"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "MePrivacyRequestSubmitRequest": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "export",
              "deletion",
              "rectification",
              "restriction",
              "objection",
              "portability"
            ]
          }
        },
        "required": [
          "kind"
        ]
      },
      "AdminFixturePostponeRequest": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          },
          "expected_etag": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "reason"
        ]
      },
      "AdminFixtureRescheduleRequest": {
        "type": "object",
        "properties": {
          "scheduled_at": {
            "type": "string",
            "format": "date-time"
          },
          "field_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "reason": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          },
          "allow_conflict": {
            "type": "boolean"
          },
          "expected_etag": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "scheduled_at",
          "reason"
        ]
      },
      "AdminFixtureConflict": {
        "type": "object",
        "properties": {
          "field_id": {
            "type": "string",
            "format": "uuid"
          },
          "match_id": {
            "type": "string",
            "format": "uuid"
          },
          "scheduled_at": {
            "type": "string",
            "format": "date-time"
          },
          "tournament_id": {
            "type": "string",
            "format": "uuid"
          },
          "other_match_id": {
            "type": "string",
            "format": "uuid"
          },
          "other_scheduled_at": {
            "type": "string",
            "format": "date-time"
          },
          "other_tournament_id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "field_id",
          "match_id",
          "scheduled_at",
          "tournament_id",
          "other_match_id",
          "other_scheduled_at",
          "other_tournament_id"
        ]
      },
      "AdminFixtureConflictList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "field_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "match_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "scheduled_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "tournament_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "other_match_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "other_scheduled_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "other_tournament_id": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "required": [
                "field_id",
                "match_id",
                "scheduled_at",
                "tournament_id",
                "other_match_id",
                "other_scheduled_at",
                "other_tournament_id"
              ]
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "AdminFixtureCascadeSkip": {
        "type": "object",
        "properties": {
          "role": {
            "type": "string",
            "minLength": 1
          },
          "reason": {
            "type": "string",
            "enum": [
              "template_missing",
              "recipient_missing",
              "recipient_suspended",
              "recipient_restricted",
              "consent_denied",
              "enqueue_failed",
              "cascade_error"
            ]
          }
        },
        "required": [
          "role",
          "reason"
        ]
      },
      "AdminFixtureCascadeResult": {
        "type": "object",
        "properties": {
          "attempted": {
            "type": "integer",
            "minimum": 0
          },
          "notified": {
            "type": "integer",
            "minimum": 0
          },
          "skipped": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "role": {
                  "type": "string",
                  "minLength": 1
                },
                "reason": {
                  "type": "string",
                  "enum": [
                    "template_missing",
                    "recipient_missing",
                    "recipient_suspended",
                    "recipient_restricted",
                    "consent_denied",
                    "enqueue_failed",
                    "cascade_error"
                  ]
                }
              },
              "required": [
                "role",
                "reason"
              ]
            }
          }
        },
        "required": [
          "attempted",
          "notified",
          "skipped"
        ]
      },
      "AdminFixtureChangeResponse": {
        "type": "object",
        "properties": {
          "match": {
            "type": "object",
            "properties": {
              "match_id": {
                "type": "string",
                "format": "uuid"
              },
              "tenant_id": {
                "type": "string",
                "format": "uuid"
              },
              "tournament_id": {
                "type": "string",
                "format": "uuid"
              },
              "round_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "group_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "field_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "scheduled_at": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "schedule_precision": {
                "type": "string",
                "enum": [
                  "exact",
                  "date_only",
                  "unknown"
                ]
              },
              "scheduled_on": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "date"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "state": {
                "type": "string",
                "enum": [
                  "scheduled",
                  "live",
                  "ended",
                  "report_draft",
                  "report_submitted",
                  "report_official",
                  "corrected",
                  "cancelled",
                  "postponed"
                ]
              },
              "home_team_id": {
                "type": "string",
                "format": "uuid"
              },
              "away_team_id": {
                "type": "string",
                "format": "uuid"
              },
              "version": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "etag": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "match_id",
              "tenant_id",
              "tournament_id",
              "round_id",
              "group_id",
              "field_id",
              "scheduled_at",
              "schedule_precision",
              "scheduled_on",
              "state",
              "home_team_id",
              "away_team_id",
              "version",
              "etag"
            ]
          },
          "cascade": {
            "type": "object",
            "properties": {
              "attempted": {
                "type": "integer",
                "minimum": 0
              },
              "notified": {
                "type": "integer",
                "minimum": 0
              },
              "skipped": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "minLength": 1
                    },
                    "reason": {
                      "type": "string",
                      "enum": [
                        "template_missing",
                        "recipient_missing",
                        "recipient_suspended",
                        "recipient_restricted",
                        "consent_denied",
                        "enqueue_failed",
                        "cascade_error"
                      ]
                    }
                  },
                  "required": [
                    "role",
                    "reason"
                  ]
                }
              }
            },
            "required": [
              "attempted",
              "notified",
              "skipped"
            ]
          },
          "conflicts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "field_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "match_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "scheduled_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "tournament_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "other_match_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "other_scheduled_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "other_tournament_id": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "required": [
                "field_id",
                "match_id",
                "scheduled_at",
                "tournament_id",
                "other_match_id",
                "other_scheduled_at",
                "other_tournament_id"
              ]
            }
          }
        },
        "required": [
          "match",
          "cascade",
          "conflicts"
        ]
      },
      "AdminAssignmentPlannerRow": {
        "type": "object",
        "properties": {
          "match_id": {
            "type": "string",
            "format": "uuid"
          },
          "tournament_id": {
            "type": "string",
            "format": "uuid"
          },
          "scheduled_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "schedule_precision": {
            "type": "string",
            "enum": [
              "exact",
              "date_only",
              "unknown"
            ]
          },
          "scheduled_on": {
            "oneOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ]
          },
          "state": {
            "type": "string",
            "enum": [
              "scheduled",
              "live",
              "ended",
              "report_draft",
              "report_submitted",
              "report_official",
              "corrected",
              "cancelled",
              "postponed"
            ]
          },
          "field_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "home_team_id": {
            "type": "string",
            "format": "uuid"
          },
          "away_team_id": {
            "type": "string",
            "format": "uuid"
          },
          "referee_confirmed": {
            "type": "integer",
            "minimum": 0
          },
          "referee_pending": {
            "type": "integer",
            "minimum": 0
          },
          "evaluator_confirmed": {
            "type": "integer",
            "minimum": 0
          },
          "evaluator_pending": {
            "type": "integer",
            "minimum": 0
          },
          "coverage": {
            "type": "string",
            "enum": [
              "covered",
              "pending",
              "uncovered"
            ]
          }
        },
        "required": [
          "match_id",
          "tournament_id",
          "scheduled_at",
          "state",
          "field_id",
          "home_team_id",
          "away_team_id",
          "referee_confirmed",
          "referee_pending",
          "evaluator_confirmed",
          "evaluator_pending",
          "coverage"
        ]
      },
      "AdminAssignmentPlannerList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "match_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "tournament_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "scheduled_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "schedule_precision": {
                  "type": "string",
                  "enum": [
                    "exact",
                    "date_only",
                    "unknown"
                  ]
                },
                "scheduled_on": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "state": {
                  "type": "string",
                  "enum": [
                    "scheduled",
                    "live",
                    "ended",
                    "report_draft",
                    "report_submitted",
                    "report_official",
                    "corrected",
                    "cancelled",
                    "postponed"
                  ]
                },
                "field_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "home_team_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "away_team_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "referee_confirmed": {
                  "type": "integer",
                  "minimum": 0
                },
                "referee_pending": {
                  "type": "integer",
                  "minimum": 0
                },
                "evaluator_confirmed": {
                  "type": "integer",
                  "minimum": 0
                },
                "evaluator_pending": {
                  "type": "integer",
                  "minimum": 0
                },
                "coverage": {
                  "type": "string",
                  "enum": [
                    "covered",
                    "pending",
                    "uncovered"
                  ]
                }
              },
              "required": [
                "match_id",
                "tournament_id",
                "scheduled_at",
                "state",
                "field_id",
                "home_team_id",
                "away_team_id",
                "referee_confirmed",
                "referee_pending",
                "evaluator_confirmed",
                "evaluator_pending",
                "coverage"
              ]
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "AdminImportRunRequest": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "teams",
              "players",
              "rosters",
              "fields",
              "fixtures",
              "assignments",
              "rounds",
              "results"
            ]
          },
          "rows": {
            "type": "array",
            "items": {},
            "minItems": 1,
            "maxItems": 200
          }
        },
        "required": [
          "kind",
          "rows"
        ]
      },
      "AdminImportRowResult": {
        "type": "object",
        "properties": {
          "index": {
            "type": "integer",
            "minimum": 0
          },
          "status": {
            "type": "string",
            "enum": [
              "imported",
              "failed"
            ]
          },
          "id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "error_code": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "message": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "index",
          "status",
          "id",
          "error_code",
          "message"
        ]
      },
      "AdminImportRunResponse": {
        "type": "object",
        "properties": {
          "import_id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "type": "string",
            "enum": [
              "teams",
              "players",
              "rosters",
              "fields",
              "fixtures",
              "assignments",
              "rounds",
              "results"
            ]
          },
          "total": {
            "type": "integer",
            "minimum": 0
          },
          "imported": {
            "type": "integer",
            "minimum": 0
          },
          "failed": {
            "type": "integer",
            "minimum": 0
          },
          "results": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "index": {
                  "type": "integer",
                  "minimum": 0
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "imported",
                    "failed"
                  ]
                },
                "id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "error_code": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "message": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "index",
                "status",
                "id",
                "error_code",
                "message"
              ]
            }
          }
        },
        "required": [
          "import_id",
          "kind",
          "total",
          "imported",
          "failed",
          "results"
        ]
      },
      "SupportTicketCategory": {
        "type": "string",
        "enum": [
          "account",
          "technical",
          "matchday",
          "privacy",
          "data_rights",
          "other"
        ]
      },
      "MeSupportTicketOpenRequest": {
        "type": "object",
        "properties": {
          "category": {
            "type": "string",
            "enum": [
              "account",
              "technical",
              "matchday",
              "privacy",
              "data_rights",
              "other"
            ]
          },
          "subject": {
            "type": "string",
            "minLength": 1,
            "maxLength": 180
          },
          "message": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2000
          }
        },
        "required": [
          "category",
          "subject",
          "message"
        ]
      },
      "MeSupportTicketRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "subject": {
            "type": "string",
            "minLength": 1,
            "maxLength": 180
          },
          "status": {
            "type": "string",
            "enum": [
              "open",
              "in_progress",
              "awaiting_user",
              "resolved",
              "closed"
            ]
          },
          "priority": {
            "type": "string",
            "enum": [
              "low",
              "normal",
              "high",
              "urgent"
            ]
          },
          "dpo_only": {
            "type": "boolean"
          },
          "opened_at": {
            "type": "string",
            "format": "date-time"
          },
          "last_activity_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "subject",
          "status",
          "priority",
          "dpo_only",
          "opened_at",
          "last_activity_at"
        ]
      },
      "AdminSupportTicketOpenRequest": {
        "type": "object",
        "properties": {
          "category": {
            "type": "string",
            "enum": [
              "account",
              "technical",
              "matchday",
              "privacy",
              "data_rights",
              "other"
            ]
          },
          "subject": {
            "type": "string",
            "minLength": 1,
            "maxLength": 180
          },
          "message": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2000
          },
          "requester_user_id": {
            "type": "string",
            "format": "uuid"
          },
          "priority": {
            "type": "string",
            "enum": [
              "low",
              "normal",
              "high",
              "urgent"
            ]
          }
        },
        "required": [
          "category",
          "subject",
          "message",
          "requester_user_id"
        ]
      },
      "AdminIncidentDeclareRequest": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 180
          },
          "severity": {
            "type": "string",
            "enum": [
              "sev1",
              "sev2",
              "sev3",
              "sev4"
            ]
          },
          "feature_flag_key": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 120
              },
              {
                "type": "null"
              }
            ]
          },
          "affected_module": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 80
              },
              {
                "type": "null"
              }
            ]
          },
          "note": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          }
        },
        "required": [
          "title",
          "severity"
        ]
      },
      "AdminIncidentStatusUpdateRequest": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "investigating",
              "identified",
              "monitoring",
              "resolved"
            ]
          },
          "note": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          }
        },
        "required": [
          "status"
        ]
      },
      "AdminSupportTicketStatusUpdateRequest": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "open",
              "in_progress",
              "awaiting_user",
              "resolved",
              "closed"
            ]
          }
        },
        "required": [
          "status"
        ]
      },
      "AdminSupportTicketEscalateRequest": {
        "type": "object",
        "properties": {
          "priority": {
            "type": "string",
            "enum": [
              "low",
              "normal",
              "high",
              "urgent"
            ]
          },
          "reason": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          }
        },
        "required": [
          "priority",
          "reason"
        ]
      },
      "TeamAreaEligibilityState": {
        "type": "string",
        "enum": [
          "active",
          "pending",
          "suspended",
          "transferred",
          "expired",
          "medical_blocked",
          "privacy_blocked",
          "minor_boundary"
        ]
      },
      "TeamAreaRosterPlayer": {
        "type": "object",
        "properties": {
          "truth_receipt": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "schema_version": {
                    "type": "number",
                    "enum": [
                      1
                    ]
                  },
                  "receipt_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "entity": {
                    "type": "object",
                    "properties": {
                      "entity_type": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "entity_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "entity_version": {
                        "oneOf": [
                          {
                            "type": "integer",
                            "minimum": 0
                          },
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          }
                        ]
                      }
                    },
                    "required": [
                      "entity_type",
                      "entity_id",
                      "entity_version"
                    ]
                  },
                  "scope": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "tenant"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "null"
                          },
                          "match_id": {
                            "type": "null"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "league"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "match_id": {
                            "type": "null"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "match"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "match_id": {
                            "type": "string",
                            "format": "uuid"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      }
                    ]
                  },
                  "actor_user_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "consumers": {
                    "type": "array",
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "pending"
                              ]
                            },
                            "propagated_at": {
                              "type": "null"
                            },
                            "reason": {
                              "type": "null"
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "applied"
                              ]
                            },
                            "propagated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "reason": {
                              "type": "null"
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "failed"
                              ]
                            },
                            "propagated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "reason": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "message": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1000
                                },
                                "retryable": {
                                  "type": "boolean"
                                },
                                "recovery_action": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 500
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "code",
                                "message",
                                "retryable",
                                "recovery_action"
                              ]
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "not_applicable"
                              ]
                            },
                            "propagated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "reason": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "message": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1000
                                },
                                "retryable": {
                                  "type": "boolean"
                                },
                                "recovery_action": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 500
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "code",
                                "message",
                                "retryable",
                                "recovery_action"
                              ]
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        }
                      ]
                    }
                  },
                  "server_timestamp": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "correlation_id": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 200
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "queued"
                    ]
                  },
                  "reason": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 120
                          },
                          "message": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 1000
                          },
                          "retryable": {
                            "type": "boolean"
                          },
                          "recovery_action": {
                            "oneOf": [
                              {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 500
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "code",
                          "message",
                          "retryable",
                          "recovery_action"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "schema_version",
                  "receipt_id",
                  "entity",
                  "scope",
                  "actor_user_id",
                  "consumers",
                  "server_timestamp",
                  "correlation_id",
                  "status",
                  "reason"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "schema_version": {
                    "type": "number",
                    "enum": [
                      1
                    ]
                  },
                  "receipt_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "entity": {
                    "type": "object",
                    "properties": {
                      "entity_type": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "entity_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "entity_version": {
                        "oneOf": [
                          {
                            "type": "integer",
                            "minimum": 0
                          },
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          }
                        ]
                      }
                    },
                    "required": [
                      "entity_type",
                      "entity_id",
                      "entity_version"
                    ]
                  },
                  "scope": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "tenant"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "null"
                          },
                          "match_id": {
                            "type": "null"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "league"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "match_id": {
                            "type": "null"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "match"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "match_id": {
                            "type": "string",
                            "format": "uuid"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      }
                    ]
                  },
                  "actor_user_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "consumers": {
                    "type": "array",
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "pending"
                              ]
                            },
                            "propagated_at": {
                              "type": "null"
                            },
                            "reason": {
                              "type": "null"
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "applied"
                              ]
                            },
                            "propagated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "reason": {
                              "type": "null"
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "failed"
                              ]
                            },
                            "propagated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "reason": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "message": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1000
                                },
                                "retryable": {
                                  "type": "boolean"
                                },
                                "recovery_action": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 500
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "code",
                                "message",
                                "retryable",
                                "recovery_action"
                              ]
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "not_applicable"
                              ]
                            },
                            "propagated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "reason": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "message": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1000
                                },
                                "retryable": {
                                  "type": "boolean"
                                },
                                "recovery_action": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 500
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "code",
                                "message",
                                "retryable",
                                "recovery_action"
                              ]
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        }
                      ]
                    }
                  },
                  "server_timestamp": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "correlation_id": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 200
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "accepted"
                    ]
                  },
                  "reason": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 120
                          },
                          "message": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 1000
                          },
                          "retryable": {
                            "type": "boolean"
                          },
                          "recovery_action": {
                            "oneOf": [
                              {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 500
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "code",
                          "message",
                          "retryable",
                          "recovery_action"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "schema_version",
                  "receipt_id",
                  "entity",
                  "scope",
                  "actor_user_id",
                  "consumers",
                  "server_timestamp",
                  "correlation_id",
                  "status",
                  "reason"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "schema_version": {
                    "type": "number",
                    "enum": [
                      1
                    ]
                  },
                  "receipt_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "entity": {
                    "type": "object",
                    "properties": {
                      "entity_type": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "entity_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "entity_version": {
                        "oneOf": [
                          {
                            "type": "integer",
                            "minimum": 0
                          },
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          }
                        ]
                      }
                    },
                    "required": [
                      "entity_type",
                      "entity_id",
                      "entity_version"
                    ]
                  },
                  "scope": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "tenant"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "null"
                          },
                          "match_id": {
                            "type": "null"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "league"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "match_id": {
                            "type": "null"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "match"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "match_id": {
                            "type": "string",
                            "format": "uuid"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      }
                    ]
                  },
                  "actor_user_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "consumers": {
                    "type": "array",
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "pending"
                              ]
                            },
                            "propagated_at": {
                              "type": "null"
                            },
                            "reason": {
                              "type": "null"
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "applied"
                              ]
                            },
                            "propagated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "reason": {
                              "type": "null"
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "failed"
                              ]
                            },
                            "propagated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "reason": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "message": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1000
                                },
                                "retryable": {
                                  "type": "boolean"
                                },
                                "recovery_action": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 500
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "code",
                                "message",
                                "retryable",
                                "recovery_action"
                              ]
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "not_applicable"
                              ]
                            },
                            "propagated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "reason": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "message": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1000
                                },
                                "retryable": {
                                  "type": "boolean"
                                },
                                "recovery_action": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 500
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "code",
                                "message",
                                "retryable",
                                "recovery_action"
                              ]
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        }
                      ]
                    }
                  },
                  "server_timestamp": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "correlation_id": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 200
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "rejected"
                    ]
                  },
                  "reason": {
                    "type": "object",
                    "properties": {
                      "code": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "message": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 1000
                      },
                      "retryable": {
                        "type": "boolean"
                      },
                      "recovery_action": {
                        "oneOf": [
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 500
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "code",
                      "message",
                      "retryable",
                      "recovery_action"
                    ]
                  }
                },
                "required": [
                  "schema_version",
                  "receipt_id",
                  "entity",
                  "scope",
                  "actor_user_id",
                  "consumers",
                  "server_timestamp",
                  "correlation_id",
                  "status",
                  "reason"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "schema_version": {
                    "type": "number",
                    "enum": [
                      1
                    ]
                  },
                  "receipt_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "entity": {
                    "type": "object",
                    "properties": {
                      "entity_type": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "entity_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "entity_version": {
                        "oneOf": [
                          {
                            "type": "integer",
                            "minimum": 0
                          },
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          }
                        ]
                      }
                    },
                    "required": [
                      "entity_type",
                      "entity_id",
                      "entity_version"
                    ]
                  },
                  "scope": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "tenant"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "null"
                          },
                          "match_id": {
                            "type": "null"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "league"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "match_id": {
                            "type": "null"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "match"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "match_id": {
                            "type": "string",
                            "format": "uuid"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      }
                    ]
                  },
                  "actor_user_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "consumers": {
                    "type": "array",
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "pending"
                              ]
                            },
                            "propagated_at": {
                              "type": "null"
                            },
                            "reason": {
                              "type": "null"
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "applied"
                              ]
                            },
                            "propagated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "reason": {
                              "type": "null"
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "failed"
                              ]
                            },
                            "propagated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "reason": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "message": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1000
                                },
                                "retryable": {
                                  "type": "boolean"
                                },
                                "recovery_action": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 500
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "code",
                                "message",
                                "retryable",
                                "recovery_action"
                              ]
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "not_applicable"
                              ]
                            },
                            "propagated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "reason": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "message": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1000
                                },
                                "retryable": {
                                  "type": "boolean"
                                },
                                "recovery_action": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 500
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "code",
                                "message",
                                "retryable",
                                "recovery_action"
                              ]
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        }
                      ]
                    }
                  },
                  "server_timestamp": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "correlation_id": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 200
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "superseded"
                    ]
                  },
                  "reason": {
                    "type": "object",
                    "properties": {
                      "code": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "message": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 1000
                      },
                      "retryable": {
                        "type": "boolean"
                      },
                      "recovery_action": {
                        "oneOf": [
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 500
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "code",
                      "message",
                      "retryable",
                      "recovery_action"
                    ]
                  }
                },
                "required": [
                  "schema_version",
                  "receipt_id",
                  "entity",
                  "scope",
                  "actor_user_id",
                  "consumers",
                  "server_timestamp",
                  "correlation_id",
                  "status",
                  "reason"
                ]
              }
            ]
          },
          "player_id": {
            "type": "string",
            "format": "uuid"
          },
          "display_name": {
            "type": "string",
            "minLength": 1
          },
          "shirt_number": {
            "type": "integer",
            "minimum": 1,
            "maximum": 99
          },
          "role": {
            "type": "string",
            "minLength": 1
          },
          "availability": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "available",
                  "unavailable",
                  "tentative"
                ]
              },
              {
                "type": "string",
                "enum": [
                  "not_declared"
                ]
              }
            ]
          },
          "declaration_source": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "self",
                  "captain",
                  "coach",
                  "staff"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "declared_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "called_up": {
            "type": "boolean"
          },
          "eligibility_state": {
            "type": "string",
            "enum": [
              "active",
              "pending",
              "suspended",
              "transferred",
              "expired",
              "medical_blocked",
              "privacy_blocked",
              "minor_boundary"
            ]
          },
          "lineup_allowed": {
            "type": "boolean"
          },
          "lineup_blocker": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "privacy_note": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "avatar_head_id": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "head-01",
                  "head-02",
                  "head-03",
                  "head-04",
                  "head-05",
                  "head-06",
                  "head-07",
                  "head-08",
                  "head-09",
                  "head-10",
                  "head-11",
                  "head-12",
                  "head-13",
                  "head-14",
                  "head-15",
                  "head-16",
                  "head-17",
                  "head-18",
                  "head-19",
                  "head-20",
                  "head-21",
                  "head-22",
                  "head-23",
                  "head-24",
                  "head-25",
                  "head-26",
                  "head-27",
                  "head-28",
                  "head-29",
                  "head-30",
                  "head-31",
                  "head-32",
                  "head-33",
                  "head-34",
                  "head-35",
                  "head-36",
                  "head-37",
                  "head-38",
                  "head-39",
                  "head-40",
                  "head-41",
                  "head-42",
                  "head-43",
                  "head-44",
                  "head-45",
                  "head-46",
                  "head-47",
                  "head-48",
                  "head-49",
                  "head-50",
                  "head-51",
                  "head-52",
                  "head-53",
                  "head-54",
                  "head-55",
                  "head-56",
                  "head-57",
                  "head-58",
                  "head-59",
                  "head-60",
                  "head-61",
                  "head-62",
                  "head-63",
                  "head-64",
                  "head-65",
                  "head-66",
                  "head-67",
                  "head-68",
                  "head-69",
                  "head-70",
                  "head-71",
                  "head-72",
                  "head-73",
                  "head-74",
                  "head-75",
                  "head-76",
                  "head-77",
                  "head-78",
                  "head-79",
                  "head-80",
                  "head-81",
                  "head-82",
                  "head-83",
                  "head-84",
                  "head-85",
                  "head-86",
                  "head-87",
                  "head-88",
                  "head-89",
                  "head-90",
                  "head-91",
                  "head-92",
                  "head-93",
                  "head-94",
                  "head-95",
                  "head-96",
                  "head-97",
                  "head-98",
                  "head-99",
                  "head-100",
                  "head-101",
                  "head-102",
                  "head-103",
                  "head-104",
                  "head-105",
                  "head-106",
                  "head-107",
                  "head-108",
                  "head-109",
                  "head-110",
                  "head-111",
                  "head-112",
                  "head-113",
                  "head-114",
                  "head-115",
                  "head-116",
                  "head-117",
                  "head-118",
                  "head-119",
                  "head-120",
                  "head-121",
                  "head-122",
                  "head-123",
                  "head-124",
                  "head-125",
                  "head-126",
                  "head-127",
                  "head-128",
                  "head-129",
                  "head-130",
                  "head-131",
                  "head-132",
                  "head-133",
                  "head-134",
                  "head-135",
                  "head-136",
                  "head-137",
                  "head-138",
                  "head-139",
                  "head-140",
                  "head-141",
                  "head-142",
                  "head-143",
                  "head-144",
                  "head-145",
                  "head-146",
                  "head-147",
                  "head-148",
                  "head-149",
                  "head-150",
                  "head-151",
                  "head-152",
                  "head-153",
                  "head-154",
                  "head-155",
                  "head-156",
                  "head-157",
                  "head-158",
                  "head-159",
                  "head-160",
                  "head-161",
                  "head-162",
                  "head-163",
                  "head-164",
                  "head-165",
                  "head-166",
                  "head-167",
                  "head-168",
                  "head-169",
                  "head-170",
                  "head-171",
                  "head-172",
                  "head-173",
                  "head-174",
                  "head-175",
                  "head-176",
                  "head-177",
                  "head-178",
                  "head-179",
                  "head-180",
                  "head-181",
                  "head-182",
                  "head-183"
                ]
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "player_id",
          "display_name",
          "shirt_number",
          "role",
          "availability",
          "declaration_source",
          "declared_at",
          "called_up",
          "eligibility_state",
          "lineup_allowed",
          "lineup_blocker",
          "privacy_note",
          "avatar_head_id"
        ]
      },
      "TeamAreaRosterResponse": {
        "type": "object",
        "properties": {
          "team_id": {
            "type": "string",
            "format": "uuid"
          },
          "team_name": {
            "type": "string",
            "minLength": 1
          },
          "match_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "players": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "truth_receipt": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "schema_version": {
                          "type": "number",
                          "enum": [
                            1
                          ]
                        },
                        "receipt_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "entity": {
                          "type": "object",
                          "properties": {
                            "entity_type": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "entity_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "entity_version": {
                              "oneOf": [
                                {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 200
                                }
                              ]
                            }
                          },
                          "required": [
                            "entity_type",
                            "entity_id",
                            "entity_version"
                          ]
                        },
                        "scope": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "schema_version": {
                                  "type": "number",
                                  "enum": [
                                    1
                                  ]
                                },
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "tenant"
                                  ]
                                },
                                "tenant_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "league_id": {
                                  "type": "null"
                                },
                                "match_id": {
                                  "type": "null"
                                }
                              },
                              "required": [
                                "schema_version",
                                "kind",
                                "tenant_id",
                                "league_id",
                                "match_id"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "schema_version": {
                                  "type": "number",
                                  "enum": [
                                    1
                                  ]
                                },
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "league"
                                  ]
                                },
                                "tenant_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "league_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "match_id": {
                                  "type": "null"
                                }
                              },
                              "required": [
                                "schema_version",
                                "kind",
                                "tenant_id",
                                "league_id",
                                "match_id"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "schema_version": {
                                  "type": "number",
                                  "enum": [
                                    1
                                  ]
                                },
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "match"
                                  ]
                                },
                                "tenant_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "league_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "match_id": {
                                  "type": "string",
                                  "format": "uuid"
                                }
                              },
                              "required": [
                                "schema_version",
                                "kind",
                                "tenant_id",
                                "league_id",
                                "match_id"
                              ]
                            }
                          ]
                        },
                        "actor_user_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "consumers": {
                          "type": "array",
                          "items": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "consumer": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 120
                                  },
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "pending"
                                    ]
                                  },
                                  "propagated_at": {
                                    "type": "null"
                                  },
                                  "reason": {
                                    "type": "null"
                                  }
                                },
                                "required": [
                                  "consumer",
                                  "state",
                                  "propagated_at",
                                  "reason"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "consumer": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 120
                                  },
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "applied"
                                    ]
                                  },
                                  "propagated_at": {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  "reason": {
                                    "type": "null"
                                  }
                                },
                                "required": [
                                  "consumer",
                                  "state",
                                  "propagated_at",
                                  "reason"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "consumer": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 120
                                  },
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "failed"
                                    ]
                                  },
                                  "propagated_at": {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  "reason": {
                                    "type": "object",
                                    "properties": {
                                      "code": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 120
                                      },
                                      "message": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 1000
                                      },
                                      "retryable": {
                                        "type": "boolean"
                                      },
                                      "recovery_action": {
                                        "oneOf": [
                                          {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 500
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "code",
                                      "message",
                                      "retryable",
                                      "recovery_action"
                                    ]
                                  }
                                },
                                "required": [
                                  "consumer",
                                  "state",
                                  "propagated_at",
                                  "reason"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "consumer": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 120
                                  },
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "not_applicable"
                                    ]
                                  },
                                  "propagated_at": {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  "reason": {
                                    "type": "object",
                                    "properties": {
                                      "code": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 120
                                      },
                                      "message": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 1000
                                      },
                                      "retryable": {
                                        "type": "boolean"
                                      },
                                      "recovery_action": {
                                        "oneOf": [
                                          {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 500
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "code",
                                      "message",
                                      "retryable",
                                      "recovery_action"
                                    ]
                                  }
                                },
                                "required": [
                                  "consumer",
                                  "state",
                                  "propagated_at",
                                  "reason"
                                ]
                              }
                            ]
                          }
                        },
                        "server_timestamp": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "correlation_id": {
                          "type": "string",
                          "minLength": 8,
                          "maxLength": 200
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "queued"
                          ]
                        },
                        "reason": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "message": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1000
                                },
                                "retryable": {
                                  "type": "boolean"
                                },
                                "recovery_action": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 500
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "code",
                                "message",
                                "retryable",
                                "recovery_action"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "schema_version",
                        "receipt_id",
                        "entity",
                        "scope",
                        "actor_user_id",
                        "consumers",
                        "server_timestamp",
                        "correlation_id",
                        "status",
                        "reason"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "schema_version": {
                          "type": "number",
                          "enum": [
                            1
                          ]
                        },
                        "receipt_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "entity": {
                          "type": "object",
                          "properties": {
                            "entity_type": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "entity_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "entity_version": {
                              "oneOf": [
                                {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 200
                                }
                              ]
                            }
                          },
                          "required": [
                            "entity_type",
                            "entity_id",
                            "entity_version"
                          ]
                        },
                        "scope": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "schema_version": {
                                  "type": "number",
                                  "enum": [
                                    1
                                  ]
                                },
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "tenant"
                                  ]
                                },
                                "tenant_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "league_id": {
                                  "type": "null"
                                },
                                "match_id": {
                                  "type": "null"
                                }
                              },
                              "required": [
                                "schema_version",
                                "kind",
                                "tenant_id",
                                "league_id",
                                "match_id"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "schema_version": {
                                  "type": "number",
                                  "enum": [
                                    1
                                  ]
                                },
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "league"
                                  ]
                                },
                                "tenant_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "league_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "match_id": {
                                  "type": "null"
                                }
                              },
                              "required": [
                                "schema_version",
                                "kind",
                                "tenant_id",
                                "league_id",
                                "match_id"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "schema_version": {
                                  "type": "number",
                                  "enum": [
                                    1
                                  ]
                                },
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "match"
                                  ]
                                },
                                "tenant_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "league_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "match_id": {
                                  "type": "string",
                                  "format": "uuid"
                                }
                              },
                              "required": [
                                "schema_version",
                                "kind",
                                "tenant_id",
                                "league_id",
                                "match_id"
                              ]
                            }
                          ]
                        },
                        "actor_user_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "consumers": {
                          "type": "array",
                          "items": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "consumer": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 120
                                  },
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "pending"
                                    ]
                                  },
                                  "propagated_at": {
                                    "type": "null"
                                  },
                                  "reason": {
                                    "type": "null"
                                  }
                                },
                                "required": [
                                  "consumer",
                                  "state",
                                  "propagated_at",
                                  "reason"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "consumer": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 120
                                  },
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "applied"
                                    ]
                                  },
                                  "propagated_at": {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  "reason": {
                                    "type": "null"
                                  }
                                },
                                "required": [
                                  "consumer",
                                  "state",
                                  "propagated_at",
                                  "reason"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "consumer": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 120
                                  },
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "failed"
                                    ]
                                  },
                                  "propagated_at": {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  "reason": {
                                    "type": "object",
                                    "properties": {
                                      "code": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 120
                                      },
                                      "message": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 1000
                                      },
                                      "retryable": {
                                        "type": "boolean"
                                      },
                                      "recovery_action": {
                                        "oneOf": [
                                          {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 500
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "code",
                                      "message",
                                      "retryable",
                                      "recovery_action"
                                    ]
                                  }
                                },
                                "required": [
                                  "consumer",
                                  "state",
                                  "propagated_at",
                                  "reason"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "consumer": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 120
                                  },
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "not_applicable"
                                    ]
                                  },
                                  "propagated_at": {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  "reason": {
                                    "type": "object",
                                    "properties": {
                                      "code": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 120
                                      },
                                      "message": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 1000
                                      },
                                      "retryable": {
                                        "type": "boolean"
                                      },
                                      "recovery_action": {
                                        "oneOf": [
                                          {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 500
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "code",
                                      "message",
                                      "retryable",
                                      "recovery_action"
                                    ]
                                  }
                                },
                                "required": [
                                  "consumer",
                                  "state",
                                  "propagated_at",
                                  "reason"
                                ]
                              }
                            ]
                          }
                        },
                        "server_timestamp": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "correlation_id": {
                          "type": "string",
                          "minLength": 8,
                          "maxLength": 200
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "accepted"
                          ]
                        },
                        "reason": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "message": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1000
                                },
                                "retryable": {
                                  "type": "boolean"
                                },
                                "recovery_action": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 500
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "code",
                                "message",
                                "retryable",
                                "recovery_action"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "schema_version",
                        "receipt_id",
                        "entity",
                        "scope",
                        "actor_user_id",
                        "consumers",
                        "server_timestamp",
                        "correlation_id",
                        "status",
                        "reason"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "schema_version": {
                          "type": "number",
                          "enum": [
                            1
                          ]
                        },
                        "receipt_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "entity": {
                          "type": "object",
                          "properties": {
                            "entity_type": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "entity_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "entity_version": {
                              "oneOf": [
                                {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 200
                                }
                              ]
                            }
                          },
                          "required": [
                            "entity_type",
                            "entity_id",
                            "entity_version"
                          ]
                        },
                        "scope": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "schema_version": {
                                  "type": "number",
                                  "enum": [
                                    1
                                  ]
                                },
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "tenant"
                                  ]
                                },
                                "tenant_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "league_id": {
                                  "type": "null"
                                },
                                "match_id": {
                                  "type": "null"
                                }
                              },
                              "required": [
                                "schema_version",
                                "kind",
                                "tenant_id",
                                "league_id",
                                "match_id"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "schema_version": {
                                  "type": "number",
                                  "enum": [
                                    1
                                  ]
                                },
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "league"
                                  ]
                                },
                                "tenant_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "league_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "match_id": {
                                  "type": "null"
                                }
                              },
                              "required": [
                                "schema_version",
                                "kind",
                                "tenant_id",
                                "league_id",
                                "match_id"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "schema_version": {
                                  "type": "number",
                                  "enum": [
                                    1
                                  ]
                                },
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "match"
                                  ]
                                },
                                "tenant_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "league_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "match_id": {
                                  "type": "string",
                                  "format": "uuid"
                                }
                              },
                              "required": [
                                "schema_version",
                                "kind",
                                "tenant_id",
                                "league_id",
                                "match_id"
                              ]
                            }
                          ]
                        },
                        "actor_user_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "consumers": {
                          "type": "array",
                          "items": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "consumer": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 120
                                  },
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "pending"
                                    ]
                                  },
                                  "propagated_at": {
                                    "type": "null"
                                  },
                                  "reason": {
                                    "type": "null"
                                  }
                                },
                                "required": [
                                  "consumer",
                                  "state",
                                  "propagated_at",
                                  "reason"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "consumer": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 120
                                  },
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "applied"
                                    ]
                                  },
                                  "propagated_at": {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  "reason": {
                                    "type": "null"
                                  }
                                },
                                "required": [
                                  "consumer",
                                  "state",
                                  "propagated_at",
                                  "reason"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "consumer": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 120
                                  },
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "failed"
                                    ]
                                  },
                                  "propagated_at": {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  "reason": {
                                    "type": "object",
                                    "properties": {
                                      "code": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 120
                                      },
                                      "message": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 1000
                                      },
                                      "retryable": {
                                        "type": "boolean"
                                      },
                                      "recovery_action": {
                                        "oneOf": [
                                          {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 500
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "code",
                                      "message",
                                      "retryable",
                                      "recovery_action"
                                    ]
                                  }
                                },
                                "required": [
                                  "consumer",
                                  "state",
                                  "propagated_at",
                                  "reason"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "consumer": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 120
                                  },
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "not_applicable"
                                    ]
                                  },
                                  "propagated_at": {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  "reason": {
                                    "type": "object",
                                    "properties": {
                                      "code": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 120
                                      },
                                      "message": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 1000
                                      },
                                      "retryable": {
                                        "type": "boolean"
                                      },
                                      "recovery_action": {
                                        "oneOf": [
                                          {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 500
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "code",
                                      "message",
                                      "retryable",
                                      "recovery_action"
                                    ]
                                  }
                                },
                                "required": [
                                  "consumer",
                                  "state",
                                  "propagated_at",
                                  "reason"
                                ]
                              }
                            ]
                          }
                        },
                        "server_timestamp": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "correlation_id": {
                          "type": "string",
                          "minLength": 8,
                          "maxLength": 200
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "rejected"
                          ]
                        },
                        "reason": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "message": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 1000
                            },
                            "retryable": {
                              "type": "boolean"
                            },
                            "recovery_action": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 500
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message",
                            "retryable",
                            "recovery_action"
                          ]
                        }
                      },
                      "required": [
                        "schema_version",
                        "receipt_id",
                        "entity",
                        "scope",
                        "actor_user_id",
                        "consumers",
                        "server_timestamp",
                        "correlation_id",
                        "status",
                        "reason"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "schema_version": {
                          "type": "number",
                          "enum": [
                            1
                          ]
                        },
                        "receipt_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "entity": {
                          "type": "object",
                          "properties": {
                            "entity_type": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "entity_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "entity_version": {
                              "oneOf": [
                                {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 200
                                }
                              ]
                            }
                          },
                          "required": [
                            "entity_type",
                            "entity_id",
                            "entity_version"
                          ]
                        },
                        "scope": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "schema_version": {
                                  "type": "number",
                                  "enum": [
                                    1
                                  ]
                                },
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "tenant"
                                  ]
                                },
                                "tenant_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "league_id": {
                                  "type": "null"
                                },
                                "match_id": {
                                  "type": "null"
                                }
                              },
                              "required": [
                                "schema_version",
                                "kind",
                                "tenant_id",
                                "league_id",
                                "match_id"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "schema_version": {
                                  "type": "number",
                                  "enum": [
                                    1
                                  ]
                                },
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "league"
                                  ]
                                },
                                "tenant_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "league_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "match_id": {
                                  "type": "null"
                                }
                              },
                              "required": [
                                "schema_version",
                                "kind",
                                "tenant_id",
                                "league_id",
                                "match_id"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "schema_version": {
                                  "type": "number",
                                  "enum": [
                                    1
                                  ]
                                },
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "match"
                                  ]
                                },
                                "tenant_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "league_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "match_id": {
                                  "type": "string",
                                  "format": "uuid"
                                }
                              },
                              "required": [
                                "schema_version",
                                "kind",
                                "tenant_id",
                                "league_id",
                                "match_id"
                              ]
                            }
                          ]
                        },
                        "actor_user_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "consumers": {
                          "type": "array",
                          "items": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "consumer": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 120
                                  },
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "pending"
                                    ]
                                  },
                                  "propagated_at": {
                                    "type": "null"
                                  },
                                  "reason": {
                                    "type": "null"
                                  }
                                },
                                "required": [
                                  "consumer",
                                  "state",
                                  "propagated_at",
                                  "reason"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "consumer": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 120
                                  },
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "applied"
                                    ]
                                  },
                                  "propagated_at": {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  "reason": {
                                    "type": "null"
                                  }
                                },
                                "required": [
                                  "consumer",
                                  "state",
                                  "propagated_at",
                                  "reason"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "consumer": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 120
                                  },
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "failed"
                                    ]
                                  },
                                  "propagated_at": {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  "reason": {
                                    "type": "object",
                                    "properties": {
                                      "code": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 120
                                      },
                                      "message": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 1000
                                      },
                                      "retryable": {
                                        "type": "boolean"
                                      },
                                      "recovery_action": {
                                        "oneOf": [
                                          {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 500
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "code",
                                      "message",
                                      "retryable",
                                      "recovery_action"
                                    ]
                                  }
                                },
                                "required": [
                                  "consumer",
                                  "state",
                                  "propagated_at",
                                  "reason"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "consumer": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 120
                                  },
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "not_applicable"
                                    ]
                                  },
                                  "propagated_at": {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  "reason": {
                                    "type": "object",
                                    "properties": {
                                      "code": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 120
                                      },
                                      "message": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 1000
                                      },
                                      "retryable": {
                                        "type": "boolean"
                                      },
                                      "recovery_action": {
                                        "oneOf": [
                                          {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 500
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "code",
                                      "message",
                                      "retryable",
                                      "recovery_action"
                                    ]
                                  }
                                },
                                "required": [
                                  "consumer",
                                  "state",
                                  "propagated_at",
                                  "reason"
                                ]
                              }
                            ]
                          }
                        },
                        "server_timestamp": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "correlation_id": {
                          "type": "string",
                          "minLength": 8,
                          "maxLength": 200
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "superseded"
                          ]
                        },
                        "reason": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "message": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 1000
                            },
                            "retryable": {
                              "type": "boolean"
                            },
                            "recovery_action": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 500
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message",
                            "retryable",
                            "recovery_action"
                          ]
                        }
                      },
                      "required": [
                        "schema_version",
                        "receipt_id",
                        "entity",
                        "scope",
                        "actor_user_id",
                        "consumers",
                        "server_timestamp",
                        "correlation_id",
                        "status",
                        "reason"
                      ]
                    }
                  ]
                },
                "player_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "display_name": {
                  "type": "string",
                  "minLength": 1
                },
                "shirt_number": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 99
                },
                "role": {
                  "type": "string",
                  "minLength": 1
                },
                "availability": {
                  "oneOf": [
                    {
                      "type": "string",
                      "enum": [
                        "available",
                        "unavailable",
                        "tentative"
                      ]
                    },
                    {
                      "type": "string",
                      "enum": [
                        "not_declared"
                      ]
                    }
                  ]
                },
                "declaration_source": {
                  "oneOf": [
                    {
                      "type": "string",
                      "enum": [
                        "self",
                        "captain",
                        "coach",
                        "staff"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "declared_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "called_up": {
                  "type": "boolean"
                },
                "eligibility_state": {
                  "type": "string",
                  "enum": [
                    "active",
                    "pending",
                    "suspended",
                    "transferred",
                    "expired",
                    "medical_blocked",
                    "privacy_blocked",
                    "minor_boundary"
                  ]
                },
                "lineup_allowed": {
                  "type": "boolean"
                },
                "lineup_blocker": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "privacy_note": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "avatar_head_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "enum": [
                        "head-01",
                        "head-02",
                        "head-03",
                        "head-04",
                        "head-05",
                        "head-06",
                        "head-07",
                        "head-08",
                        "head-09",
                        "head-10",
                        "head-11",
                        "head-12",
                        "head-13",
                        "head-14",
                        "head-15",
                        "head-16",
                        "head-17",
                        "head-18",
                        "head-19",
                        "head-20",
                        "head-21",
                        "head-22",
                        "head-23",
                        "head-24",
                        "head-25",
                        "head-26",
                        "head-27",
                        "head-28",
                        "head-29",
                        "head-30",
                        "head-31",
                        "head-32",
                        "head-33",
                        "head-34",
                        "head-35",
                        "head-36",
                        "head-37",
                        "head-38",
                        "head-39",
                        "head-40",
                        "head-41",
                        "head-42",
                        "head-43",
                        "head-44",
                        "head-45",
                        "head-46",
                        "head-47",
                        "head-48",
                        "head-49",
                        "head-50",
                        "head-51",
                        "head-52",
                        "head-53",
                        "head-54",
                        "head-55",
                        "head-56",
                        "head-57",
                        "head-58",
                        "head-59",
                        "head-60",
                        "head-61",
                        "head-62",
                        "head-63",
                        "head-64",
                        "head-65",
                        "head-66",
                        "head-67",
                        "head-68",
                        "head-69",
                        "head-70",
                        "head-71",
                        "head-72",
                        "head-73",
                        "head-74",
                        "head-75",
                        "head-76",
                        "head-77",
                        "head-78",
                        "head-79",
                        "head-80",
                        "head-81",
                        "head-82",
                        "head-83",
                        "head-84",
                        "head-85",
                        "head-86",
                        "head-87",
                        "head-88",
                        "head-89",
                        "head-90",
                        "head-91",
                        "head-92",
                        "head-93",
                        "head-94",
                        "head-95",
                        "head-96",
                        "head-97",
                        "head-98",
                        "head-99",
                        "head-100",
                        "head-101",
                        "head-102",
                        "head-103",
                        "head-104",
                        "head-105",
                        "head-106",
                        "head-107",
                        "head-108",
                        "head-109",
                        "head-110",
                        "head-111",
                        "head-112",
                        "head-113",
                        "head-114",
                        "head-115",
                        "head-116",
                        "head-117",
                        "head-118",
                        "head-119",
                        "head-120",
                        "head-121",
                        "head-122",
                        "head-123",
                        "head-124",
                        "head-125",
                        "head-126",
                        "head-127",
                        "head-128",
                        "head-129",
                        "head-130",
                        "head-131",
                        "head-132",
                        "head-133",
                        "head-134",
                        "head-135",
                        "head-136",
                        "head-137",
                        "head-138",
                        "head-139",
                        "head-140",
                        "head-141",
                        "head-142",
                        "head-143",
                        "head-144",
                        "head-145",
                        "head-146",
                        "head-147",
                        "head-148",
                        "head-149",
                        "head-150",
                        "head-151",
                        "head-152",
                        "head-153",
                        "head-154",
                        "head-155",
                        "head-156",
                        "head-157",
                        "head-158",
                        "head-159",
                        "head-160",
                        "head-161",
                        "head-162",
                        "head-163",
                        "head-164",
                        "head-165",
                        "head-166",
                        "head-167",
                        "head-168",
                        "head-169",
                        "head-170",
                        "head-171",
                        "head-172",
                        "head-173",
                        "head-174",
                        "head-175",
                        "head-176",
                        "head-177",
                        "head-178",
                        "head-179",
                        "head-180",
                        "head-181",
                        "head-182",
                        "head-183"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "player_id",
                "display_name",
                "shirt_number",
                "role",
                "availability",
                "declaration_source",
                "declared_at",
                "called_up",
                "eligibility_state",
                "lineup_allowed",
                "lineup_blocker",
                "privacy_note",
                "avatar_head_id"
              ]
            }
          }
        },
        "required": [
          "team_id",
          "team_name",
          "match_id",
          "players"
        ]
      },
      "TeamAreaDocumentMedicalStatus": {
        "type": "string",
        "enum": [
          "valid",
          "missing",
          "blocked"
        ]
      },
      "TeamAreaDocumentMissingKind": {
        "type": "string",
        "enum": [
          "medical_eligibility",
          "roster_card",
          "account_link",
          "privacy_consent",
          "sport_status"
        ]
      },
      "TeamAreaDocumentPlayerRow": {
        "type": "object",
        "properties": {
          "player_id": {
            "type": "string",
            "format": "uuid"
          },
          "display_name": {
            "type": "string",
            "minLength": 1
          },
          "shirt_number": {
            "type": "integer",
            "minimum": 1,
            "maximum": 99
          },
          "role": {
            "type": "string",
            "minLength": 1
          },
          "roster_active": {
            "type": "boolean"
          },
          "medical_status": {
            "type": "string",
            "enum": [
              "valid",
              "missing",
              "blocked"
            ]
          },
          "card_ok": {
            "type": "boolean"
          },
          "consent_ok": {
            "type": "boolean"
          },
          "suspension_ok": {
            "type": "boolean"
          },
          "missing": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "medical_eligibility",
                "roster_card",
                "account_link",
                "privacy_consent",
                "sport_status"
              ]
            }
          }
        },
        "required": [
          "player_id",
          "display_name",
          "shirt_number",
          "role",
          "roster_active",
          "medical_status",
          "card_ok",
          "consent_ok",
          "suspension_ok",
          "missing"
        ]
      },
      "TeamAreaDocumentsResponse": {
        "type": "object",
        "properties": {
          "team_id": {
            "type": "string",
            "format": "uuid"
          },
          "team_name": {
            "type": "string",
            "minLength": 1
          },
          "players": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "player_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "display_name": {
                  "type": "string",
                  "minLength": 1
                },
                "shirt_number": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 99
                },
                "role": {
                  "type": "string",
                  "minLength": 1
                },
                "roster_active": {
                  "type": "boolean"
                },
                "medical_status": {
                  "type": "string",
                  "enum": [
                    "valid",
                    "missing",
                    "blocked"
                  ]
                },
                "card_ok": {
                  "type": "boolean"
                },
                "consent_ok": {
                  "type": "boolean"
                },
                "suspension_ok": {
                  "type": "boolean"
                },
                "missing": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "medical_eligibility",
                      "roster_card",
                      "account_link",
                      "privacy_consent",
                      "sport_status"
                    ]
                  }
                }
              },
              "required": [
                "player_id",
                "display_name",
                "shirt_number",
                "role",
                "roster_active",
                "medical_status",
                "card_ok",
                "consent_ok",
                "suspension_ok",
                "missing"
              ]
            }
          }
        },
        "required": [
          "team_id",
          "team_name",
          "players"
        ]
      },
      "TeamAreaDashboardMatch": {
        "type": "object",
        "properties": {
          "match_id": {
            "type": "string",
            "format": "uuid"
          },
          "scheduled_at": {
            "type": "string",
            "format": "date-time"
          },
          "opponent_team_id": {
            "type": "string",
            "format": "uuid"
          },
          "opponent_display_name": {
            "type": "string",
            "minLength": 1
          },
          "side": {
            "type": "string",
            "enum": [
              "home",
              "away"
            ]
          },
          "lineup_submitted": {
            "type": "boolean"
          },
          "callup_count": {
            "type": "integer",
            "minimum": 0
          },
          "availability_counts": {
            "type": "object",
            "properties": {
              "available": {
                "type": "integer",
                "minimum": 0
              },
              "unavailable": {
                "type": "integer",
                "minimum": 0
              },
              "tentative": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "available",
              "unavailable",
              "tentative"
            ]
          },
          "roster_size": {
            "type": "integer",
            "minimum": 0
          },
          "callup_availability": {
            "type": "object",
            "properties": {
              "called_up": {
                "type": "integer",
                "minimum": 0
              },
              "confirmed": {
                "type": "integer",
                "minimum": 0
              },
              "declined": {
                "type": "integer",
                "minimum": 0
              },
              "tentative": {
                "type": "integer",
                "minimum": 0
              },
              "not_declared": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "called_up",
              "confirmed",
              "declined",
              "tentative",
              "not_declared"
            ]
          },
          "matchday_rules": {
            "type": "object",
            "properties": {
              "authority": {
                "type": "string",
                "enum": [
                  "server"
                ]
              },
              "ruleset": {
                "type": "object",
                "properties": {
                  "source": {
                    "type": "string",
                    "enum": [
                      "competition_revision",
                      "platform_default"
                    ]
                  },
                  "label": {
                    "type": "string",
                    "minLength": 1
                  },
                  "provisional": {
                    "type": "boolean"
                  },
                  "owner_gate": {
                    "oneOf": [
                      {
                        "type": "string",
                        "pattern": "^OG-\\d{2}$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "revision_id": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "revision": {
                    "oneOf": [
                      {
                        "type": "integer",
                        "exclusiveMinimum": 0
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "content_hash": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "source",
                  "label",
                  "provisional",
                  "owner_gate",
                  "revision_id",
                  "revision",
                  "content_hash"
                ]
              },
              "called_up": {
                "type": "object",
                "properties": {
                  "source": {
                    "type": "string",
                    "enum": [
                      "competition_revision",
                      "platform_default"
                    ]
                  },
                  "provisional": {
                    "type": "boolean"
                  },
                  "min_required": {
                    "type": "integer",
                    "exclusiveMinimum": 0
                  },
                  "max_allowed": {
                    "type": "integer",
                    "exclusiveMinimum": 0
                  }
                },
                "required": [
                  "source",
                  "provisional",
                  "min_required",
                  "max_allowed"
                ]
              },
              "deadlines": {
                "type": "object",
                "properties": {
                  "source": {
                    "type": "string",
                    "enum": [
                      "competition_revision",
                      "platform_default"
                    ]
                  },
                  "provisional": {
                    "type": "boolean"
                  },
                  "profile_id": {
                    "type": "string",
                    "minLength": 1
                  },
                  "offsets": {
                    "type": "object",
                    "properties": {
                      "availability_minutes_before_kickoff": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 20160
                      },
                      "callup_minutes_before_kickoff": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 20160
                      },
                      "lineup_minutes_before_kickoff": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 20160
                      }
                    },
                    "required": [
                      "availability_minutes_before_kickoff",
                      "callup_minutes_before_kickoff",
                      "lineup_minutes_before_kickoff"
                    ]
                  },
                  "availability_deadline_at": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "date-time"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "callup_deadline_at": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "date-time"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "lineup_deadline_at": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "date-time"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "source",
                  "provisional",
                  "profile_id",
                  "offsets",
                  "availability_deadline_at",
                  "callup_deadline_at",
                  "lineup_deadline_at"
                ]
              }
            },
            "required": [
              "authority",
              "ruleset",
              "called_up",
              "deadlines"
            ]
          },
          "can_request_correction": {
            "type": "boolean"
          },
          "schedule_classification": {
            "type": "object",
            "properties": {
              "round": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "round_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "label": {
                        "type": "string",
                        "minLength": 1
                      },
                      "order_index": {
                        "type": "integer",
                        "minimum": 0
                      }
                    },
                    "required": [
                      "round_id",
                      "label",
                      "order_index"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "kind": {
                "type": "string",
                "enum": [
                  "unknown"
                ]
              }
            },
            "required": [
              "round",
              "kind"
            ]
          },
          "lineup_deadline": {
            "type": "object",
            "properties": {
              "deadline_at": {
                "type": "string",
                "format": "date-time"
              },
              "valid_until": {
                "type": "string",
                "format": "date-time"
              },
              "server_time": {
                "type": "string",
                "format": "date-time"
              },
              "timezone": {
                "type": "string",
                "minLength": 1
              },
              "state": {
                "type": "string",
                "enum": [
                  "open",
                  "expired"
                ]
              },
              "lock_basis": {
                "type": "string",
                "enum": [
                  "actual_start"
                ]
              }
            },
            "required": [
              "deadline_at",
              "valid_until",
              "server_time",
              "timezone",
              "state"
            ]
          }
        },
        "required": [
          "match_id",
          "scheduled_at",
          "opponent_team_id",
          "opponent_display_name",
          "side",
          "lineup_submitted",
          "callup_count",
          "availability_counts",
          "can_request_correction"
        ]
      },
      "TeamAreaDashboardResponse": {
        "type": "object",
        "properties": {
          "team_id": {
            "type": "string",
            "format": "uuid"
          },
          "team_name": {
            "type": "string",
            "minLength": 1
          },
          "actions": {
            "type": "object",
            "properties": {
              "can_read_documents": {
                "type": "boolean"
              },
              "can_read_receipt_details": {
                "type": "boolean"
              },
              "can_manage_availability": {
                "type": "boolean"
              },
              "can_manage_callups": {
                "type": "boolean"
              },
              "can_submit_lineup": {
                "type": "boolean"
              },
              "can_ack_communications": {
                "type": "boolean"
              },
              "self_availability_player_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                }
              }
            },
            "required": [
              "can_read_documents",
              "can_read_receipt_details",
              "can_manage_availability",
              "can_manage_callups",
              "can_submit_lineup",
              "can_ack_communications",
              "self_availability_player_ids"
            ]
          },
          "upcoming_matches": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "match_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "scheduled_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "opponent_team_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "opponent_display_name": {
                  "type": "string",
                  "minLength": 1
                },
                "side": {
                  "type": "string",
                  "enum": [
                    "home",
                    "away"
                  ]
                },
                "lineup_submitted": {
                  "type": "boolean"
                },
                "callup_count": {
                  "type": "integer",
                  "minimum": 0
                },
                "availability_counts": {
                  "type": "object",
                  "properties": {
                    "available": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "unavailable": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "tentative": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "available",
                    "unavailable",
                    "tentative"
                  ]
                },
                "roster_size": {
                  "type": "integer",
                  "minimum": 0
                },
                "callup_availability": {
                  "type": "object",
                  "properties": {
                    "called_up": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "confirmed": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "declined": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "tentative": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "not_declared": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "called_up",
                    "confirmed",
                    "declined",
                    "tentative",
                    "not_declared"
                  ]
                },
                "matchday_rules": {
                  "type": "object",
                  "properties": {
                    "authority": {
                      "type": "string",
                      "enum": [
                        "server"
                      ]
                    },
                    "ruleset": {
                      "type": "object",
                      "properties": {
                        "source": {
                          "type": "string",
                          "enum": [
                            "competition_revision",
                            "platform_default"
                          ]
                        },
                        "label": {
                          "type": "string",
                          "minLength": 1
                        },
                        "provisional": {
                          "type": "boolean"
                        },
                        "owner_gate": {
                          "oneOf": [
                            {
                              "type": "string",
                              "pattern": "^OG-\\d{2}$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "revision_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "revision": {
                          "oneOf": [
                            {
                              "type": "integer",
                              "exclusiveMinimum": 0
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "content_hash": {
                          "type": "string",
                          "minLength": 1
                        }
                      },
                      "required": [
                        "source",
                        "label",
                        "provisional",
                        "owner_gate",
                        "revision_id",
                        "revision",
                        "content_hash"
                      ]
                    },
                    "called_up": {
                      "type": "object",
                      "properties": {
                        "source": {
                          "type": "string",
                          "enum": [
                            "competition_revision",
                            "platform_default"
                          ]
                        },
                        "provisional": {
                          "type": "boolean"
                        },
                        "min_required": {
                          "type": "integer",
                          "exclusiveMinimum": 0
                        },
                        "max_allowed": {
                          "type": "integer",
                          "exclusiveMinimum": 0
                        }
                      },
                      "required": [
                        "source",
                        "provisional",
                        "min_required",
                        "max_allowed"
                      ]
                    },
                    "deadlines": {
                      "type": "object",
                      "properties": {
                        "source": {
                          "type": "string",
                          "enum": [
                            "competition_revision",
                            "platform_default"
                          ]
                        },
                        "provisional": {
                          "type": "boolean"
                        },
                        "profile_id": {
                          "type": "string",
                          "minLength": 1
                        },
                        "offsets": {
                          "type": "object",
                          "properties": {
                            "availability_minutes_before_kickoff": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 20160
                            },
                            "callup_minutes_before_kickoff": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 20160
                            },
                            "lineup_minutes_before_kickoff": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 20160
                            }
                          },
                          "required": [
                            "availability_minutes_before_kickoff",
                            "callup_minutes_before_kickoff",
                            "lineup_minutes_before_kickoff"
                          ]
                        },
                        "availability_deadline_at": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "date-time"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "callup_deadline_at": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "date-time"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "lineup_deadline_at": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "date-time"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "source",
                        "provisional",
                        "profile_id",
                        "offsets",
                        "availability_deadline_at",
                        "callup_deadline_at",
                        "lineup_deadline_at"
                      ]
                    }
                  },
                  "required": [
                    "authority",
                    "ruleset",
                    "called_up",
                    "deadlines"
                  ]
                },
                "can_request_correction": {
                  "type": "boolean"
                },
                "schedule_classification": {
                  "type": "object",
                  "properties": {
                    "round": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "round_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "label": {
                              "type": "string",
                              "minLength": 1
                            },
                            "order_index": {
                              "type": "integer",
                              "minimum": 0
                            }
                          },
                          "required": [
                            "round_id",
                            "label",
                            "order_index"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "unknown"
                      ]
                    }
                  },
                  "required": [
                    "round",
                    "kind"
                  ]
                },
                "lineup_deadline": {
                  "type": "object",
                  "properties": {
                    "deadline_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "valid_until": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "server_time": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "timezone": {
                      "type": "string",
                      "minLength": 1
                    },
                    "state": {
                      "type": "string",
                      "enum": [
                        "open",
                        "expired"
                      ]
                    },
                    "lock_basis": {
                      "type": "string",
                      "enum": [
                        "actual_start"
                      ]
                    }
                  },
                  "required": [
                    "deadline_at",
                    "valid_until",
                    "server_time",
                    "timezone",
                    "state"
                  ]
                }
              },
              "required": [
                "match_id",
                "scheduled_at",
                "opponent_team_id",
                "opponent_display_name",
                "side",
                "lineup_submitted",
                "callup_count",
                "availability_counts",
                "can_request_correction"
              ]
            }
          },
          "comms": {
            "type": "object",
            "properties": {
              "total": {
                "type": "integer",
                "minimum": 0
              },
              "unacked": {
                "type": "integer",
                "minimum": 0
              },
              "overdue": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "total",
              "unacked",
              "overdue"
            ]
          },
          "season_schedule": {
            "type": "object",
            "properties": {
              "state": {
                "type": "string",
                "enum": [
                  "scheduled",
                  "concluded",
                  "none_scheduled"
                ]
              },
              "last_match_at": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "state",
              "last_match_at"
            ]
          }
        },
        "required": [
          "team_id",
          "team_name",
          "actions",
          "upcoming_matches",
          "comms",
          "season_schedule"
        ]
      },
      "TeamAreaTeamOption": {
        "type": "object",
        "properties": {
          "team_id": {
            "type": "string",
            "format": "uuid"
          },
          "display_name": {
            "type": "string",
            "minLength": 1
          },
          "short_name": {
            "type": "string",
            "minLength": 1
          },
          "logo_url": {
            "oneOf": [
              {
                "type": "string",
                "format": "uri"
              },
              {
                "type": "null"
              }
            ]
          },
          "competitions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "tournament_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "season_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "label": {
                  "type": "string",
                  "minLength": 1
                },
                "season_label": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "status": {
                  "type": "string",
                  "minLength": 1
                },
                "source": {
                  "type": "string",
                  "enum": [
                    "registration",
                    "fixtures"
                  ]
                }
              },
              "required": [
                "tournament_id",
                "label",
                "season_label",
                "status",
                "source"
              ]
            }
          }
        },
        "required": [
          "team_id",
          "display_name",
          "short_name",
          "logo_url",
          "competitions"
        ]
      },
      "TeamAreaTeamListResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "team_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "display_name": {
                  "type": "string",
                  "minLength": 1
                },
                "short_name": {
                  "type": "string",
                  "minLength": 1
                },
                "logo_url": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uri"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "competitions": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "tournament_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "season_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "label": {
                        "type": "string",
                        "minLength": 1
                      },
                      "season_label": {
                        "oneOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "status": {
                        "type": "string",
                        "minLength": 1
                      },
                      "source": {
                        "type": "string",
                        "enum": [
                          "registration",
                          "fixtures"
                        ]
                      }
                    },
                    "required": [
                      "tournament_id",
                      "label",
                      "season_label",
                      "status",
                      "source"
                    ]
                  }
                }
              },
              "required": [
                "team_id",
                "display_name",
                "short_name",
                "logo_url",
                "competitions"
              ]
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "AdminTeamCommunicationIssue": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 140
          },
          "body": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2000
          },
          "requires_ack": {
            "type": "boolean"
          },
          "ack_due_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "title",
          "body",
          "requires_ack",
          "ack_due_by"
        ]
      },
      "AdminTeamCommunicationRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "team_id": {
            "type": "string",
            "format": "uuid"
          },
          "title": {
            "type": "string",
            "minLength": 1
          },
          "body": {
            "type": "string",
            "minLength": 1
          },
          "requires_ack": {
            "type": "boolean"
          },
          "issued_by_pseudo": {
            "type": "string",
            "minLength": 1
          },
          "issued_at": {
            "type": "string",
            "format": "date-time"
          },
          "ack_due_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "ack_due_source": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "author",
                  "league_config",
                  "platform_default"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "ack_policy_profile_id": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "ack_overdue_count": {
            "oneOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "team_id",
          "title",
          "body",
          "requires_ack",
          "issued_by_pseudo",
          "issued_at",
          "ack_due_by",
          "ack_due_source",
          "ack_policy_profile_id",
          "ack_overdue_count"
        ]
      },
      "AdminTeamCommunicationList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "team_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "title": {
                  "type": "string",
                  "minLength": 1
                },
                "body": {
                  "type": "string",
                  "minLength": 1
                },
                "requires_ack": {
                  "type": "boolean"
                },
                "issued_by_pseudo": {
                  "type": "string",
                  "minLength": 1
                },
                "issued_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "ack_due_by": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "ack_due_source": {
                  "oneOf": [
                    {
                      "type": "string",
                      "enum": [
                        "author",
                        "league_config",
                        "platform_default"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "ack_policy_profile_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "minLength": 1
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "ack_overdue_count": {
                  "oneOf": [
                    {
                      "type": "integer",
                      "minimum": 0
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "team_id",
                "title",
                "body",
                "requires_ack",
                "issued_by_pseudo",
                "issued_at",
                "ack_due_by",
                "ack_due_source",
                "ack_policy_profile_id",
                "ack_overdue_count"
              ]
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "TeamCommunicationAckRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "communication_id": {
            "type": "string",
            "format": "uuid"
          },
          "actor_pseudo": {
            "type": "string",
            "minLength": 1
          },
          "acked_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "communication_id",
          "actor_pseudo",
          "acked_at"
        ]
      },
      "TeamCommunicationAckList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "communication_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "actor_pseudo": {
                  "type": "string",
                  "minLength": 1
                },
                "acked_at": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "id",
                "communication_id",
                "actor_pseudo",
                "acked_at"
              ]
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "TeamAreaCommunicationRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "title": {
            "type": "string",
            "minLength": 1
          },
          "body": {
            "type": "string",
            "minLength": 1
          },
          "issued_at": {
            "type": "string",
            "format": "date-time"
          },
          "requires_ack": {
            "type": "boolean"
          },
          "ack_due_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "ack_due_source": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "author",
                  "league_config",
                  "platform_default"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "ack_policy_profile_id": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "acked_by_me": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "title",
          "body",
          "issued_at",
          "requires_ack",
          "ack_due_by",
          "ack_due_source",
          "ack_policy_profile_id",
          "acked_by_me"
        ]
      },
      "TeamAreaCommunicationList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "title": {
                  "type": "string",
                  "minLength": 1
                },
                "body": {
                  "type": "string",
                  "minLength": 1
                },
                "issued_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "requires_ack": {
                  "type": "boolean"
                },
                "ack_due_by": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "ack_due_source": {
                  "oneOf": [
                    {
                      "type": "string",
                      "enum": [
                        "author",
                        "league_config",
                        "platform_default"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "ack_policy_profile_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "minLength": 1
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "acked_by_me": {
                  "type": "boolean"
                }
              },
              "required": [
                "id",
                "title",
                "body",
                "issued_at",
                "requires_ack",
                "ack_due_by",
                "ack_due_source",
                "ack_policy_profile_id",
                "acked_by_me"
              ]
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "TeamAreaLineupReceipt": {
        "type": "object",
        "properties": {
          "receipt_id": {
            "type": "string",
            "format": "uuid"
          },
          "contract_version": {
            "type": "number",
            "enum": [
              1
            ]
          },
          "lineup_id": {
            "type": "string",
            "format": "uuid"
          },
          "lineup_version": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "idempotency_key": {
            "type": "string",
            "minLength": 8,
            "maxLength": 200
          },
          "payload_hash": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "accepted_at": {
            "type": "string",
            "format": "date-time"
          },
          "deadline_at": {
            "type": "string",
            "format": "date-time"
          },
          "deposited_by": {
            "type": "string",
            "enum": [
              "team",
              "league_secretariat"
            ]
          },
          "official_deposit_reason": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "receipt_id",
          "contract_version",
          "lineup_id",
          "lineup_version",
          "idempotency_key",
          "payload_hash",
          "accepted_at",
          "deadline_at"
        ]
      },
      "TeamAreaSetAvailabilityRequest": {
        "type": "object",
        "properties": {
          "match_id": {
            "type": "string",
            "format": "uuid"
          },
          "team_id": {
            "type": "string",
            "format": "uuid"
          },
          "player_id": {
            "type": "string",
            "format": "uuid"
          },
          "state": {
            "type": "string",
            "enum": [
              "available",
              "unavailable",
              "tentative"
            ]
          },
          "note": {
            "oneOf": [
              {
                "type": "string",
                "maxLength": 280
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "match_id",
          "team_id",
          "player_id",
          "state",
          "note"
        ]
      },
      "TeamAreaSetCallUpRequest": {
        "type": "object",
        "properties": {
          "match_id": {
            "type": "string",
            "format": "uuid"
          },
          "team_id": {
            "type": "string",
            "format": "uuid"
          },
          "player_id": {
            "type": "string",
            "format": "uuid"
          },
          "called_up": {
            "type": "boolean"
          },
          "note": {
            "oneOf": [
              {
                "type": "string",
                "maxLength": 280
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "match_id",
          "team_id",
          "player_id",
          "called_up",
          "note"
        ]
      },
      "TeamAreaSubmitLineupRequest": {
        "type": "object",
        "properties": {
          "contract_version": {
            "type": "number",
            "enum": [
              1
            ]
          },
          "idempotency_key": {
            "type": "string",
            "minLength": 8,
            "maxLength": 200
          },
          "match_id": {
            "type": "string",
            "format": "uuid"
          },
          "side": {
            "type": "string",
            "enum": [
              "home",
              "away"
            ]
          },
          "entries": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "player_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "shirt_number": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 99
                },
                "starting": {
                  "type": "boolean"
                },
                "captain": {
                  "type": "boolean"
                },
                "role": {
                  "type": "string",
                  "enum": [
                    "GK",
                    "DEF",
                    "MID",
                    "FWD"
                  ]
                }
              },
              "required": [
                "player_id",
                "shirt_number",
                "starting",
                "captain",
                "role"
              ]
            },
            "minItems": 1
          },
          "staff": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "person_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "role": {
                  "type": "string",
                  "enum": [
                    "responsible_manager",
                    "head_coach",
                    "assistant_coach",
                    "team_doctor"
                  ]
                }
              },
              "required": [
                "person_id",
                "role"
              ]
            }
          },
          "official_deposit": {
            "type": "object",
            "properties": {
              "reason": {
                "type": "string",
                "minLength": 10,
                "maxLength": 500
              }
            },
            "required": [
              "reason"
            ]
          }
        },
        "required": [
          "match_id",
          "side",
          "entries"
        ]
      },
      "TeamAreaLineupPlayer": {
        "type": "object",
        "properties": {
          "player_id": {
            "type": "string",
            "format": "uuid"
          },
          "shirt_number": {
            "type": "integer",
            "minimum": 1,
            "maximum": 99
          },
          "starting": {
            "type": "boolean"
          },
          "captain": {
            "type": "boolean"
          },
          "role": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "GK",
                  "DEF",
                  "MID",
                  "FWD"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "display_name": {
            "type": "string",
            "minLength": 1
          },
          "lineup_entry_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          }
        },
        "required": [
          "player_id",
          "shirt_number",
          "starting",
          "captain",
          "display_name",
          "lineup_entry_id"
        ]
      },
      "TeamAreaLineupResponse": {
        "type": "object",
        "properties": {
          "match_id": {
            "type": "string",
            "format": "uuid"
          },
          "side": {
            "type": "string",
            "enum": [
              "home",
              "away"
            ]
          },
          "submitted_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "locked_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "entries": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "player_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "shirt_number": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 99
                },
                "starting": {
                  "type": "boolean"
                },
                "captain": {
                  "type": "boolean"
                },
                "role": {
                  "oneOf": [
                    {
                      "type": "string",
                      "enum": [
                        "GK",
                        "DEF",
                        "MID",
                        "FWD"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "display_name": {
                  "type": "string",
                  "minLength": 1
                },
                "lineup_entry_id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                }
              },
              "required": [
                "player_id",
                "shirt_number",
                "starting",
                "captain",
                "display_name",
                "lineup_entry_id"
              ]
            }
          },
          "receipt": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "receipt_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "contract_version": {
                    "type": "number",
                    "enum": [
                      1
                    ]
                  },
                  "lineup_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "lineup_version": {
                    "type": "integer",
                    "exclusiveMinimum": 0
                  },
                  "idempotency_key": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 200
                  },
                  "payload_hash": {
                    "type": "string",
                    "pattern": "^[0-9a-f]{64}$"
                  },
                  "accepted_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "deadline_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "deposited_by": {
                    "type": "string",
                    "enum": [
                      "team",
                      "league_secretariat"
                    ]
                  },
                  "official_deposit_reason": {
                    "oneOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "receipt_id",
                  "contract_version",
                  "lineup_id",
                  "lineup_version",
                  "idempotency_key",
                  "payload_hash",
                  "accepted_at",
                  "deadline_at"
                ]
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "match_id",
          "side",
          "submitted_at",
          "locked_at",
          "entries"
        ]
      },
      "TeamAreaCorrectionRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "type": "string",
            "enum": [
              "player_sport_data",
              "match_event",
              "match_score",
              "roster_entry"
            ]
          },
          "summary": {
            "type": "string",
            "minLength": 1
          },
          "status": {
            "type": "string",
            "enum": [
              "submitted",
              "triaged",
              "accepted",
              "applied",
              "rejected"
            ]
          },
          "requested_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "kind",
          "summary",
          "status",
          "requested_at"
        ]
      },
      "PlayerAreaSummaryResponse": {
        "type": "object",
        "properties": {
          "claimed_players": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "player_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "display_name": {
                  "type": "string",
                  "minLength": 1
                },
                "claim_status": {
                  "type": "string",
                  "enum": [
                    "pending",
                    "approved",
                    "rejected",
                    "revoked"
                  ]
                },
                "role": {
                  "type": "string",
                  "minLength": 1
                },
                "effective_role": {
                  "type": "string",
                  "minLength": 1
                },
                "team_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "privacy_note": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "slug": {
                  "oneOf": [
                    {
                      "type": "string",
                      "minLength": 1
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "public_photo_url": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uri"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "avatar_head_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "enum": [
                        "head-01",
                        "head-02",
                        "head-03",
                        "head-04",
                        "head-05",
                        "head-06",
                        "head-07",
                        "head-08",
                        "head-09",
                        "head-10",
                        "head-11",
                        "head-12",
                        "head-13",
                        "head-14",
                        "head-15",
                        "head-16",
                        "head-17",
                        "head-18",
                        "head-19",
                        "head-20",
                        "head-21",
                        "head-22",
                        "head-23",
                        "head-24",
                        "head-25",
                        "head-26",
                        "head-27",
                        "head-28",
                        "head-29",
                        "head-30",
                        "head-31",
                        "head-32",
                        "head-33",
                        "head-34",
                        "head-35",
                        "head-36",
                        "head-37",
                        "head-38",
                        "head-39",
                        "head-40",
                        "head-41",
                        "head-42",
                        "head-43",
                        "head-44",
                        "head-45",
                        "head-46",
                        "head-47",
                        "head-48",
                        "head-49",
                        "head-50",
                        "head-51",
                        "head-52",
                        "head-53",
                        "head-54",
                        "head-55",
                        "head-56",
                        "head-57",
                        "head-58",
                        "head-59",
                        "head-60",
                        "head-61",
                        "head-62",
                        "head-63",
                        "head-64",
                        "head-65",
                        "head-66",
                        "head-67",
                        "head-68",
                        "head-69",
                        "head-70",
                        "head-71",
                        "head-72",
                        "head-73",
                        "head-74",
                        "head-75",
                        "head-76",
                        "head-77",
                        "head-78",
                        "head-79",
                        "head-80",
                        "head-81",
                        "head-82",
                        "head-83",
                        "head-84",
                        "head-85",
                        "head-86",
                        "head-87",
                        "head-88",
                        "head-89",
                        "head-90",
                        "head-91",
                        "head-92",
                        "head-93",
                        "head-94",
                        "head-95",
                        "head-96",
                        "head-97",
                        "head-98",
                        "head-99",
                        "head-100",
                        "head-101",
                        "head-102",
                        "head-103",
                        "head-104",
                        "head-105",
                        "head-106",
                        "head-107",
                        "head-108",
                        "head-109",
                        "head-110",
                        "head-111",
                        "head-112",
                        "head-113",
                        "head-114",
                        "head-115",
                        "head-116",
                        "head-117",
                        "head-118",
                        "head-119",
                        "head-120",
                        "head-121",
                        "head-122",
                        "head-123",
                        "head-124",
                        "head-125",
                        "head-126",
                        "head-127",
                        "head-128",
                        "head-129",
                        "head-130",
                        "head-131",
                        "head-132",
                        "head-133",
                        "head-134",
                        "head-135",
                        "head-136",
                        "head-137",
                        "head-138",
                        "head-139",
                        "head-140",
                        "head-141",
                        "head-142",
                        "head-143",
                        "head-144",
                        "head-145",
                        "head-146",
                        "head-147",
                        "head-148",
                        "head-149",
                        "head-150",
                        "head-151",
                        "head-152",
                        "head-153",
                        "head-154",
                        "head-155",
                        "head-156",
                        "head-157",
                        "head-158",
                        "head-159",
                        "head-160",
                        "head-161",
                        "head-162",
                        "head-163",
                        "head-164",
                        "head-165",
                        "head-166",
                        "head-167",
                        "head-168",
                        "head-169",
                        "head-170",
                        "head-171",
                        "head-172",
                        "head-173",
                        "head-174",
                        "head-175",
                        "head-176",
                        "head-177",
                        "head-178",
                        "head-179",
                        "head-180",
                        "head-181",
                        "head-182",
                        "head-183"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "shirt_number": {
                  "oneOf": [
                    {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 99
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "pending_suspension_matches": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "required": [
                "player_id",
                "display_name",
                "claim_status",
                "role",
                "effective_role",
                "team_id",
                "privacy_note"
              ]
            }
          },
          "availability": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "match_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "team_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "player_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "scheduled_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "opponent_display_name": {
                  "type": "string",
                  "minLength": 1
                },
                "state": {
                  "oneOf": [
                    {
                      "type": "string",
                      "enum": [
                        "available",
                        "unavailable",
                        "tentative"
                      ]
                    },
                    {
                      "type": "string",
                      "enum": [
                        "not_declared"
                      ]
                    }
                  ]
                },
                "can_declare_availability": {
                  "type": "boolean"
                },
                "availability_closed_reason": {
                  "oneOf": [
                    {
                      "type": "string",
                      "enum": [
                        "match_not_open",
                        "deadline_expired",
                        "permission_denied"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "declaration_source": {
                  "oneOf": [
                    {
                      "type": "string",
                      "enum": [
                        "self",
                        "captain",
                        "coach",
                        "staff"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "declared_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "match_id",
                "team_id",
                "player_id",
                "scheduled_at",
                "opponent_display_name",
                "state",
                "declaration_source",
                "declared_at"
              ]
            }
          },
          "callups": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "match_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "team_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "player_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "scheduled_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "opponent_display_name": {
                  "type": "string",
                  "minLength": 1
                },
                "called_up": {
                  "type": "boolean"
                }
              },
              "required": [
                "match_id",
                "team_id",
                "player_id",
                "scheduled_at",
                "opponent_display_name",
                "called_up"
              ]
            }
          },
          "inbox": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "title": {
                  "type": "string",
                  "minLength": 1
                },
                "body": {
                  "type": "string",
                  "minLength": 1
                },
                "issued_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "requires_ack": {
                  "type": "boolean"
                },
                "ack_due_by": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "ack_due_source": {
                  "oneOf": [
                    {
                      "type": "string",
                      "enum": [
                        "author",
                        "league_config",
                        "platform_default"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "ack_policy_profile_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "minLength": 1
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "acked_by_me": {
                  "type": "boolean"
                }
              },
              "required": [
                "id",
                "title",
                "body",
                "issued_at",
                "requires_ack",
                "ack_due_by",
                "ack_due_source",
                "ack_policy_profile_id",
                "acked_by_me"
              ]
            }
          },
          "corrections": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "player_sport_data",
                    "match_event",
                    "match_score",
                    "roster_entry"
                  ]
                },
                "summary": {
                  "type": "string",
                  "minLength": 1
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "submitted",
                    "triaged",
                    "accepted",
                    "applied",
                    "rejected"
                  ]
                },
                "requested_at": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "id",
                "kind",
                "summary",
                "status",
                "requested_at"
              ]
            }
          }
        },
        "required": [
          "claimed_players",
          "availability",
          "callups",
          "inbox",
          "corrections"
        ]
      },
      "TransferRequestOverrideRow": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string",
            "minLength": 1
          },
          "at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "reason",
          "at"
        ]
      },
      "TransferRequestRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "season_id": {
            "type": "string",
            "format": "uuid"
          },
          "tournament_id": {
            "type": "string",
            "format": "uuid"
          },
          "player_id": {
            "type": "string",
            "format": "uuid"
          },
          "player_display_name": {
            "type": "string",
            "minLength": 1
          },
          "from_team_id": {
            "type": "string",
            "format": "uuid"
          },
          "from_team_name": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "to_team_id": {
            "type": "string",
            "format": "uuid"
          },
          "to_team_name": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "request_kind": {
            "type": "string",
            "enum": [
              "transfer",
              "release"
            ]
          },
          "initiated_by": {
            "type": "string",
            "enum": [
              "player",
              "captain_to",
              "captain_release",
              "admin"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "released",
              "ready_to_apply",
              "applied",
              "rejected",
              "cancelled",
              "expired"
            ]
          },
          "player_consent_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "from_release_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "to_accept_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "missing_consents": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "player_consent",
                "from_release",
                "to_accept"
              ]
            }
          },
          "consent_override": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string",
                    "minLength": 1
                  },
                  "at": {
                    "type": "string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "reason",
                  "at"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "release_override": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string",
                    "minLength": 1
                  },
                  "at": {
                    "type": "string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "reason",
                  "at"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "window_override": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string",
                    "minLength": 1
                  },
                  "at": {
                    "type": "string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "reason",
                  "at"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "requested_shirt_number": {
            "oneOf": [
              {
                "type": "integer",
                "minimum": 1,
                "maximum": 99
              },
              {
                "type": "null"
              }
            ]
          },
          "note": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "decision_reason": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "applied_transfer_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "applied_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "reply_due_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "revocation": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string",
                    "minLength": 1
                  },
                  "at": {
                    "type": "string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "reason",
                  "at"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "season_id",
          "tournament_id",
          "player_id",
          "player_display_name",
          "from_team_id",
          "from_team_name",
          "to_team_id",
          "to_team_name",
          "request_kind",
          "initiated_by",
          "status",
          "player_consent_at",
          "from_release_at",
          "to_accept_at",
          "missing_consents",
          "consent_override",
          "release_override",
          "window_override",
          "requested_shirt_number",
          "note",
          "decision_reason",
          "applied_transfer_id",
          "applied_at",
          "created_at",
          "updated_at"
        ]
      },
      "TransferWindowState": {
        "type": "object",
        "properties": {
          "tournament_id": {
            "type": "string",
            "format": "uuid"
          },
          "tournament_label": {
            "type": "string",
            "minLength": 1
          },
          "kind": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "ordinary",
                  "end_of_sporting_year"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "activated_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "opens_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "closes_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "source": {
            "type": "string",
            "enum": [
              "admin_controlled",
              "tournament",
              "season",
              "registration_deadline",
              "always_open"
            ]
          },
          "is_open": {
            "type": "boolean"
          },
          "team_ids": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "tournament_id",
          "opens_at",
          "closes_at",
          "source",
          "is_open"
        ]
      },
      "AdminTournamentReleaseWindowList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "tenant_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "tournament_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "ordinary",
                    "end_of_sporting_year"
                  ]
                },
                "active": {
                  "type": "boolean"
                },
                "activated_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "deactivated_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "team_ids": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "format": "uuid"
                      }
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "created_by": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "updated_by": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "tenant_id",
                "tournament_id",
                "kind",
                "active",
                "activated_at",
                "deactivated_at",
                "created_at",
                "updated_at",
                "created_by",
                "updated_by"
              ]
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "TournamentReleaseWindow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "tournament_id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "type": "string",
            "enum": [
              "ordinary",
              "end_of_sporting_year"
            ]
          },
          "active": {
            "type": "boolean"
          },
          "activated_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "deactivated_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "team_ids": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "updated_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "tenant_id",
          "tournament_id",
          "kind",
          "active",
          "activated_at",
          "deactivated_at",
          "created_at",
          "updated_at",
          "created_by",
          "updated_by"
        ]
      },
      "AdminTournamentReleaseWindowSet": {
        "type": "object",
        "properties": {
          "tournament_id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "type": "string",
            "enum": [
              "ordinary",
              "end_of_sporting_year"
            ]
          },
          "active": {
            "type": "boolean"
          },
          "team_ids": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                },
                "minItems": 1,
                "maxItems": 64
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "tournament_id",
          "kind",
          "active"
        ]
      },
      "TransferRequestListResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "season_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "tournament_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "player_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "player_display_name": {
                  "type": "string",
                  "minLength": 1
                },
                "from_team_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "from_team_name": {
                  "oneOf": [
                    {
                      "type": "string",
                      "minLength": 1
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "to_team_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "to_team_name": {
                  "oneOf": [
                    {
                      "type": "string",
                      "minLength": 1
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "request_kind": {
                  "type": "string",
                  "enum": [
                    "transfer",
                    "release"
                  ]
                },
                "initiated_by": {
                  "type": "string",
                  "enum": [
                    "player",
                    "captain_to",
                    "captain_release",
                    "admin"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "pending",
                    "released",
                    "ready_to_apply",
                    "applied",
                    "rejected",
                    "cancelled",
                    "expired"
                  ]
                },
                "player_consent_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "from_release_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "to_accept_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "missing_consents": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "player_consent",
                      "from_release",
                      "to_accept"
                    ]
                  }
                },
                "consent_override": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "reason": {
                          "type": "string",
                          "minLength": 1
                        },
                        "at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "reason",
                        "at"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "release_override": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "reason": {
                          "type": "string",
                          "minLength": 1
                        },
                        "at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "reason",
                        "at"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "window_override": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "reason": {
                          "type": "string",
                          "minLength": 1
                        },
                        "at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "reason",
                        "at"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "requested_shirt_number": {
                  "oneOf": [
                    {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 99
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "note": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "decision_reason": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "applied_transfer_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "applied_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "reply_due_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "revocation": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "reason": {
                          "type": "string",
                          "minLength": 1
                        },
                        "at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "reason",
                        "at"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "id",
                "season_id",
                "tournament_id",
                "player_id",
                "player_display_name",
                "from_team_id",
                "from_team_name",
                "to_team_id",
                "to_team_name",
                "request_kind",
                "initiated_by",
                "status",
                "player_consent_at",
                "from_release_at",
                "to_accept_at",
                "missing_consents",
                "consent_override",
                "release_override",
                "window_override",
                "requested_shirt_number",
                "note",
                "decision_reason",
                "applied_transfer_id",
                "applied_at",
                "created_at",
                "updated_at"
              ]
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "offset": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "items"
        ]
      },
      "TeamTransferRequestListResponse": {
        "type": "object",
        "properties": {
          "team_id": {
            "type": "string",
            "format": "uuid"
          },
          "outgoing": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "season_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "tournament_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "player_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "player_display_name": {
                  "type": "string",
                  "minLength": 1
                },
                "from_team_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "from_team_name": {
                  "oneOf": [
                    {
                      "type": "string",
                      "minLength": 1
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "to_team_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "to_team_name": {
                  "oneOf": [
                    {
                      "type": "string",
                      "minLength": 1
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "request_kind": {
                  "type": "string",
                  "enum": [
                    "transfer",
                    "release"
                  ]
                },
                "initiated_by": {
                  "type": "string",
                  "enum": [
                    "player",
                    "captain_to",
                    "captain_release",
                    "admin"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "pending",
                    "released",
                    "ready_to_apply",
                    "applied",
                    "rejected",
                    "cancelled",
                    "expired"
                  ]
                },
                "player_consent_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "from_release_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "to_accept_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "missing_consents": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "player_consent",
                      "from_release",
                      "to_accept"
                    ]
                  }
                },
                "consent_override": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "reason": {
                          "type": "string",
                          "minLength": 1
                        },
                        "at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "reason",
                        "at"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "release_override": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "reason": {
                          "type": "string",
                          "minLength": 1
                        },
                        "at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "reason",
                        "at"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "window_override": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "reason": {
                          "type": "string",
                          "minLength": 1
                        },
                        "at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "reason",
                        "at"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "requested_shirt_number": {
                  "oneOf": [
                    {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 99
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "note": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "decision_reason": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "applied_transfer_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "applied_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "reply_due_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "revocation": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "reason": {
                          "type": "string",
                          "minLength": 1
                        },
                        "at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "reason",
                        "at"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "id",
                "season_id",
                "tournament_id",
                "player_id",
                "player_display_name",
                "from_team_id",
                "from_team_name",
                "to_team_id",
                "to_team_name",
                "request_kind",
                "initiated_by",
                "status",
                "player_consent_at",
                "from_release_at",
                "to_accept_at",
                "missing_consents",
                "consent_override",
                "release_override",
                "window_override",
                "requested_shirt_number",
                "note",
                "decision_reason",
                "applied_transfer_id",
                "applied_at",
                "created_at",
                "updated_at"
              ]
            }
          },
          "incoming": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "season_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "tournament_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "player_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "player_display_name": {
                  "type": "string",
                  "minLength": 1
                },
                "from_team_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "from_team_name": {
                  "oneOf": [
                    {
                      "type": "string",
                      "minLength": 1
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "to_team_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "to_team_name": {
                  "oneOf": [
                    {
                      "type": "string",
                      "minLength": 1
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "request_kind": {
                  "type": "string",
                  "enum": [
                    "transfer",
                    "release"
                  ]
                },
                "initiated_by": {
                  "type": "string",
                  "enum": [
                    "player",
                    "captain_to",
                    "captain_release",
                    "admin"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "pending",
                    "released",
                    "ready_to_apply",
                    "applied",
                    "rejected",
                    "cancelled",
                    "expired"
                  ]
                },
                "player_consent_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "from_release_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "to_accept_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "missing_consents": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "player_consent",
                      "from_release",
                      "to_accept"
                    ]
                  }
                },
                "consent_override": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "reason": {
                          "type": "string",
                          "minLength": 1
                        },
                        "at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "reason",
                        "at"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "release_override": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "reason": {
                          "type": "string",
                          "minLength": 1
                        },
                        "at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "reason",
                        "at"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "window_override": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "reason": {
                          "type": "string",
                          "minLength": 1
                        },
                        "at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "reason",
                        "at"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "requested_shirt_number": {
                  "oneOf": [
                    {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 99
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "note": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "decision_reason": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "applied_transfer_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "applied_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "reply_due_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "revocation": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "reason": {
                          "type": "string",
                          "minLength": 1
                        },
                        "at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "reason",
                        "at"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "id",
                "season_id",
                "tournament_id",
                "player_id",
                "player_display_name",
                "from_team_id",
                "from_team_name",
                "to_team_id",
                "to_team_name",
                "request_kind",
                "initiated_by",
                "status",
                "player_consent_at",
                "from_release_at",
                "to_accept_at",
                "missing_consents",
                "consent_override",
                "release_override",
                "window_override",
                "requested_shirt_number",
                "note",
                "decision_reason",
                "applied_transfer_id",
                "applied_at",
                "created_at",
                "updated_at"
              ]
            }
          },
          "windows": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "tournament_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "tournament_label": {
                  "type": "string",
                  "minLength": 1
                },
                "kind": {
                  "oneOf": [
                    {
                      "type": "string",
                      "enum": [
                        "ordinary",
                        "end_of_sporting_year"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "activated_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "opens_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "closes_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "source": {
                  "type": "string",
                  "enum": [
                    "admin_controlled",
                    "tournament",
                    "season",
                    "registration_deadline",
                    "always_open"
                  ]
                },
                "is_open": {
                  "type": "boolean"
                },
                "team_ids": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "format": "uuid"
                      }
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "tournament_id",
                "opens_at",
                "closes_at",
                "source",
                "is_open"
              ]
            }
          }
        },
        "required": [
          "team_id",
          "outgoing",
          "incoming",
          "windows"
        ]
      },
      "TournamentFreeAgentRow": {
        "type": "object",
        "properties": {
          "player_id": {
            "type": "string",
            "format": "uuid"
          },
          "display_name": {
            "type": "string",
            "minLength": 1
          },
          "role": {
            "type": "string",
            "minLength": 1
          },
          "default_shirt_number": {
            "oneOf": [
              {
                "type": "integer",
                "minimum": 1,
                "maximum": 99
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "player_id",
          "display_name",
          "role",
          "default_shirt_number"
        ]
      },
      "TournamentFreeAgentListResponse": {
        "type": "object",
        "properties": {
          "team_id": {
            "type": "string",
            "format": "uuid"
          },
          "tournament_id": {
            "type": "string",
            "format": "uuid"
          },
          "evaluated_on": {
            "type": "string",
            "format": "date"
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "player_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "display_name": {
                  "type": "string",
                  "minLength": 1
                },
                "role": {
                  "type": "string",
                  "minLength": 1
                },
                "default_shirt_number": {
                  "oneOf": [
                    {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 99
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "player_id",
                "display_name",
                "role",
                "default_shirt_number"
              ]
            }
          },
          "registered_players": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "player_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "display_name": {
                  "type": "string",
                  "minLength": 1
                },
                "role": {
                  "type": "string",
                  "minLength": 1
                },
                "default_shirt_number": {
                  "oneOf": [
                    {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 99
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "player_id",
                "display_name",
                "role",
                "default_shirt_number"
              ]
            }
          }
        },
        "required": [
          "team_id",
          "tournament_id",
          "evaluated_on",
          "items",
          "registered_players"
        ]
      },
      "TournamentFreeAgentSignRequest": {
        "type": "object",
        "properties": {
          "team_id": {
            "type": "string",
            "format": "uuid"
          },
          "tournament_id": {
            "type": "string",
            "format": "uuid"
          },
          "player_id": {
            "type": "string",
            "format": "uuid"
          },
          "shirt_number": {
            "type": "integer",
            "minimum": 1,
            "maximum": 99
          },
          "role_override": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "GK",
                  "DEF",
                  "MID",
                  "FWD"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "idempotency_key": {
            "type": "string",
            "minLength": 8,
            "maxLength": 200
          }
        },
        "required": [
          "team_id",
          "tournament_id",
          "player_id",
          "shirt_number",
          "idempotency_key"
        ]
      },
      "PlayerTransferRequestCreate": {
        "type": "object",
        "properties": {
          "to_team_id": {
            "type": "string",
            "format": "uuid"
          },
          "tournament_id": {
            "type": "string",
            "format": "uuid"
          },
          "note": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          },
          "player_id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "to_team_id",
          "tournament_id"
        ]
      },
      "SelfTransferOptionsQuery": {
        "type": "object",
        "properties": {
          "player_id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "player_id"
        ]
      },
      "SelfTransferBlocker": {
        "type": "string",
        "enum": [
          "active_request_exists",
          "no_active_registration",
          "no_eligible_tournament",
          "no_eligible_destination",
          "all_windows_closed"
        ]
      },
      "SelfTransferDestinationOption": {
        "type": "object",
        "properties": {
          "team_id": {
            "type": "string",
            "format": "uuid"
          },
          "team_name": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "team_id",
          "team_name"
        ]
      },
      "SelfTransferTournamentOption": {
        "type": "object",
        "properties": {
          "tournament_id": {
            "type": "string",
            "format": "uuid"
          },
          "tournament_label": {
            "type": "string",
            "minLength": 1
          },
          "season_id": {
            "type": "string",
            "format": "uuid"
          },
          "window": {
            "type": "object",
            "properties": {
              "tournament_id": {
                "type": "string",
                "format": "uuid"
              },
              "tournament_label": {
                "type": "string",
                "minLength": 1
              },
              "kind": {
                "oneOf": [
                  {
                    "type": "string",
                    "enum": [
                      "ordinary",
                      "end_of_sporting_year"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "activated_at": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "opens_at": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "closes_at": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "source": {
                "type": "string",
                "enum": [
                  "admin_controlled",
                  "tournament",
                  "season",
                  "registration_deadline",
                  "always_open"
                ]
              },
              "is_open": {
                "type": "boolean"
              },
              "team_ids": {
                "oneOf": [
                  {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "evaluated_at": {
                "type": "string",
                "format": "date-time"
              },
              "time_zone": {
                "type": "string",
                "enum": [
                  "UTC"
                ]
              },
              "state": {
                "type": "string",
                "enum": [
                  "open",
                  "not_yet_open",
                  "closed"
                ]
              }
            },
            "required": [
              "tournament_id",
              "opens_at",
              "closes_at",
              "source",
              "is_open",
              "evaluated_at",
              "time_zone",
              "state"
            ]
          },
          "destinations": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "team_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "team_name": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "required": [
                "team_id",
                "team_name"
              ]
            }
          }
        },
        "required": [
          "tournament_id",
          "tournament_label",
          "season_id",
          "window",
          "destinations"
        ]
      },
      "SelfTransferConsentPolicy": {
        "type": "object",
        "properties": {
          "version": {
            "type": "string",
            "enum": [
              "self-transfer-consent.v1"
            ]
          },
          "player_consent": {
            "type": "object",
            "properties": {
              "required": {
                "type": "boolean",
                "enum": [
                  true
                ]
              },
              "granted_on_submit": {
                "type": "boolean",
                "enum": [
                  true
                ]
              }
            },
            "required": [
              "required",
              "granted_on_submit"
            ]
          },
          "from_release": {
            "type": "object",
            "properties": {
              "required": {
                "type": "boolean",
                "enum": [
                  true
                ]
              },
              "granted_on_submit": {
                "type": "boolean",
                "enum": [
                  false
                ]
              }
            },
            "required": [
              "required",
              "granted_on_submit"
            ]
          },
          "to_accept": {
            "type": "object",
            "properties": {
              "required": {
                "type": "boolean",
                "enum": [
                  true
                ]
              },
              "granted_on_submit": {
                "type": "boolean",
                "enum": [
                  false
                ]
              }
            },
            "required": [
              "required",
              "granted_on_submit"
            ]
          },
          "operator_override": {
            "type": "object",
            "properties": {
              "available_to_self": {
                "type": "boolean",
                "enum": [
                  false
                ]
              },
              "requires_reason": {
                "type": "boolean",
                "enum": [
                  true
                ]
              },
              "audited": {
                "type": "boolean",
                "enum": [
                  true
                ]
              }
            },
            "required": [
              "available_to_self",
              "requires_reason",
              "audited"
            ]
          }
        },
        "required": [
          "version",
          "player_consent",
          "from_release",
          "to_accept",
          "operator_override"
        ]
      },
      "SelfTransferOptionsResponse": {
        "type": "object",
        "properties": {
          "profile": {
            "type": "object",
            "properties": {
              "player_id": {
                "type": "string",
                "format": "uuid"
              },
              "display_name": {
                "type": "string",
                "minLength": 1
              },
              "current_team_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "current_team_name": {
                "oneOf": [
                  {
                    "type": "string",
                    "minLength": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "role": {
                "type": "string",
                "minLength": 1
              },
              "effective_role": {
                "type": "string",
                "minLength": 1
              },
              "shirt_number": {
                "oneOf": [
                  {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 99
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "player_id",
              "display_name",
              "current_team_id",
              "current_team_name",
              "role",
              "effective_role",
              "shirt_number"
            ]
          },
          "server_time": {
            "type": "object",
            "properties": {
              "now": {
                "type": "string",
                "format": "date-time"
              },
              "time_zone": {
                "type": "string",
                "enum": [
                  "UTC"
                ]
              }
            },
            "required": [
              "now",
              "time_zone"
            ]
          },
          "options_version": {
            "type": "string",
            "enum": [
              "self-transfer-options.v1"
            ]
          },
          "options_etag": {
            "type": "string",
            "minLength": 1
          },
          "can_submit": {
            "type": "boolean"
          },
          "blockers": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "active_request_exists",
                "no_active_registration",
                "no_eligible_tournament",
                "no_eligible_destination",
                "all_windows_closed"
              ]
            }
          },
          "tournaments": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "tournament_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "tournament_label": {
                  "type": "string",
                  "minLength": 1
                },
                "season_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "window": {
                  "type": "object",
                  "properties": {
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "tournament_label": {
                      "type": "string",
                      "minLength": 1
                    },
                    "kind": {
                      "oneOf": [
                        {
                          "type": "string",
                          "enum": [
                            "ordinary",
                            "end_of_sporting_year"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "activated_at": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "opens_at": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "closes_at": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "source": {
                      "type": "string",
                      "enum": [
                        "admin_controlled",
                        "tournament",
                        "season",
                        "registration_deadline",
                        "always_open"
                      ]
                    },
                    "is_open": {
                      "type": "boolean"
                    },
                    "team_ids": {
                      "oneOf": [
                        {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "format": "uuid"
                          }
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "evaluated_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "time_zone": {
                      "type": "string",
                      "enum": [
                        "UTC"
                      ]
                    },
                    "state": {
                      "type": "string",
                      "enum": [
                        "open",
                        "not_yet_open",
                        "closed"
                      ]
                    }
                  },
                  "required": [
                    "tournament_id",
                    "opens_at",
                    "closes_at",
                    "source",
                    "is_open",
                    "evaluated_at",
                    "time_zone",
                    "state"
                  ]
                },
                "destinations": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "team_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "team_name": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "team_id",
                      "team_name"
                    ]
                  }
                }
              },
              "required": [
                "tournament_id",
                "tournament_label",
                "season_id",
                "window",
                "destinations"
              ]
            }
          },
          "consent_policy": {
            "type": "object",
            "properties": {
              "version": {
                "type": "string",
                "enum": [
                  "self-transfer-consent.v1"
                ]
              },
              "player_consent": {
                "type": "object",
                "properties": {
                  "required": {
                    "type": "boolean",
                    "enum": [
                      true
                    ]
                  },
                  "granted_on_submit": {
                    "type": "boolean",
                    "enum": [
                      true
                    ]
                  }
                },
                "required": [
                  "required",
                  "granted_on_submit"
                ]
              },
              "from_release": {
                "type": "object",
                "properties": {
                  "required": {
                    "type": "boolean",
                    "enum": [
                      true
                    ]
                  },
                  "granted_on_submit": {
                    "type": "boolean",
                    "enum": [
                      false
                    ]
                  }
                },
                "required": [
                  "required",
                  "granted_on_submit"
                ]
              },
              "to_accept": {
                "type": "object",
                "properties": {
                  "required": {
                    "type": "boolean",
                    "enum": [
                      true
                    ]
                  },
                  "granted_on_submit": {
                    "type": "boolean",
                    "enum": [
                      false
                    ]
                  }
                },
                "required": [
                  "required",
                  "granted_on_submit"
                ]
              },
              "operator_override": {
                "type": "object",
                "properties": {
                  "available_to_self": {
                    "type": "boolean",
                    "enum": [
                      false
                    ]
                  },
                  "requires_reason": {
                    "type": "boolean",
                    "enum": [
                      true
                    ]
                  },
                  "audited": {
                    "type": "boolean",
                    "enum": [
                      true
                    ]
                  }
                },
                "required": [
                  "available_to_self",
                  "requires_reason",
                  "audited"
                ]
              }
            },
            "required": [
              "version",
              "player_consent",
              "from_release",
              "to_accept",
              "operator_override"
            ]
          },
          "request_fields": {
            "type": "object",
            "properties": {
              "note": {
                "type": "object",
                "properties": {
                  "allowed": {
                    "type": "boolean",
                    "enum": [
                      true
                    ]
                  },
                  "required": {
                    "type": "boolean",
                    "enum": [
                      false
                    ]
                  },
                  "max_length": {
                    "type": "number",
                    "enum": [
                      500
                    ]
                  }
                },
                "required": [
                  "allowed",
                  "required",
                  "max_length"
                ]
              },
              "shirt_number": {
                "type": "object",
                "properties": {
                  "allowed": {
                    "type": "boolean",
                    "enum": [
                      false
                    ]
                  }
                },
                "required": [
                  "allowed"
                ]
              },
              "window_override": {
                "type": "object",
                "properties": {
                  "allowed": {
                    "type": "boolean",
                    "enum": [
                      false
                    ]
                  }
                },
                "required": [
                  "allowed"
                ]
              }
            },
            "required": [
              "note",
              "shirt_number",
              "window_override"
            ]
          },
          "active_request": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "season_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "tournament_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "player_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "player_display_name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "from_team_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "from_team_name": {
                    "oneOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "to_team_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "to_team_name": {
                    "oneOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "request_kind": {
                    "type": "string",
                    "enum": [
                      "transfer",
                      "release"
                    ]
                  },
                  "initiated_by": {
                    "type": "string",
                    "enum": [
                      "player",
                      "captain_to",
                      "captain_release",
                      "admin"
                    ]
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "pending",
                      "released",
                      "ready_to_apply",
                      "applied",
                      "rejected",
                      "cancelled",
                      "expired"
                    ]
                  },
                  "player_consent_at": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "date-time"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "from_release_at": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "date-time"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "to_accept_at": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "date-time"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "missing_consents": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "player_consent",
                        "from_release",
                        "to_accept"
                      ]
                    }
                  },
                  "consent_override": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "reason": {
                            "type": "string",
                            "minLength": 1
                          },
                          "at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "reason",
                          "at"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "release_override": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "reason": {
                            "type": "string",
                            "minLength": 1
                          },
                          "at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "reason",
                          "at"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "window_override": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "reason": {
                            "type": "string",
                            "minLength": 1
                          },
                          "at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "reason",
                          "at"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "requested_shirt_number": {
                    "oneOf": [
                      {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 99
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "note": {
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "decision_reason": {
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "applied_transfer_id": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "applied_at": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "date-time"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "reply_due_at": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "date-time"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "revocation": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "reason": {
                            "type": "string",
                            "minLength": 1
                          },
                          "at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "reason",
                          "at"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "created_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "updated_at": {
                    "type": "string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "id",
                  "season_id",
                  "tournament_id",
                  "player_id",
                  "player_display_name",
                  "from_team_id",
                  "from_team_name",
                  "to_team_id",
                  "to_team_name",
                  "request_kind",
                  "initiated_by",
                  "status",
                  "player_consent_at",
                  "from_release_at",
                  "to_accept_at",
                  "missing_consents",
                  "consent_override",
                  "release_override",
                  "window_override",
                  "requested_shirt_number",
                  "note",
                  "decision_reason",
                  "applied_transfer_id",
                  "applied_at",
                  "created_at",
                  "updated_at"
                ]
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "profile",
          "server_time",
          "options_version",
          "options_etag",
          "can_submit",
          "blockers",
          "tournaments",
          "consent_policy",
          "request_fields",
          "active_request"
        ]
      },
      "SelfTransferSubmissionRequest": {
        "type": "object",
        "properties": {
          "player_id": {
            "type": "string",
            "format": "uuid"
          },
          "tournament_id": {
            "type": "string",
            "format": "uuid"
          },
          "to_team_id": {
            "type": "string",
            "format": "uuid"
          },
          "note": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          },
          "options_etag": {
            "type": "string",
            "minLength": 1,
            "maxLength": 300
          },
          "idempotency_key": {
            "type": "string",
            "minLength": 8,
            "maxLength": 200
          }
        },
        "required": [
          "player_id",
          "tournament_id",
          "to_team_id",
          "options_etag",
          "idempotency_key"
        ]
      },
      "SelfTransferReceipt": {
        "type": "object",
        "properties": {
          "truth_receipt": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "schema_version": {
                    "type": "number",
                    "enum": [
                      1
                    ]
                  },
                  "receipt_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "entity": {
                    "type": "object",
                    "properties": {
                      "entity_type": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "entity_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "entity_version": {
                        "oneOf": [
                          {
                            "type": "integer",
                            "minimum": 0
                          },
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          }
                        ]
                      }
                    },
                    "required": [
                      "entity_type",
                      "entity_id",
                      "entity_version"
                    ]
                  },
                  "scope": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "tenant"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "null"
                          },
                          "match_id": {
                            "type": "null"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "league"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "match_id": {
                            "type": "null"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "match"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "match_id": {
                            "type": "string",
                            "format": "uuid"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      }
                    ]
                  },
                  "actor_user_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "consumers": {
                    "type": "array",
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "pending"
                              ]
                            },
                            "propagated_at": {
                              "type": "null"
                            },
                            "reason": {
                              "type": "null"
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "applied"
                              ]
                            },
                            "propagated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "reason": {
                              "type": "null"
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "failed"
                              ]
                            },
                            "propagated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "reason": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "message": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1000
                                },
                                "retryable": {
                                  "type": "boolean"
                                },
                                "recovery_action": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 500
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "code",
                                "message",
                                "retryable",
                                "recovery_action"
                              ]
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "not_applicable"
                              ]
                            },
                            "propagated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "reason": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "message": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1000
                                },
                                "retryable": {
                                  "type": "boolean"
                                },
                                "recovery_action": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 500
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "code",
                                "message",
                                "retryable",
                                "recovery_action"
                              ]
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        }
                      ]
                    }
                  },
                  "server_timestamp": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "correlation_id": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 200
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "queued"
                    ]
                  },
                  "reason": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 120
                          },
                          "message": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 1000
                          },
                          "retryable": {
                            "type": "boolean"
                          },
                          "recovery_action": {
                            "oneOf": [
                              {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 500
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "code",
                          "message",
                          "retryable",
                          "recovery_action"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "schema_version",
                  "receipt_id",
                  "entity",
                  "scope",
                  "actor_user_id",
                  "consumers",
                  "server_timestamp",
                  "correlation_id",
                  "status",
                  "reason"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "schema_version": {
                    "type": "number",
                    "enum": [
                      1
                    ]
                  },
                  "receipt_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "entity": {
                    "type": "object",
                    "properties": {
                      "entity_type": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "entity_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "entity_version": {
                        "oneOf": [
                          {
                            "type": "integer",
                            "minimum": 0
                          },
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          }
                        ]
                      }
                    },
                    "required": [
                      "entity_type",
                      "entity_id",
                      "entity_version"
                    ]
                  },
                  "scope": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "tenant"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "null"
                          },
                          "match_id": {
                            "type": "null"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "league"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "match_id": {
                            "type": "null"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "match"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "match_id": {
                            "type": "string",
                            "format": "uuid"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      }
                    ]
                  },
                  "actor_user_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "consumers": {
                    "type": "array",
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "pending"
                              ]
                            },
                            "propagated_at": {
                              "type": "null"
                            },
                            "reason": {
                              "type": "null"
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "applied"
                              ]
                            },
                            "propagated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "reason": {
                              "type": "null"
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "failed"
                              ]
                            },
                            "propagated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "reason": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "message": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1000
                                },
                                "retryable": {
                                  "type": "boolean"
                                },
                                "recovery_action": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 500
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "code",
                                "message",
                                "retryable",
                                "recovery_action"
                              ]
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "not_applicable"
                              ]
                            },
                            "propagated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "reason": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "message": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1000
                                },
                                "retryable": {
                                  "type": "boolean"
                                },
                                "recovery_action": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 500
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "code",
                                "message",
                                "retryable",
                                "recovery_action"
                              ]
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        }
                      ]
                    }
                  },
                  "server_timestamp": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "correlation_id": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 200
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "accepted"
                    ]
                  },
                  "reason": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 120
                          },
                          "message": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 1000
                          },
                          "retryable": {
                            "type": "boolean"
                          },
                          "recovery_action": {
                            "oneOf": [
                              {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 500
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "code",
                          "message",
                          "retryable",
                          "recovery_action"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "schema_version",
                  "receipt_id",
                  "entity",
                  "scope",
                  "actor_user_id",
                  "consumers",
                  "server_timestamp",
                  "correlation_id",
                  "status",
                  "reason"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "schema_version": {
                    "type": "number",
                    "enum": [
                      1
                    ]
                  },
                  "receipt_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "entity": {
                    "type": "object",
                    "properties": {
                      "entity_type": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "entity_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "entity_version": {
                        "oneOf": [
                          {
                            "type": "integer",
                            "minimum": 0
                          },
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          }
                        ]
                      }
                    },
                    "required": [
                      "entity_type",
                      "entity_id",
                      "entity_version"
                    ]
                  },
                  "scope": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "tenant"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "null"
                          },
                          "match_id": {
                            "type": "null"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "league"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "match_id": {
                            "type": "null"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "match"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "match_id": {
                            "type": "string",
                            "format": "uuid"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      }
                    ]
                  },
                  "actor_user_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "consumers": {
                    "type": "array",
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "pending"
                              ]
                            },
                            "propagated_at": {
                              "type": "null"
                            },
                            "reason": {
                              "type": "null"
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "applied"
                              ]
                            },
                            "propagated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "reason": {
                              "type": "null"
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "failed"
                              ]
                            },
                            "propagated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "reason": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "message": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1000
                                },
                                "retryable": {
                                  "type": "boolean"
                                },
                                "recovery_action": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 500
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "code",
                                "message",
                                "retryable",
                                "recovery_action"
                              ]
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "not_applicable"
                              ]
                            },
                            "propagated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "reason": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "message": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1000
                                },
                                "retryable": {
                                  "type": "boolean"
                                },
                                "recovery_action": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 500
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "code",
                                "message",
                                "retryable",
                                "recovery_action"
                              ]
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        }
                      ]
                    }
                  },
                  "server_timestamp": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "correlation_id": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 200
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "rejected"
                    ]
                  },
                  "reason": {
                    "type": "object",
                    "properties": {
                      "code": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "message": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 1000
                      },
                      "retryable": {
                        "type": "boolean"
                      },
                      "recovery_action": {
                        "oneOf": [
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 500
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "code",
                      "message",
                      "retryable",
                      "recovery_action"
                    ]
                  }
                },
                "required": [
                  "schema_version",
                  "receipt_id",
                  "entity",
                  "scope",
                  "actor_user_id",
                  "consumers",
                  "server_timestamp",
                  "correlation_id",
                  "status",
                  "reason"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "schema_version": {
                    "type": "number",
                    "enum": [
                      1
                    ]
                  },
                  "receipt_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "entity": {
                    "type": "object",
                    "properties": {
                      "entity_type": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "entity_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "entity_version": {
                        "oneOf": [
                          {
                            "type": "integer",
                            "minimum": 0
                          },
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          }
                        ]
                      }
                    },
                    "required": [
                      "entity_type",
                      "entity_id",
                      "entity_version"
                    ]
                  },
                  "scope": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "tenant"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "null"
                          },
                          "match_id": {
                            "type": "null"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "league"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "match_id": {
                            "type": "null"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "schema_version": {
                            "type": "number",
                            "enum": [
                              1
                            ]
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "match"
                            ]
                          },
                          "tenant_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "match_id": {
                            "type": "string",
                            "format": "uuid"
                          }
                        },
                        "required": [
                          "schema_version",
                          "kind",
                          "tenant_id",
                          "league_id",
                          "match_id"
                        ]
                      }
                    ]
                  },
                  "actor_user_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "consumers": {
                    "type": "array",
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "pending"
                              ]
                            },
                            "propagated_at": {
                              "type": "null"
                            },
                            "reason": {
                              "type": "null"
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "applied"
                              ]
                            },
                            "propagated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "reason": {
                              "type": "null"
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "failed"
                              ]
                            },
                            "propagated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "reason": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "message": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1000
                                },
                                "retryable": {
                                  "type": "boolean"
                                },
                                "recovery_action": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 500
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "code",
                                "message",
                                "retryable",
                                "recovery_action"
                              ]
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "consumer": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 120
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "not_applicable"
                              ]
                            },
                            "propagated_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "reason": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                },
                                "message": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1000
                                },
                                "retryable": {
                                  "type": "boolean"
                                },
                                "recovery_action": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 500
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "code",
                                "message",
                                "retryable",
                                "recovery_action"
                              ]
                            }
                          },
                          "required": [
                            "consumer",
                            "state",
                            "propagated_at",
                            "reason"
                          ]
                        }
                      ]
                    }
                  },
                  "server_timestamp": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "correlation_id": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 200
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "superseded"
                    ]
                  },
                  "reason": {
                    "type": "object",
                    "properties": {
                      "code": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "message": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 1000
                      },
                      "retryable": {
                        "type": "boolean"
                      },
                      "recovery_action": {
                        "oneOf": [
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 500
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "code",
                      "message",
                      "retryable",
                      "recovery_action"
                    ]
                  }
                },
                "required": [
                  "schema_version",
                  "receipt_id",
                  "entity",
                  "scope",
                  "actor_user_id",
                  "consumers",
                  "server_timestamp",
                  "correlation_id",
                  "status",
                  "reason"
                ]
              }
            ]
          },
          "receipt_id": {
            "type": "string",
            "format": "uuid"
          },
          "receipt_version": {
            "type": "number",
            "enum": [
              1
            ]
          },
          "idempotency_key": {
            "type": "string",
            "minLength": 8,
            "maxLength": 200
          },
          "accepted_at": {
            "type": "string",
            "format": "date-time"
          },
          "server_time": {
            "type": "object",
            "properties": {
              "now": {
                "type": "string",
                "format": "date-time"
              },
              "time_zone": {
                "type": "string",
                "enum": [
                  "UTC"
                ]
              }
            },
            "required": [
              "now",
              "time_zone"
            ]
          },
          "options_version": {
            "type": "string",
            "enum": [
              "self-transfer-options.v1"
            ]
          },
          "options_etag": {
            "type": "string",
            "minLength": 1
          },
          "player_id": {
            "type": "string",
            "format": "uuid"
          },
          "application": {
            "type": "object",
            "properties": {
              "request_id": {
                "type": "string",
                "format": "uuid"
              },
              "status": {
                "type": "string",
                "enum": [
                  "pending",
                  "released",
                  "ready_to_apply",
                  "applied",
                  "rejected",
                  "cancelled",
                  "expired"
                ]
              },
              "missing_consents": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "player_consent",
                    "from_release",
                    "to_accept"
                  ]
                }
              },
              "applied_transfer_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "applied_at": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "request_id",
              "status",
              "missing_consents",
              "applied_transfer_id",
              "applied_at"
            ]
          },
          "request": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "season_id": {
                "type": "string",
                "format": "uuid"
              },
              "tournament_id": {
                "type": "string",
                "format": "uuid"
              },
              "player_id": {
                "type": "string",
                "format": "uuid"
              },
              "player_display_name": {
                "type": "string",
                "minLength": 1
              },
              "from_team_id": {
                "type": "string",
                "format": "uuid"
              },
              "from_team_name": {
                "oneOf": [
                  {
                    "type": "string",
                    "minLength": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "to_team_id": {
                "type": "string",
                "format": "uuid"
              },
              "to_team_name": {
                "oneOf": [
                  {
                    "type": "string",
                    "minLength": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "request_kind": {
                "type": "string",
                "enum": [
                  "transfer",
                  "release"
                ]
              },
              "initiated_by": {
                "type": "string",
                "enum": [
                  "player",
                  "captain_to",
                  "captain_release",
                  "admin"
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "pending",
                  "released",
                  "ready_to_apply",
                  "applied",
                  "rejected",
                  "cancelled",
                  "expired"
                ]
              },
              "player_consent_at": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "from_release_at": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "to_accept_at": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "missing_consents": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "player_consent",
                    "from_release",
                    "to_accept"
                  ]
                }
              },
              "consent_override": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "reason": {
                        "type": "string",
                        "minLength": 1
                      },
                      "at": {
                        "type": "string",
                        "format": "date-time"
                      }
                    },
                    "required": [
                      "reason",
                      "at"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "release_override": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "reason": {
                        "type": "string",
                        "minLength": 1
                      },
                      "at": {
                        "type": "string",
                        "format": "date-time"
                      }
                    },
                    "required": [
                      "reason",
                      "at"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "window_override": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "reason": {
                        "type": "string",
                        "minLength": 1
                      },
                      "at": {
                        "type": "string",
                        "format": "date-time"
                      }
                    },
                    "required": [
                      "reason",
                      "at"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "requested_shirt_number": {
                "oneOf": [
                  {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 99
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "note": {
                "oneOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "decision_reason": {
                "oneOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "applied_transfer_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "applied_at": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "reply_due_at": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "revocation": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "reason": {
                        "type": "string",
                        "minLength": 1
                      },
                      "at": {
                        "type": "string",
                        "format": "date-time"
                      }
                    },
                    "required": [
                      "reason",
                      "at"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              }
            },
            "required": [
              "id",
              "season_id",
              "tournament_id",
              "player_id",
              "player_display_name",
              "from_team_id",
              "from_team_name",
              "to_team_id",
              "to_team_name",
              "request_kind",
              "initiated_by",
              "status",
              "player_consent_at",
              "from_release_at",
              "to_accept_at",
              "missing_consents",
              "consent_override",
              "release_override",
              "window_override",
              "requested_shirt_number",
              "note",
              "decision_reason",
              "applied_transfer_id",
              "applied_at",
              "created_at",
              "updated_at"
            ]
          }
        },
        "required": [
          "receipt_id",
          "receipt_version",
          "idempotency_key",
          "accepted_at",
          "server_time",
          "options_version",
          "options_etag",
          "player_id",
          "application",
          "request"
        ]
      },
      "CaptainTransferRequestCreate": {
        "type": "object",
        "properties": {
          "team_id": {
            "type": "string",
            "format": "uuid"
          },
          "player_id": {
            "type": "string",
            "format": "uuid"
          },
          "tournament_id": {
            "type": "string",
            "format": "uuid"
          },
          "shirt_number": {
            "type": "integer",
            "minimum": 1,
            "maximum": 99
          },
          "note": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          }
        },
        "required": [
          "team_id",
          "player_id",
          "tournament_id"
        ]
      },
      "PlayerReleaseRequestCreate": {
        "type": "object",
        "properties": {
          "player_id": {
            "type": "string",
            "format": "uuid"
          },
          "tournament_id": {
            "type": "string",
            "format": "uuid"
          },
          "note": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          }
        },
        "required": [
          "tournament_id"
        ]
      },
      "CaptainReleaseRequestCreate": {
        "type": "object",
        "properties": {
          "team_id": {
            "type": "string",
            "format": "uuid"
          },
          "player_id": {
            "type": "string",
            "format": "uuid"
          },
          "tournament_id": {
            "type": "string",
            "format": "uuid"
          },
          "note": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          }
        },
        "required": [
          "team_id",
          "player_id",
          "tournament_id"
        ]
      },
      "AdminDirectReleaseRequest": {
        "type": "object",
        "properties": {
          "player_id": {
            "type": "string",
            "format": "uuid"
          },
          "tournament_id": {
            "type": "string",
            "format": "uuid"
          },
          "reason": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          }
        },
        "required": [
          "player_id",
          "tournament_id",
          "reason"
        ]
      },
      "AdminReleaseRevocationRequest": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string",
            "minLength": 3,
            "maxLength": 500
          }
        },
        "required": [
          "reason"
        ]
      },
      "TransferRequestRejectRequest": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          }
        },
        "required": [
          "reason"
        ]
      },
      "AdminTransferRequestCreate": {
        "type": "object",
        "properties": {
          "player_id": {
            "type": "string",
            "format": "uuid"
          },
          "to_team_id": {
            "type": "string",
            "format": "uuid"
          },
          "tournament_id": {
            "type": "string",
            "format": "uuid"
          },
          "shirt_number": {
            "type": "integer",
            "minimum": 1,
            "maximum": 99
          },
          "note": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          },
          "window_override_reason": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          }
        },
        "required": [
          "player_id",
          "to_team_id",
          "tournament_id"
        ]
      },
      "AdminTransferRequestDecision": {
        "type": "object",
        "properties": {
          "action": {
            "type": "string",
            "enum": [
              "override_release",
              "override_consent",
              "reject"
            ]
          },
          "reason": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          }
        },
        "required": [
          "action",
          "reason"
        ]
      },
      "AdminTransferRequestApply": {
        "type": "object",
        "properties": {
          "effective_at": {
            "type": "string",
            "format": "date-time"
          },
          "shirt_number": {
            "type": "integer",
            "minimum": 1,
            "maximum": 99
          },
          "window_override_reason": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          }
        },
        "required": [
          "effective_at",
          "shirt_number"
        ]
      },
      "AdminTransferRequestApplyResponse": {
        "type": "object",
        "properties": {
          "request": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "season_id": {
                "type": "string",
                "format": "uuid"
              },
              "tournament_id": {
                "type": "string",
                "format": "uuid"
              },
              "player_id": {
                "type": "string",
                "format": "uuid"
              },
              "player_display_name": {
                "type": "string",
                "minLength": 1
              },
              "from_team_id": {
                "type": "string",
                "format": "uuid"
              },
              "from_team_name": {
                "oneOf": [
                  {
                    "type": "string",
                    "minLength": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "to_team_id": {
                "type": "string",
                "format": "uuid"
              },
              "to_team_name": {
                "oneOf": [
                  {
                    "type": "string",
                    "minLength": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "request_kind": {
                "type": "string",
                "enum": [
                  "transfer",
                  "release"
                ]
              },
              "initiated_by": {
                "type": "string",
                "enum": [
                  "player",
                  "captain_to",
                  "captain_release",
                  "admin"
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "pending",
                  "released",
                  "ready_to_apply",
                  "applied",
                  "rejected",
                  "cancelled",
                  "expired"
                ]
              },
              "player_consent_at": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "from_release_at": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "to_accept_at": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "missing_consents": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "player_consent",
                    "from_release",
                    "to_accept"
                  ]
                }
              },
              "consent_override": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "reason": {
                        "type": "string",
                        "minLength": 1
                      },
                      "at": {
                        "type": "string",
                        "format": "date-time"
                      }
                    },
                    "required": [
                      "reason",
                      "at"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "release_override": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "reason": {
                        "type": "string",
                        "minLength": 1
                      },
                      "at": {
                        "type": "string",
                        "format": "date-time"
                      }
                    },
                    "required": [
                      "reason",
                      "at"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "window_override": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "reason": {
                        "type": "string",
                        "minLength": 1
                      },
                      "at": {
                        "type": "string",
                        "format": "date-time"
                      }
                    },
                    "required": [
                      "reason",
                      "at"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "requested_shirt_number": {
                "oneOf": [
                  {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 99
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "note": {
                "oneOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "decision_reason": {
                "oneOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "applied_transfer_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "applied_at": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "reply_due_at": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "revocation": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "reason": {
                        "type": "string",
                        "minLength": 1
                      },
                      "at": {
                        "type": "string",
                        "format": "date-time"
                      }
                    },
                    "required": [
                      "reason",
                      "at"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              }
            },
            "required": [
              "id",
              "season_id",
              "tournament_id",
              "player_id",
              "player_display_name",
              "from_team_id",
              "from_team_name",
              "to_team_id",
              "to_team_name",
              "request_kind",
              "initiated_by",
              "status",
              "player_consent_at",
              "from_release_at",
              "to_accept_at",
              "missing_consents",
              "consent_override",
              "release_override",
              "window_override",
              "requested_shirt_number",
              "note",
              "decision_reason",
              "applied_transfer_id",
              "applied_at",
              "created_at",
              "updated_at"
            ]
          },
          "transfer_id": {
            "type": "string",
            "format": "uuid"
          },
          "effective_at": {
            "type": "string",
            "format": "date-time"
          },
          "pending_suspension_matches": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "request",
          "transfer_id",
          "effective_at",
          "pending_suspension_matches"
        ]
      },
      "PlayerMatchLogEntry": {
        "type": "object",
        "properties": {
          "match_id": {
            "type": "string",
            "format": "uuid"
          },
          "scheduled_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "schedule_precision": {
            "type": "string",
            "enum": [
              "exact",
              "date_only",
              "unknown"
            ]
          },
          "scheduled_on": {
            "oneOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ]
          },
          "tournament_id": {
            "type": "string",
            "format": "uuid"
          },
          "tournament_label": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "team_id": {
            "type": "string",
            "format": "uuid"
          },
          "team_name": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "opponent_team_id": {
            "type": "string",
            "format": "uuid"
          },
          "opponent_name": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "home_away": {
            "type": "string",
            "enum": [
              "home",
              "away"
            ]
          },
          "goals_for": {
            "oneOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "goals_against": {
            "oneOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "outcome": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "W",
                  "D",
                  "L"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "present": {
            "type": "boolean"
          },
          "goals": {
            "type": "integer",
            "minimum": 0
          },
          "assists": {
            "type": "integer",
            "minimum": 0
          },
          "yellow_cards": {
            "type": "integer",
            "minimum": 0
          },
          "red_cards": {
            "type": "integer",
            "minimum": 0
          },
          "mvp": {
            "type": "boolean"
          },
          "rating": {
            "oneOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "match_id",
          "scheduled_at",
          "schedule_precision",
          "scheduled_on",
          "tournament_id",
          "tournament_label",
          "team_id",
          "team_name",
          "opponent_team_id",
          "opponent_name",
          "home_away",
          "goals_for",
          "goals_against",
          "outcome",
          "present",
          "goals",
          "assists",
          "yellow_cards",
          "red_cards",
          "mvp",
          "rating"
        ]
      },
      "PlayerMatchLogNextMatch": {
        "type": "object",
        "properties": {
          "match_id": {
            "type": "string",
            "format": "uuid"
          },
          "scheduled_at": {
            "type": "string",
            "format": "date-time"
          },
          "tournament_id": {
            "type": "string",
            "format": "uuid"
          },
          "tournament_label": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "team_id": {
            "type": "string",
            "format": "uuid"
          },
          "team_name": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "opponent_team_id": {
            "type": "string",
            "format": "uuid"
          },
          "opponent_name": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "home_away": {
            "type": "string",
            "enum": [
              "home",
              "away"
            ]
          }
        },
        "required": [
          "match_id",
          "scheduled_at",
          "tournament_id",
          "tournament_label",
          "team_id",
          "team_name",
          "opponent_team_id",
          "opponent_name",
          "home_away"
        ]
      },
      "PlayerMatchLog": {
        "type": "object",
        "properties": {
          "player_id": {
            "type": "string",
            "format": "uuid"
          },
          "generated_at": {
            "type": "string",
            "format": "date-time"
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "match_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "scheduled_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "schedule_precision": {
                  "type": "string",
                  "enum": [
                    "exact",
                    "date_only",
                    "unknown"
                  ]
                },
                "scheduled_on": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "tournament_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "tournament_label": {
                  "oneOf": [
                    {
                      "type": "string",
                      "minLength": 1
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "team_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "team_name": {
                  "oneOf": [
                    {
                      "type": "string",
                      "minLength": 1
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "opponent_team_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "opponent_name": {
                  "oneOf": [
                    {
                      "type": "string",
                      "minLength": 1
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "home_away": {
                  "type": "string",
                  "enum": [
                    "home",
                    "away"
                  ]
                },
                "goals_for": {
                  "oneOf": [
                    {
                      "type": "integer"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "goals_against": {
                  "oneOf": [
                    {
                      "type": "integer"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "outcome": {
                  "oneOf": [
                    {
                      "type": "string",
                      "enum": [
                        "W",
                        "D",
                        "L"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "present": {
                  "type": "boolean"
                },
                "goals": {
                  "type": "integer",
                  "minimum": 0
                },
                "assists": {
                  "type": "integer",
                  "minimum": 0
                },
                "yellow_cards": {
                  "type": "integer",
                  "minimum": 0
                },
                "red_cards": {
                  "type": "integer",
                  "minimum": 0
                },
                "mvp": {
                  "type": "boolean"
                },
                "rating": {
                  "oneOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "match_id",
                "scheduled_at",
                "schedule_precision",
                "scheduled_on",
                "tournament_id",
                "tournament_label",
                "team_id",
                "team_name",
                "opponent_team_id",
                "opponent_name",
                "home_away",
                "goals_for",
                "goals_against",
                "outcome",
                "present",
                "goals",
                "assists",
                "yellow_cards",
                "red_cards",
                "mvp",
                "rating"
              ]
            }
          },
          "next_match": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "match_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "scheduled_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "tournament_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "tournament_label": {
                    "oneOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "team_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "team_name": {
                    "oneOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "opponent_team_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "opponent_name": {
                    "oneOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "home_away": {
                    "type": "string",
                    "enum": [
                      "home",
                      "away"
                    ]
                  }
                },
                "required": [
                  "match_id",
                  "scheduled_at",
                  "tournament_id",
                  "tournament_label",
                  "team_id",
                  "team_name",
                  "opponent_team_id",
                  "opponent_name",
                  "home_away"
                ]
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "player_id",
          "generated_at",
          "items",
          "next_match"
        ]
      },
      "PlayerAreaMatchLogResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "player_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "generated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "items": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "match_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "scheduled_at": {
                        "oneOf": [
                          {
                            "type": "string",
                            "format": "date-time"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "schedule_precision": {
                        "type": "string",
                        "enum": [
                          "exact",
                          "date_only",
                          "unknown"
                        ]
                      },
                      "scheduled_on": {
                        "oneOf": [
                          {
                            "type": "string",
                            "format": "date"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "tournament_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "tournament_label": {
                        "oneOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "team_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "team_name": {
                        "oneOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "opponent_team_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "opponent_name": {
                        "oneOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "home_away": {
                        "type": "string",
                        "enum": [
                          "home",
                          "away"
                        ]
                      },
                      "goals_for": {
                        "oneOf": [
                          {
                            "type": "integer"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "goals_against": {
                        "oneOf": [
                          {
                            "type": "integer"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "outcome": {
                        "oneOf": [
                          {
                            "type": "string",
                            "enum": [
                              "W",
                              "D",
                              "L"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "present": {
                        "type": "boolean"
                      },
                      "goals": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "assists": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "yellow_cards": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "red_cards": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "mvp": {
                        "type": "boolean"
                      },
                      "rating": {
                        "oneOf": [
                          {
                            "type": "number"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "match_id",
                      "scheduled_at",
                      "schedule_precision",
                      "scheduled_on",
                      "tournament_id",
                      "tournament_label",
                      "team_id",
                      "team_name",
                      "opponent_team_id",
                      "opponent_name",
                      "home_away",
                      "goals_for",
                      "goals_against",
                      "outcome",
                      "present",
                      "goals",
                      "assists",
                      "yellow_cards",
                      "red_cards",
                      "mvp",
                      "rating"
                    ]
                  }
                },
                "next_match": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "match_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "scheduled_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "tournament_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "tournament_label": {
                          "oneOf": [
                            {
                              "type": "string",
                              "minLength": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "team_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "team_name": {
                          "oneOf": [
                            {
                              "type": "string",
                              "minLength": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "opponent_team_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "opponent_name": {
                          "oneOf": [
                            {
                              "type": "string",
                              "minLength": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "home_away": {
                          "type": "string",
                          "enum": [
                            "home",
                            "away"
                          ]
                        }
                      },
                      "required": [
                        "match_id",
                        "scheduled_at",
                        "tournament_id",
                        "tournament_label",
                        "team_id",
                        "team_name",
                        "opponent_team_id",
                        "opponent_name",
                        "home_away"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "player_id",
                "generated_at",
                "items",
                "next_match"
              ]
            }
          },
          "next_cursor": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "items",
          "next_cursor"
        ]
      },
      "PlayerAreaCareerEntry": {
        "type": "object",
        "properties": {
          "player_id": {
            "type": "string",
            "format": "uuid"
          },
          "slug": {
            "type": "string",
            "minLength": 2,
            "maxLength": 64,
            "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
          },
          "display_name": {
            "type": "string",
            "minLength": 1
          },
          "is_self_view": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "is_minor": {
            "type": "boolean"
          },
          "stats": {
            "type": "object",
            "properties": {
              "player": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "slug": {
                        "type": "string"
                      },
                      "sport_name": {
                        "type": "string"
                      },
                      "role": {
                        "type": "string",
                        "enum": [
                          "GK",
                          "DEF",
                          "MID",
                          "FWD"
                        ]
                      },
                      "shirt_number": {
                        "oneOf": [
                          {
                            "type": "integer"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "photo_url": {
                        "oneOf": [
                          {
                            "type": "string",
                            "format": "uri"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "avatar_head_id": {
                        "oneOf": [
                          {
                            "type": "string",
                            "enum": [
                              "head-01",
                              "head-02",
                              "head-03",
                              "head-04",
                              "head-05",
                              "head-06",
                              "head-07",
                              "head-08",
                              "head-09",
                              "head-10",
                              "head-11",
                              "head-12",
                              "head-13",
                              "head-14",
                              "head-15",
                              "head-16",
                              "head-17",
                              "head-18",
                              "head-19",
                              "head-20",
                              "head-21",
                              "head-22",
                              "head-23",
                              "head-24",
                              "head-25",
                              "head-26",
                              "head-27",
                              "head-28",
                              "head-29",
                              "head-30",
                              "head-31",
                              "head-32",
                              "head-33",
                              "head-34",
                              "head-35",
                              "head-36",
                              "head-37",
                              "head-38",
                              "head-39",
                              "head-40",
                              "head-41",
                              "head-42",
                              "head-43",
                              "head-44",
                              "head-45",
                              "head-46",
                              "head-47",
                              "head-48",
                              "head-49",
                              "head-50",
                              "head-51",
                              "head-52",
                              "head-53",
                              "head-54",
                              "head-55",
                              "head-56",
                              "head-57",
                              "head-58",
                              "head-59",
                              "head-60",
                              "head-61",
                              "head-62",
                              "head-63",
                              "head-64",
                              "head-65",
                              "head-66",
                              "head-67",
                              "head-68",
                              "head-69",
                              "head-70",
                              "head-71",
                              "head-72",
                              "head-73",
                              "head-74",
                              "head-75",
                              "head-76",
                              "head-77",
                              "head-78",
                              "head-79",
                              "head-80",
                              "head-81",
                              "head-82",
                              "head-83",
                              "head-84",
                              "head-85",
                              "head-86",
                              "head-87",
                              "head-88",
                              "head-89",
                              "head-90",
                              "head-91",
                              "head-92",
                              "head-93",
                              "head-94",
                              "head-95",
                              "head-96",
                              "head-97",
                              "head-98",
                              "head-99",
                              "head-100",
                              "head-101",
                              "head-102",
                              "head-103",
                              "head-104",
                              "head-105",
                              "head-106",
                              "head-107",
                              "head-108",
                              "head-109",
                              "head-110",
                              "head-111",
                              "head-112",
                              "head-113",
                              "head-114",
                              "head-115",
                              "head-116",
                              "head-117",
                              "head-118",
                              "head-119",
                              "head-120",
                              "head-121",
                              "head-122",
                              "head-123",
                              "head-124",
                              "head-125",
                              "head-126",
                              "head-127",
                              "head-128",
                              "head-129",
                              "head-130",
                              "head-131",
                              "head-132",
                              "head-133",
                              "head-134",
                              "head-135",
                              "head-136",
                              "head-137",
                              "head-138",
                              "head-139",
                              "head-140",
                              "head-141",
                              "head-142",
                              "head-143",
                              "head-144",
                              "head-145",
                              "head-146",
                              "head-147",
                              "head-148",
                              "head-149",
                              "head-150",
                              "head-151",
                              "head-152",
                              "head-153",
                              "head-154",
                              "head-155",
                              "head-156",
                              "head-157",
                              "head-158",
                              "head-159",
                              "head-160",
                              "head-161",
                              "head-162",
                              "head-163",
                              "head-164",
                              "head-165",
                              "head-166",
                              "head-167",
                              "head-168",
                              "head-169",
                              "head-170",
                              "head-171",
                              "head-172",
                              "head-173",
                              "head-174",
                              "head-175",
                              "head-176",
                              "head-177",
                              "head-178",
                              "head-179",
                              "head-180",
                              "head-181",
                              "head-182",
                              "head-183"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "id",
                      "slug",
                      "sport_name",
                      "role",
                      "shirt_number",
                      "photo_url",
                      "avatar_head_id"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "is_minor_excluded": {
                "type": "boolean"
              },
              "totals": {
                "type": "object",
                "properties": {
                  "goals": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "assists": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "yellow_cards": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "red_cards": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "appearances": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "mvp_awards": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "average_rating": {
                    "oneOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "rating_count": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "required": [
                  "goals",
                  "assists",
                  "yellow_cards",
                  "red_cards",
                  "appearances",
                  "mvp_awards",
                  "average_rating",
                  "rating_count"
                ]
              },
              "by_tournament": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "season_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "season_label": {
                      "type": "string",
                      "minLength": 1
                    },
                    "team_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "team_name": {
                      "type": "string",
                      "minLength": 1
                    },
                    "stat_line": {
                      "type": "object",
                      "properties": {
                        "player_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "sport_name": {
                          "type": "string"
                        },
                        "slug": {
                          "type": "string"
                        },
                        "team_id": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "uuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "goals": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "assists": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "yellow_cards": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "red_cards": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "appearances": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "mvp_awards": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "average_rating": {
                          "oneOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "rating_count": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "by_team": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "team_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "goals": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "assists": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "yellow_cards": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "red_cards": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "appearances": {
                                "type": "integer",
                                "minimum": 0
                              }
                            },
                            "required": [
                              "team_id",
                              "goals",
                              "assists",
                              "yellow_cards",
                              "red_cards",
                              "appearances"
                            ]
                          }
                        }
                      },
                      "required": [
                        "player_id",
                        "sport_name",
                        "slug",
                        "team_id",
                        "goals",
                        "assists",
                        "yellow_cards",
                        "red_cards",
                        "appearances",
                        "mvp_awards",
                        "average_rating",
                        "rating_count"
                      ]
                    },
                    "by_team": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "team_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "team_name": {
                            "oneOf": [
                              {
                                "type": "string",
                                "minLength": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "stat_line": {
                            "type": "object",
                            "properties": {
                              "goals": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "assists": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "yellow_cards": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "red_cards": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "appearances": {
                                "type": "integer",
                                "minimum": 0
                              }
                            },
                            "required": [
                              "goals",
                              "assists",
                              "yellow_cards",
                              "red_cards",
                              "appearances"
                            ]
                          }
                        },
                        "required": [
                          "team_id",
                          "team_name",
                          "stat_line"
                        ]
                      }
                    }
                  },
                  "required": [
                    "tournament_id",
                    "stat_line"
                  ]
                }
              },
              "freshness": {
                "type": "object",
                "properties": {
                  "generated_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "last_official_result_at": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "date-time"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "official_match_count": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "pending_official_count": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "required": [
                  "generated_at",
                  "last_official_result_at",
                  "official_match_count",
                  "pending_official_count"
                ]
              }
            },
            "required": [
              "player",
              "is_minor_excluded",
              "totals",
              "by_tournament",
              "freshness"
            ]
          },
          "career": {
            "type": "object",
            "properties": {
              "player": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "slug": {
                        "type": "string"
                      },
                      "sport_name": {
                        "type": "string"
                      },
                      "role": {
                        "type": "string",
                        "enum": [
                          "GK",
                          "DEF",
                          "MID",
                          "FWD"
                        ]
                      },
                      "shirt_number": {
                        "oneOf": [
                          {
                            "type": "integer"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "photo_url": {
                        "oneOf": [
                          {
                            "type": "string",
                            "format": "uri"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "avatar_head_id": {
                        "oneOf": [
                          {
                            "type": "string",
                            "enum": [
                              "head-01",
                              "head-02",
                              "head-03",
                              "head-04",
                              "head-05",
                              "head-06",
                              "head-07",
                              "head-08",
                              "head-09",
                              "head-10",
                              "head-11",
                              "head-12",
                              "head-13",
                              "head-14",
                              "head-15",
                              "head-16",
                              "head-17",
                              "head-18",
                              "head-19",
                              "head-20",
                              "head-21",
                              "head-22",
                              "head-23",
                              "head-24",
                              "head-25",
                              "head-26",
                              "head-27",
                              "head-28",
                              "head-29",
                              "head-30",
                              "head-31",
                              "head-32",
                              "head-33",
                              "head-34",
                              "head-35",
                              "head-36",
                              "head-37",
                              "head-38",
                              "head-39",
                              "head-40",
                              "head-41",
                              "head-42",
                              "head-43",
                              "head-44",
                              "head-45",
                              "head-46",
                              "head-47",
                              "head-48",
                              "head-49",
                              "head-50",
                              "head-51",
                              "head-52",
                              "head-53",
                              "head-54",
                              "head-55",
                              "head-56",
                              "head-57",
                              "head-58",
                              "head-59",
                              "head-60",
                              "head-61",
                              "head-62",
                              "head-63",
                              "head-64",
                              "head-65",
                              "head-66",
                              "head-67",
                              "head-68",
                              "head-69",
                              "head-70",
                              "head-71",
                              "head-72",
                              "head-73",
                              "head-74",
                              "head-75",
                              "head-76",
                              "head-77",
                              "head-78",
                              "head-79",
                              "head-80",
                              "head-81",
                              "head-82",
                              "head-83",
                              "head-84",
                              "head-85",
                              "head-86",
                              "head-87",
                              "head-88",
                              "head-89",
                              "head-90",
                              "head-91",
                              "head-92",
                              "head-93",
                              "head-94",
                              "head-95",
                              "head-96",
                              "head-97",
                              "head-98",
                              "head-99",
                              "head-100",
                              "head-101",
                              "head-102",
                              "head-103",
                              "head-104",
                              "head-105",
                              "head-106",
                              "head-107",
                              "head-108",
                              "head-109",
                              "head-110",
                              "head-111",
                              "head-112",
                              "head-113",
                              "head-114",
                              "head-115",
                              "head-116",
                              "head-117",
                              "head-118",
                              "head-119",
                              "head-120",
                              "head-121",
                              "head-122",
                              "head-123",
                              "head-124",
                              "head-125",
                              "head-126",
                              "head-127",
                              "head-128",
                              "head-129",
                              "head-130",
                              "head-131",
                              "head-132",
                              "head-133",
                              "head-134",
                              "head-135",
                              "head-136",
                              "head-137",
                              "head-138",
                              "head-139",
                              "head-140",
                              "head-141",
                              "head-142",
                              "head-143",
                              "head-144",
                              "head-145",
                              "head-146",
                              "head-147",
                              "head-148",
                              "head-149",
                              "head-150",
                              "head-151",
                              "head-152",
                              "head-153",
                              "head-154",
                              "head-155",
                              "head-156",
                              "head-157",
                              "head-158",
                              "head-159",
                              "head-160",
                              "head-161",
                              "head-162",
                              "head-163",
                              "head-164",
                              "head-165",
                              "head-166",
                              "head-167",
                              "head-168",
                              "head-169",
                              "head-170",
                              "head-171",
                              "head-172",
                              "head-173",
                              "head-174",
                              "head-175",
                              "head-176",
                              "head-177",
                              "head-178",
                              "head-179",
                              "head-180",
                              "head-181",
                              "head-182",
                              "head-183"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "id",
                      "slug",
                      "sport_name",
                      "role",
                      "shirt_number",
                      "photo_url",
                      "avatar_head_id"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "is_minor_excluded": {
                "type": "boolean"
              },
              "timeline": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "season_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "season_label": {
                      "type": "string",
                      "minLength": 1
                    },
                    "team_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "team_name": {
                      "type": "string",
                      "minLength": 1
                    },
                    "tournament_ids": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "format": "uuid"
                      }
                    },
                    "stat_line": {
                      "type": "object",
                      "properties": {
                        "goals": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "assists": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "yellow_cards": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "red_cards": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "appearances": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "mvp_awards": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "average_rating": {
                          "oneOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "rating_count": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "goals",
                        "assists",
                        "yellow_cards",
                        "red_cards",
                        "appearances",
                        "mvp_awards",
                        "average_rating",
                        "rating_count"
                      ]
                    }
                  },
                  "required": [
                    "season_id",
                    "season_label",
                    "team_id",
                    "team_name",
                    "tournament_ids",
                    "stat_line"
                  ]
                }
              },
              "discipline": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "current": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "tournament_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "team_id": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "accumulated_yellows": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "total_yellows": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "total_reds": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "diffida": {
                              "type": "boolean"
                            },
                            "served_suspensions": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "pending_suspension_matches": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "suspended_next_fixture": {
                              "type": "boolean"
                            },
                            "last_card_at": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "format": "date-time"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "tournament_id",
                            "team_id",
                            "accumulated_yellows",
                            "total_yellows",
                            "total_reds",
                            "diffida",
                            "served_suspensions",
                            "pending_suspension_matches",
                            "suspended_next_fixture",
                            "last_card_at"
                          ]
                        }
                      },
                      "total_yellows": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "total_reds": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "served_suspensions": {
                        "type": "integer",
                        "minimum": 0
                      }
                    },
                    "required": [
                      "current",
                      "total_yellows",
                      "total_reds",
                      "served_suspensions"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "player",
              "is_minor_excluded",
              "timeline",
              "discipline"
            ]
          },
          "pending_suspensions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "tournament_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "player_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "team_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "accumulated_yellows": {
                  "type": "integer",
                  "minimum": 0
                },
                "total_yellows": {
                  "type": "integer",
                  "minimum": 0
                },
                "total_reds": {
                  "type": "integer",
                  "minimum": 0
                },
                "diffida": {
                  "type": "boolean"
                },
                "served_suspensions": {
                  "type": "integer",
                  "minimum": 0
                },
                "pending_suspension_matches": {
                  "type": "integer",
                  "minimum": 0
                },
                "suspended_next_fixture": {
                  "type": "boolean"
                },
                "last_card_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "tournament_id",
                "player_id",
                "team_id",
                "accumulated_yellows",
                "total_yellows",
                "total_reds",
                "diffida",
                "served_suspensions",
                "pending_suspension_matches",
                "suspended_next_fixture",
                "last_card_at"
              ]
            }
          }
        },
        "required": [
          "player_id",
          "slug",
          "display_name",
          "is_self_view",
          "is_minor",
          "stats",
          "career",
          "pending_suspensions"
        ]
      },
      "PlayerAreaCareerResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "player_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "slug": {
                  "type": "string",
                  "minLength": 2,
                  "maxLength": 64,
                  "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
                },
                "display_name": {
                  "type": "string",
                  "minLength": 1
                },
                "is_self_view": {
                  "type": "boolean",
                  "enum": [
                    true
                  ]
                },
                "is_minor": {
                  "type": "boolean"
                },
                "stats": {
                  "type": "object",
                  "properties": {
                    "player": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "slug": {
                              "type": "string"
                            },
                            "sport_name": {
                              "type": "string"
                            },
                            "role": {
                              "type": "string",
                              "enum": [
                                "GK",
                                "DEF",
                                "MID",
                                "FWD"
                              ]
                            },
                            "shirt_number": {
                              "oneOf": [
                                {
                                  "type": "integer"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "photo_url": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "format": "uri"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "avatar_head_id": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "enum": [
                                    "head-01",
                                    "head-02",
                                    "head-03",
                                    "head-04",
                                    "head-05",
                                    "head-06",
                                    "head-07",
                                    "head-08",
                                    "head-09",
                                    "head-10",
                                    "head-11",
                                    "head-12",
                                    "head-13",
                                    "head-14",
                                    "head-15",
                                    "head-16",
                                    "head-17",
                                    "head-18",
                                    "head-19",
                                    "head-20",
                                    "head-21",
                                    "head-22",
                                    "head-23",
                                    "head-24",
                                    "head-25",
                                    "head-26",
                                    "head-27",
                                    "head-28",
                                    "head-29",
                                    "head-30",
                                    "head-31",
                                    "head-32",
                                    "head-33",
                                    "head-34",
                                    "head-35",
                                    "head-36",
                                    "head-37",
                                    "head-38",
                                    "head-39",
                                    "head-40",
                                    "head-41",
                                    "head-42",
                                    "head-43",
                                    "head-44",
                                    "head-45",
                                    "head-46",
                                    "head-47",
                                    "head-48",
                                    "head-49",
                                    "head-50",
                                    "head-51",
                                    "head-52",
                                    "head-53",
                                    "head-54",
                                    "head-55",
                                    "head-56",
                                    "head-57",
                                    "head-58",
                                    "head-59",
                                    "head-60",
                                    "head-61",
                                    "head-62",
                                    "head-63",
                                    "head-64",
                                    "head-65",
                                    "head-66",
                                    "head-67",
                                    "head-68",
                                    "head-69",
                                    "head-70",
                                    "head-71",
                                    "head-72",
                                    "head-73",
                                    "head-74",
                                    "head-75",
                                    "head-76",
                                    "head-77",
                                    "head-78",
                                    "head-79",
                                    "head-80",
                                    "head-81",
                                    "head-82",
                                    "head-83",
                                    "head-84",
                                    "head-85",
                                    "head-86",
                                    "head-87",
                                    "head-88",
                                    "head-89",
                                    "head-90",
                                    "head-91",
                                    "head-92",
                                    "head-93",
                                    "head-94",
                                    "head-95",
                                    "head-96",
                                    "head-97",
                                    "head-98",
                                    "head-99",
                                    "head-100",
                                    "head-101",
                                    "head-102",
                                    "head-103",
                                    "head-104",
                                    "head-105",
                                    "head-106",
                                    "head-107",
                                    "head-108",
                                    "head-109",
                                    "head-110",
                                    "head-111",
                                    "head-112",
                                    "head-113",
                                    "head-114",
                                    "head-115",
                                    "head-116",
                                    "head-117",
                                    "head-118",
                                    "head-119",
                                    "head-120",
                                    "head-121",
                                    "head-122",
                                    "head-123",
                                    "head-124",
                                    "head-125",
                                    "head-126",
                                    "head-127",
                                    "head-128",
                                    "head-129",
                                    "head-130",
                                    "head-131",
                                    "head-132",
                                    "head-133",
                                    "head-134",
                                    "head-135",
                                    "head-136",
                                    "head-137",
                                    "head-138",
                                    "head-139",
                                    "head-140",
                                    "head-141",
                                    "head-142",
                                    "head-143",
                                    "head-144",
                                    "head-145",
                                    "head-146",
                                    "head-147",
                                    "head-148",
                                    "head-149",
                                    "head-150",
                                    "head-151",
                                    "head-152",
                                    "head-153",
                                    "head-154",
                                    "head-155",
                                    "head-156",
                                    "head-157",
                                    "head-158",
                                    "head-159",
                                    "head-160",
                                    "head-161",
                                    "head-162",
                                    "head-163",
                                    "head-164",
                                    "head-165",
                                    "head-166",
                                    "head-167",
                                    "head-168",
                                    "head-169",
                                    "head-170",
                                    "head-171",
                                    "head-172",
                                    "head-173",
                                    "head-174",
                                    "head-175",
                                    "head-176",
                                    "head-177",
                                    "head-178",
                                    "head-179",
                                    "head-180",
                                    "head-181",
                                    "head-182",
                                    "head-183"
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "id",
                            "slug",
                            "sport_name",
                            "role",
                            "shirt_number",
                            "photo_url",
                            "avatar_head_id"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "is_minor_excluded": {
                      "type": "boolean"
                    },
                    "totals": {
                      "type": "object",
                      "properties": {
                        "goals": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "assists": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "yellow_cards": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "red_cards": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "appearances": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "mvp_awards": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "average_rating": {
                          "oneOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "rating_count": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "goals",
                        "assists",
                        "yellow_cards",
                        "red_cards",
                        "appearances",
                        "mvp_awards",
                        "average_rating",
                        "rating_count"
                      ]
                    },
                    "by_tournament": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "tournament_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "season_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "season_label": {
                            "type": "string",
                            "minLength": 1
                          },
                          "team_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "team_name": {
                            "type": "string",
                            "minLength": 1
                          },
                          "stat_line": {
                            "type": "object",
                            "properties": {
                              "player_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "sport_name": {
                                "type": "string"
                              },
                              "slug": {
                                "type": "string"
                              },
                              "team_id": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "goals": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "assists": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "yellow_cards": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "red_cards": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "appearances": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "mvp_awards": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "average_rating": {
                                "oneOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "rating_count": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "by_team": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "team_id": {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    "goals": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "assists": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "yellow_cards": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "red_cards": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "appearances": {
                                      "type": "integer",
                                      "minimum": 0
                                    }
                                  },
                                  "required": [
                                    "team_id",
                                    "goals",
                                    "assists",
                                    "yellow_cards",
                                    "red_cards",
                                    "appearances"
                                  ]
                                }
                              }
                            },
                            "required": [
                              "player_id",
                              "sport_name",
                              "slug",
                              "team_id",
                              "goals",
                              "assists",
                              "yellow_cards",
                              "red_cards",
                              "appearances",
                              "mvp_awards",
                              "average_rating",
                              "rating_count"
                            ]
                          },
                          "by_team": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "team_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "team_name": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "stat_line": {
                                  "type": "object",
                                  "properties": {
                                    "goals": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "assists": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "yellow_cards": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "red_cards": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "appearances": {
                                      "type": "integer",
                                      "minimum": 0
                                    }
                                  },
                                  "required": [
                                    "goals",
                                    "assists",
                                    "yellow_cards",
                                    "red_cards",
                                    "appearances"
                                  ]
                                }
                              },
                              "required": [
                                "team_id",
                                "team_name",
                                "stat_line"
                              ]
                            }
                          }
                        },
                        "required": [
                          "tournament_id",
                          "stat_line"
                        ]
                      }
                    },
                    "freshness": {
                      "type": "object",
                      "properties": {
                        "generated_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "last_official_result_at": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "date-time"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "official_match_count": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "pending_official_count": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "generated_at",
                        "last_official_result_at",
                        "official_match_count",
                        "pending_official_count"
                      ]
                    }
                  },
                  "required": [
                    "player",
                    "is_minor_excluded",
                    "totals",
                    "by_tournament",
                    "freshness"
                  ]
                },
                "career": {
                  "type": "object",
                  "properties": {
                    "player": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "slug": {
                              "type": "string"
                            },
                            "sport_name": {
                              "type": "string"
                            },
                            "role": {
                              "type": "string",
                              "enum": [
                                "GK",
                                "DEF",
                                "MID",
                                "FWD"
                              ]
                            },
                            "shirt_number": {
                              "oneOf": [
                                {
                                  "type": "integer"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "photo_url": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "format": "uri"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "avatar_head_id": {
                              "oneOf": [
                                {
                                  "type": "string",
                                  "enum": [
                                    "head-01",
                                    "head-02",
                                    "head-03",
                                    "head-04",
                                    "head-05",
                                    "head-06",
                                    "head-07",
                                    "head-08",
                                    "head-09",
                                    "head-10",
                                    "head-11",
                                    "head-12",
                                    "head-13",
                                    "head-14",
                                    "head-15",
                                    "head-16",
                                    "head-17",
                                    "head-18",
                                    "head-19",
                                    "head-20",
                                    "head-21",
                                    "head-22",
                                    "head-23",
                                    "head-24",
                                    "head-25",
                                    "head-26",
                                    "head-27",
                                    "head-28",
                                    "head-29",
                                    "head-30",
                                    "head-31",
                                    "head-32",
                                    "head-33",
                                    "head-34",
                                    "head-35",
                                    "head-36",
                                    "head-37",
                                    "head-38",
                                    "head-39",
                                    "head-40",
                                    "head-41",
                                    "head-42",
                                    "head-43",
                                    "head-44",
                                    "head-45",
                                    "head-46",
                                    "head-47",
                                    "head-48",
                                    "head-49",
                                    "head-50",
                                    "head-51",
                                    "head-52",
                                    "head-53",
                                    "head-54",
                                    "head-55",
                                    "head-56",
                                    "head-57",
                                    "head-58",
                                    "head-59",
                                    "head-60",
                                    "head-61",
                                    "head-62",
                                    "head-63",
                                    "head-64",
                                    "head-65",
                                    "head-66",
                                    "head-67",
                                    "head-68",
                                    "head-69",
                                    "head-70",
                                    "head-71",
                                    "head-72",
                                    "head-73",
                                    "head-74",
                                    "head-75",
                                    "head-76",
                                    "head-77",
                                    "head-78",
                                    "head-79",
                                    "head-80",
                                    "head-81",
                                    "head-82",
                                    "head-83",
                                    "head-84",
                                    "head-85",
                                    "head-86",
                                    "head-87",
                                    "head-88",
                                    "head-89",
                                    "head-90",
                                    "head-91",
                                    "head-92",
                                    "head-93",
                                    "head-94",
                                    "head-95",
                                    "head-96",
                                    "head-97",
                                    "head-98",
                                    "head-99",
                                    "head-100",
                                    "head-101",
                                    "head-102",
                                    "head-103",
                                    "head-104",
                                    "head-105",
                                    "head-106",
                                    "head-107",
                                    "head-108",
                                    "head-109",
                                    "head-110",
                                    "head-111",
                                    "head-112",
                                    "head-113",
                                    "head-114",
                                    "head-115",
                                    "head-116",
                                    "head-117",
                                    "head-118",
                                    "head-119",
                                    "head-120",
                                    "head-121",
                                    "head-122",
                                    "head-123",
                                    "head-124",
                                    "head-125",
                                    "head-126",
                                    "head-127",
                                    "head-128",
                                    "head-129",
                                    "head-130",
                                    "head-131",
                                    "head-132",
                                    "head-133",
                                    "head-134",
                                    "head-135",
                                    "head-136",
                                    "head-137",
                                    "head-138",
                                    "head-139",
                                    "head-140",
                                    "head-141",
                                    "head-142",
                                    "head-143",
                                    "head-144",
                                    "head-145",
                                    "head-146",
                                    "head-147",
                                    "head-148",
                                    "head-149",
                                    "head-150",
                                    "head-151",
                                    "head-152",
                                    "head-153",
                                    "head-154",
                                    "head-155",
                                    "head-156",
                                    "head-157",
                                    "head-158",
                                    "head-159",
                                    "head-160",
                                    "head-161",
                                    "head-162",
                                    "head-163",
                                    "head-164",
                                    "head-165",
                                    "head-166",
                                    "head-167",
                                    "head-168",
                                    "head-169",
                                    "head-170",
                                    "head-171",
                                    "head-172",
                                    "head-173",
                                    "head-174",
                                    "head-175",
                                    "head-176",
                                    "head-177",
                                    "head-178",
                                    "head-179",
                                    "head-180",
                                    "head-181",
                                    "head-182",
                                    "head-183"
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "id",
                            "slug",
                            "sport_name",
                            "role",
                            "shirt_number",
                            "photo_url",
                            "avatar_head_id"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "is_minor_excluded": {
                      "type": "boolean"
                    },
                    "timeline": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "season_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "season_label": {
                            "type": "string",
                            "minLength": 1
                          },
                          "team_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "team_name": {
                            "type": "string",
                            "minLength": 1
                          },
                          "tournament_ids": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "format": "uuid"
                            }
                          },
                          "stat_line": {
                            "type": "object",
                            "properties": {
                              "goals": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "assists": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "yellow_cards": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "red_cards": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "appearances": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "mvp_awards": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "average_rating": {
                                "oneOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "rating_count": {
                                "type": "integer",
                                "minimum": 0
                              }
                            },
                            "required": [
                              "goals",
                              "assists",
                              "yellow_cards",
                              "red_cards",
                              "appearances",
                              "mvp_awards",
                              "average_rating",
                              "rating_count"
                            ]
                          }
                        },
                        "required": [
                          "season_id",
                          "season_label",
                          "team_id",
                          "team_name",
                          "tournament_ids",
                          "stat_line"
                        ]
                      }
                    },
                    "discipline": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "current": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "tournament_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "team_id": {
                                    "oneOf": [
                                      {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "accumulated_yellows": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "total_yellows": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "total_reds": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "diffida": {
                                    "type": "boolean"
                                  },
                                  "served_suspensions": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "pending_suspension_matches": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "suspended_next_fixture": {
                                    "type": "boolean"
                                  },
                                  "last_card_at": {
                                    "oneOf": [
                                      {
                                        "type": "string",
                                        "format": "date-time"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "tournament_id",
                                  "team_id",
                                  "accumulated_yellows",
                                  "total_yellows",
                                  "total_reds",
                                  "diffida",
                                  "served_suspensions",
                                  "pending_suspension_matches",
                                  "suspended_next_fixture",
                                  "last_card_at"
                                ]
                              }
                            },
                            "total_yellows": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "total_reds": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "served_suspensions": {
                              "type": "integer",
                              "minimum": 0
                            }
                          },
                          "required": [
                            "current",
                            "total_yellows",
                            "total_reds",
                            "served_suspensions"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "player",
                    "is_minor_excluded",
                    "timeline",
                    "discipline"
                  ]
                },
                "pending_suspensions": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "tournament_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "player_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "team_id": {
                        "oneOf": [
                          {
                            "type": "string",
                            "format": "uuid"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "accumulated_yellows": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "total_yellows": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "total_reds": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "diffida": {
                        "type": "boolean"
                      },
                      "served_suspensions": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "pending_suspension_matches": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "suspended_next_fixture": {
                        "type": "boolean"
                      },
                      "last_card_at": {
                        "oneOf": [
                          {
                            "type": "string",
                            "format": "date-time"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "tournament_id",
                      "player_id",
                      "team_id",
                      "accumulated_yellows",
                      "total_yellows",
                      "total_reds",
                      "diffida",
                      "served_suspensions",
                      "pending_suspension_matches",
                      "suspended_next_fixture",
                      "last_card_at"
                    ]
                  }
                }
              },
              "required": [
                "player_id",
                "slug",
                "display_name",
                "is_self_view",
                "is_minor",
                "stats",
                "career",
                "pending_suspensions"
              ]
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "PlayerClaimSelfRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "player_id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "approved",
              "rejected",
              "revoked"
            ]
          },
          "submitted_at": {
            "type": "string",
            "format": "date-time"
          },
          "decided_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "decision_reason": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "has_evidence": {
            "type": "boolean"
          },
          "team_confirmed_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "player_id",
          "status",
          "submitted_at",
          "decided_at",
          "decision_reason",
          "has_evidence",
          "team_confirmed_at"
        ]
      },
      "PlayerClaimListResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "player_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "pending",
                    "approved",
                    "rejected",
                    "revoked"
                  ]
                },
                "submitted_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "decided_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "decision_reason": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "has_evidence": {
                  "type": "boolean"
                },
                "team_confirmed_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "player_id",
                "status",
                "submitted_at",
                "decided_at",
                "decision_reason",
                "has_evidence",
                "team_confirmed_at"
              ]
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "PlayerClaimCandidateRow": {
        "type": "object",
        "properties": {
          "player_id": {
            "type": "string",
            "format": "uuid"
          },
          "display_name": {
            "type": "string",
            "minLength": 1
          },
          "role": {
            "type": "string",
            "minLength": 1
          },
          "shirt_number": {
            "oneOf": [
              {
                "type": "integer",
                "minimum": 1,
                "maximum": 99
              },
              {
                "type": "null"
              }
            ]
          },
          "team_display_name": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "player_id",
          "display_name",
          "role",
          "shirt_number",
          "team_display_name"
        ]
      },
      "PlayerClaimCandidateListResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "player_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "display_name": {
                  "type": "string",
                  "minLength": 1
                },
                "role": {
                  "type": "string",
                  "minLength": 1
                },
                "shirt_number": {
                  "oneOf": [
                    {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 99
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "team_display_name": {
                  "oneOf": [
                    {
                      "type": "string",
                      "minLength": 1
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "player_id",
                "display_name",
                "role",
                "shirt_number",
                "team_display_name"
              ]
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "PlayerClaimSubmitRequest": {
        "type": "object",
        "properties": {
          "player_id": {
            "type": "string",
            "format": "uuid"
          },
          "evidence_ref_hash": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 512
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "player_id"
        ]
      },
      "AdminPlayerClaimRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "player_id": {
            "type": "string",
            "format": "uuid"
          },
          "claimant_pseudo": {
            "type": "string",
            "minLength": 1
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "approved",
              "rejected",
              "revoked"
            ]
          },
          "submitted_at": {
            "type": "string",
            "format": "date-time"
          },
          "decided_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "decided_by_pseudo": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "decision_reason": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "has_evidence": {
            "type": "boolean"
          },
          "team_confirmed_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "team_confirmed_by_pseudo": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "player_id",
          "claimant_pseudo",
          "status",
          "submitted_at",
          "decided_at",
          "decided_by_pseudo",
          "decision_reason",
          "has_evidence",
          "team_confirmed_at",
          "team_confirmed_by_pseudo"
        ]
      },
      "TeamAreaPlayerClaimRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "player_id": {
            "type": "string",
            "format": "uuid"
          },
          "player_display_name": {
            "type": "string",
            "minLength": 1
          },
          "claimant_display_name": {
            "type": "string",
            "minLength": 1
          },
          "submitted_at": {
            "type": "string",
            "format": "date-time"
          },
          "has_evidence": {
            "type": "boolean"
          },
          "team_confirmed_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "player_id",
          "player_display_name",
          "claimant_display_name",
          "submitted_at",
          "has_evidence",
          "team_confirmed_at"
        ]
      },
      "TeamAreaPlayerClaimListResponse": {
        "type": "object",
        "properties": {
          "team_id": {
            "type": "string",
            "format": "uuid"
          },
          "confirmer": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "team",
                  "team_then_admin",
                  "admin"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "player_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "player_display_name": {
                  "type": "string",
                  "minLength": 1
                },
                "claimant_display_name": {
                  "type": "string",
                  "minLength": 1
                },
                "submitted_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "has_evidence": {
                  "type": "boolean"
                },
                "team_confirmed_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "player_id",
                "player_display_name",
                "claimant_display_name",
                "submitted_at",
                "has_evidence",
                "team_confirmed_at"
              ]
            }
          }
        },
        "required": [
          "team_id",
          "confirmer",
          "items"
        ]
      },
      "TeamAreaPlayerClaimDecisionRequest": {
        "type": "object",
        "properties": {
          "team_id": {
            "type": "string",
            "format": "uuid"
          },
          "decision": {
            "type": "string",
            "enum": [
              "confirm",
              "reject"
            ]
          },
          "reason": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 3,
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "team_id",
          "decision"
        ]
      },
      "TeamAreaPlayerClaimDecisionResponse": {
        "type": "object",
        "properties": {
          "claim_id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "approved",
              "rejected",
              "revoked"
            ]
          },
          "outcome": {
            "type": "string",
            "enum": [
              "linked",
              "awaiting_league",
              "rejected"
            ]
          },
          "team_confirmed_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "claim_id",
          "status",
          "outcome",
          "team_confirmed_at"
        ]
      },
      "AdminPlayerClaimListResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "player_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "claimant_pseudo": {
                  "type": "string",
                  "minLength": 1
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "pending",
                    "approved",
                    "rejected",
                    "revoked"
                  ]
                },
                "submitted_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "decided_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "decided_by_pseudo": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "decision_reason": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "has_evidence": {
                  "type": "boolean"
                },
                "team_confirmed_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "team_confirmed_by_pseudo": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "player_id",
                "claimant_pseudo",
                "status",
                "submitted_at",
                "decided_at",
                "decided_by_pseudo",
                "decision_reason",
                "has_evidence",
                "team_confirmed_at",
                "team_confirmed_by_pseudo"
              ]
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "AdminPlayerClaimDecideRequest": {
        "type": "object",
        "properties": {
          "decision": {
            "type": "string",
            "enum": [
              "approved",
              "rejected"
            ]
          },
          "reason": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "decision",
          "reason"
        ]
      },
      "AdminPlayerClaimRequestEvidenceRequest": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          }
        },
        "required": [
          "reason"
        ]
      },
      "OfficialPreMatchLineup": {
        "type": "object",
        "properties": {
          "side": {
            "type": "string",
            "enum": [
              "home",
              "away"
            ]
          },
          "team_id": {
            "type": "string",
            "format": "uuid"
          },
          "team_name": {
            "type": "string",
            "minLength": 1
          },
          "status": {
            "type": "string",
            "enum": [
              "submitted",
              "not_submitted"
            ]
          },
          "submitted_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "entries": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "player_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "shirt_number": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 99
                },
                "starting": {
                  "type": "boolean"
                },
                "captain": {
                  "type": "boolean"
                },
                "role": {
                  "oneOf": [
                    {
                      "type": "string",
                      "enum": [
                        "GK",
                        "DEF",
                        "MID",
                        "FWD"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "display_name": {
                  "type": "string",
                  "minLength": 1
                },
                "lineup_entry_id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "participation": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "state": {
                          "type": "string",
                          "enum": [
                            "pending",
                            "present",
                            "absent"
                          ]
                        },
                        "recorded_at": {
                          "oneOf": [
                            {
                              "type": "string",
                              "format": "date-time"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "state",
                        "recorded_at"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "player_id",
                "shirt_number",
                "starting",
                "captain",
                "display_name",
                "lineup_entry_id",
                "participation"
              ]
            }
          },
          "staff": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "person_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "role": {
                  "type": "string",
                  "enum": [
                    "responsible_manager",
                    "head_coach",
                    "assistant_coach",
                    "team_doctor"
                  ]
                },
                "display_name": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "required": [
                "person_id",
                "role",
                "display_name"
              ]
            }
          },
          "needs_secretariat_check": {
            "type": "boolean"
          },
          "ineligible_player_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        },
        "required": [
          "side",
          "team_id",
          "team_name",
          "status",
          "submitted_at",
          "entries",
          "staff",
          "needs_secretariat_check",
          "ineligible_player_ids"
        ]
      },
      "OfficialPreMatchCheckId": {
        "type": "string",
        "enum": [
          "lineup_home",
          "lineup_away",
          "captain_identity",
          "field_inspection",
          "clock_sync",
          "goals_inspection",
          "balls_inspection",
          "equipment_inspection"
        ]
      },
      "OfficialPreMatchCheckDefinition": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "enum": [
              "lineup_home",
              "lineup_away",
              "captain_identity",
              "field_inspection",
              "clock_sync",
              "goals_inspection",
              "balls_inspection",
              "equipment_inspection"
            ]
          },
          "kind": {
            "type": "string",
            "enum": [
              "server_projected",
              "officer_recorded"
            ]
          },
          "label": {
            "type": "string",
            "minLength": 1
          },
          "description": {
            "type": "string",
            "minLength": 1
          },
          "owner": {
            "type": "string",
            "enum": [
              "home_team",
              "away_team",
              "assigned_official"
            ]
          },
          "completion_criteria": {
            "type": "string",
            "minLength": 1
          },
          "blocking": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "kind",
          "label",
          "description",
          "owner",
          "completion_criteria",
          "blocking"
        ]
      },
      "OfficialPreMatchCheckRecord": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "match_id": {
            "type": "string",
            "format": "uuid"
          },
          "check_id": {
            "type": "string",
            "enum": [
              "lineup_home",
              "lineup_away",
              "captain_identity",
              "field_inspection",
              "clock_sync",
              "goals_inspection",
              "balls_inspection",
              "equipment_inspection"
            ]
          },
          "action": {
            "type": "string",
            "enum": [
              "complete",
              "override"
            ]
          },
          "actor_user_id": {
            "type": "string",
            "format": "uuid"
          },
          "occurred_at": {
            "type": "string",
            "format": "date-time"
          },
          "reason": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ]
          },
          "withdrawn": {
            "type": "boolean"
          },
          "idempotency_key": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          }
        },
        "required": [
          "id",
          "match_id",
          "check_id",
          "action",
          "actor_user_id",
          "occurred_at",
          "reason",
          "withdrawn",
          "idempotency_key"
        ]
      },
      "OfficialPreMatchCheckState": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "enum": [
              "lineup_home",
              "lineup_away",
              "captain_identity",
              "field_inspection",
              "clock_sync",
              "goals_inspection",
              "balls_inspection",
              "equipment_inspection"
            ]
          },
          "kind": {
            "type": "string",
            "enum": [
              "server_projected",
              "officer_recorded"
            ]
          },
          "label": {
            "type": "string",
            "minLength": 1
          },
          "description": {
            "type": "string",
            "minLength": 1
          },
          "owner": {
            "type": "string",
            "enum": [
              "home_team",
              "away_team",
              "assigned_official"
            ]
          },
          "completion_criteria": {
            "type": "string",
            "minLength": 1
          },
          "blocking": {
            "type": "boolean"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "completed",
              "overridden"
            ]
          },
          "source": {
            "type": "string",
            "enum": [
              "server_projection",
              "officer_record"
            ]
          },
          "latest_record": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "match_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "check_id": {
                    "type": "string",
                    "enum": [
                      "lineup_home",
                      "lineup_away",
                      "captain_identity",
                      "field_inspection",
                      "clock_sync",
                      "goals_inspection",
                      "balls_inspection",
                      "equipment_inspection"
                    ]
                  },
                  "action": {
                    "type": "string",
                    "enum": [
                      "complete",
                      "override"
                    ]
                  },
                  "actor_user_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "occurred_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "reason": {
                    "oneOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "withdrawn": {
                    "type": "boolean"
                  },
                  "idempotency_key": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  }
                },
                "required": [
                  "id",
                  "match_id",
                  "check_id",
                  "action",
                  "actor_user_id",
                  "occurred_at",
                  "reason",
                  "withdrawn",
                  "idempotency_key"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "records": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "match_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "check_id": {
                  "type": "string",
                  "enum": [
                    "lineup_home",
                    "lineup_away",
                    "captain_identity",
                    "field_inspection",
                    "clock_sync",
                    "goals_inspection",
                    "balls_inspection",
                    "equipment_inspection"
                  ]
                },
                "action": {
                  "type": "string",
                  "enum": [
                    "complete",
                    "override"
                  ]
                },
                "actor_user_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "occurred_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "reason": {
                  "oneOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 500
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "withdrawn": {
                  "type": "boolean"
                },
                "idempotency_key": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                }
              },
              "required": [
                "id",
                "match_id",
                "check_id",
                "action",
                "actor_user_id",
                "occurred_at",
                "reason",
                "withdrawn",
                "idempotency_key"
              ]
            }
          }
        },
        "required": [
          "id",
          "kind",
          "label",
          "description",
          "owner",
          "completion_criteria",
          "blocking",
          "status",
          "source",
          "latest_record",
          "records"
        ]
      },
      "OfficialPreMatchCheckWriteRequest": {
        "type": "object",
        "properties": {
          "action": {
            "type": "string",
            "enum": [
              "complete",
              "override"
            ]
          },
          "reason": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 3,
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ]
          },
          "withdrawn": {
            "type": "boolean",
            "default": false
          },
          "idempotency_key": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          }
        },
        "required": [
          "action",
          "reason",
          "idempotency_key"
        ]
      },
      "OfficialPreMatchResponse": {
        "type": "object",
        "properties": {
          "match_id": {
            "type": "string",
            "format": "uuid"
          },
          "lineups": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "side": {
                  "type": "string",
                  "enum": [
                    "home",
                    "away"
                  ]
                },
                "team_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "team_name": {
                  "type": "string",
                  "minLength": 1
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "submitted",
                    "not_submitted"
                  ]
                },
                "submitted_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "entries": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "player_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "shirt_number": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 99
                      },
                      "starting": {
                        "type": "boolean"
                      },
                      "captain": {
                        "type": "boolean"
                      },
                      "role": {
                        "oneOf": [
                          {
                            "type": "string",
                            "enum": [
                              "GK",
                              "DEF",
                              "MID",
                              "FWD"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "display_name": {
                        "type": "string",
                        "minLength": 1
                      },
                      "lineup_entry_id": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 200
                      },
                      "participation": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "state": {
                                "type": "string",
                                "enum": [
                                  "pending",
                                  "present",
                                  "absent"
                                ]
                              },
                              "recorded_at": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "state",
                              "recorded_at"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "player_id",
                      "shirt_number",
                      "starting",
                      "captain",
                      "display_name",
                      "lineup_entry_id",
                      "participation"
                    ]
                  }
                },
                "staff": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "person_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "role": {
                        "type": "string",
                        "enum": [
                          "responsible_manager",
                          "head_coach",
                          "assistant_coach",
                          "team_doctor"
                        ]
                      },
                      "display_name": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "person_id",
                      "role",
                      "display_name"
                    ]
                  }
                },
                "needs_secretariat_check": {
                  "type": "boolean"
                },
                "ineligible_player_ids": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  }
                }
              },
              "required": [
                "side",
                "team_id",
                "team_name",
                "status",
                "submitted_at",
                "entries",
                "staff",
                "needs_secretariat_check",
                "ineligible_player_ids"
              ]
            }
          },
          "unavailable_reason": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "checks": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "enum": [
                    "lineup_home",
                    "lineup_away",
                    "captain_identity",
                    "field_inspection",
                    "clock_sync",
                    "goals_inspection",
                    "balls_inspection",
                    "equipment_inspection"
                  ]
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "server_projected",
                    "officer_recorded"
                  ]
                },
                "label": {
                  "type": "string",
                  "minLength": 1
                },
                "description": {
                  "type": "string",
                  "minLength": 1
                },
                "owner": {
                  "type": "string",
                  "enum": [
                    "home_team",
                    "away_team",
                    "assigned_official"
                  ]
                },
                "completion_criteria": {
                  "type": "string",
                  "minLength": 1
                },
                "blocking": {
                  "type": "boolean"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "pending",
                    "completed",
                    "overridden"
                  ]
                },
                "source": {
                  "type": "string",
                  "enum": [
                    "server_projection",
                    "officer_record"
                  ]
                },
                "latest_record": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "match_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "check_id": {
                          "type": "string",
                          "enum": [
                            "lineup_home",
                            "lineup_away",
                            "captain_identity",
                            "field_inspection",
                            "clock_sync",
                            "goals_inspection",
                            "balls_inspection",
                            "equipment_inspection"
                          ]
                        },
                        "action": {
                          "type": "string",
                          "enum": [
                            "complete",
                            "override"
                          ]
                        },
                        "actor_user_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "occurred_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "reason": {
                          "oneOf": [
                            {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 500
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "withdrawn": {
                          "type": "boolean"
                        },
                        "idempotency_key": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        }
                      },
                      "required": [
                        "id",
                        "match_id",
                        "check_id",
                        "action",
                        "actor_user_id",
                        "occurred_at",
                        "reason",
                        "withdrawn",
                        "idempotency_key"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "records": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "match_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "check_id": {
                        "type": "string",
                        "enum": [
                          "lineup_home",
                          "lineup_away",
                          "captain_identity",
                          "field_inspection",
                          "clock_sync",
                          "goals_inspection",
                          "balls_inspection",
                          "equipment_inspection"
                        ]
                      },
                      "action": {
                        "type": "string",
                        "enum": [
                          "complete",
                          "override"
                        ]
                      },
                      "actor_user_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "occurred_at": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "reason": {
                        "oneOf": [
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 500
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "withdrawn": {
                        "type": "boolean"
                      },
                      "idempotency_key": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 200
                      }
                    },
                    "required": [
                      "id",
                      "match_id",
                      "check_id",
                      "action",
                      "actor_user_id",
                      "occurred_at",
                      "reason",
                      "withdrawn",
                      "idempotency_key"
                    ]
                  }
                }
              },
              "required": [
                "id",
                "kind",
                "label",
                "description",
                "owner",
                "completion_criteria",
                "blocking",
                "status",
                "source",
                "latest_record",
                "records"
              ]
            }
          },
          "sheet_policy": {
            "type": "object",
            "properties": {
              "signatures_required": {
                "oneOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "reprint_recipients": {
                "oneOf": [
                  {
                    "type": "string",
                    "maxLength": 500
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "signatures_required",
              "reprint_recipients"
            ]
          }
        },
        "required": [
          "match_id",
          "lineups",
          "unavailable_reason",
          "checks"
        ]
      },
      "OfficialPreMatchParticipationRequest": {
        "type": "object",
        "properties": {
          "subject_id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "type": "string",
            "enum": [
              "player",
              "official"
            ]
          },
          "presence": {
            "type": "string",
            "enum": [
              "present",
              "absent"
            ]
          },
          "note": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 280
              },
              {
                "type": "null"
              }
            ]
          },
          "expected_revision": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "subject_id",
          "kind",
          "presence",
          "note"
        ]
      },
      "OfficialPreMatchParticipationReceipt": {
        "type": "object",
        "properties": {
          "schema_version": {
            "type": "number",
            "enum": [
              1
            ]
          },
          "receipt_id": {
            "type": "string",
            "minLength": 1
          },
          "match_id": {
            "type": "string",
            "format": "uuid"
          },
          "subject_id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "type": "string",
            "enum": [
              "player",
              "official"
            ]
          },
          "presence": {
            "type": "string",
            "enum": [
              "present",
              "absent"
            ]
          },
          "recorded_at": {
            "type": "string",
            "format": "date-time"
          },
          "revision": {
            "type": "integer",
            "minimum": 0
          },
          "status": {
            "type": "string",
            "enum": [
              "accepted"
            ]
          }
        },
        "required": [
          "schema_version",
          "receipt_id",
          "match_id",
          "subject_id",
          "kind",
          "presence",
          "recorded_at",
          "revision",
          "status"
        ]
      },
      "PublicTournamentStats": {
        "type": "object",
        "properties": {
          "tournament_id": {
            "type": "string",
            "format": "uuid"
          },
          "top_scorers": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "rank": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "player_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "sport_name": {
                  "type": "string"
                },
                "slug": {
                  "type": "string"
                },
                "team_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "goals": {
                  "type": "integer",
                  "minimum": 0
                },
                "assists": {
                  "type": "integer",
                  "minimum": 0
                },
                "by_team": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "team_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "goals": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "assists": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "yellow_cards": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "red_cards": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "appearances": {
                        "type": "integer",
                        "minimum": 0
                      }
                    },
                    "required": [
                      "team_id",
                      "goals",
                      "assists",
                      "yellow_cards",
                      "red_cards",
                      "appearances"
                    ]
                  }
                }
              },
              "required": [
                "rank",
                "player_id",
                "sport_name",
                "slug",
                "team_id",
                "goals",
                "assists"
              ]
            }
          },
          "players": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "player_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "sport_name": {
                  "type": "string"
                },
                "slug": {
                  "type": "string"
                },
                "team_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "goals": {
                  "type": "integer",
                  "minimum": 0
                },
                "assists": {
                  "type": "integer",
                  "minimum": 0
                },
                "yellow_cards": {
                  "type": "integer",
                  "minimum": 0
                },
                "red_cards": {
                  "type": "integer",
                  "minimum": 0
                },
                "appearances": {
                  "type": "integer",
                  "minimum": 0
                },
                "mvp_awards": {
                  "type": "integer",
                  "minimum": 0
                },
                "average_rating": {
                  "oneOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "rating_count": {
                  "type": "integer",
                  "minimum": 0
                },
                "by_team": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "team_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "goals": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "assists": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "yellow_cards": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "red_cards": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "appearances": {
                        "type": "integer",
                        "minimum": 0
                      }
                    },
                    "required": [
                      "team_id",
                      "goals",
                      "assists",
                      "yellow_cards",
                      "red_cards",
                      "appearances"
                    ]
                  }
                }
              },
              "required": [
                "player_id",
                "sport_name",
                "slug",
                "team_id",
                "goals",
                "assists",
                "yellow_cards",
                "red_cards",
                "appearances",
                "mvp_awards",
                "average_rating",
                "rating_count"
              ]
            }
          },
          "teams": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "team_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "display_name": {
                  "type": "string"
                },
                "short_name": {
                  "type": "string"
                },
                "position": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "played": {
                  "type": "integer",
                  "minimum": 0
                },
                "won": {
                  "type": "integer",
                  "minimum": 0
                },
                "drawn": {
                  "type": "integer",
                  "minimum": 0
                },
                "lost": {
                  "type": "integer",
                  "minimum": 0
                },
                "goals_for": {
                  "type": "integer",
                  "minimum": 0
                },
                "goals_against": {
                  "type": "integer",
                  "minimum": 0
                },
                "goal_difference": {
                  "type": "integer"
                },
                "points": {
                  "type": "integer"
                },
                "form": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "W",
                      "D",
                      "L"
                    ]
                  },
                  "maxItems": 5
                },
                "yellow_cards": {
                  "type": "integer",
                  "minimum": 0
                },
                "red_cards": {
                  "type": "integer",
                  "minimum": 0
                },
                "recent_results": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "match_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "opponent_team_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "goals_for": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "goals_against": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "outcome": {
                        "type": "string",
                        "enum": [
                          "W",
                          "D",
                          "L"
                        ]
                      }
                    },
                    "required": [
                      "match_id",
                      "opponent_team_id",
                      "goals_for",
                      "goals_against",
                      "outcome"
                    ]
                  },
                  "maxItems": 5
                }
              },
              "required": [
                "team_id",
                "display_name",
                "short_name",
                "position",
                "played",
                "won",
                "drawn",
                "lost",
                "goals_for",
                "goals_against",
                "goal_difference",
                "points",
                "form",
                "yellow_cards",
                "red_cards",
                "recent_results"
              ]
            }
          },
          "ranking_explanation": {
            "type": "object",
            "properties": {
              "tournament_id": {
                "type": "string",
                "format": "uuid"
              },
              "source": {
                "type": "string",
                "enum": [
                  "official_homologated_results"
                ]
              },
              "counted_match_states": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "counted_matches": {
                "type": "integer",
                "minimum": 0
              },
              "tiebreakers": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "points",
                    "goal_difference",
                    "goals_for",
                    "head_to_head",
                    "head_to_head_goals_for",
                    "wins",
                    "disciplinary",
                    "draw",
                    "team_id_asc"
                  ]
                }
              },
              "notes": {
                "type": "string"
              }
            },
            "required": [
              "tournament_id",
              "source",
              "counted_match_states",
              "counted_matches",
              "tiebreakers",
              "notes"
            ]
          },
          "freshness": {
            "type": "object",
            "properties": {
              "generated_at": {
                "type": "string",
                "format": "date-time"
              },
              "last_official_result_at": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "official_match_count": {
                "type": "integer",
                "minimum": 0
              },
              "pending_official_count": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "generated_at",
              "last_official_result_at",
              "official_match_count",
              "pending_official_count"
            ]
          },
          "sponsor": {
            "type": "object",
            "properties": {
              "campaign_id": {
                "type": "string",
                "format": "uuid"
              },
              "sponsor_name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              "title": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              "creative_url": {
                "type": "string",
                "format": "uri",
                "pattern": "^https?:\\/\\/"
              },
              "slot": {
                "type": "string",
                "enum": [
                  "feed_card",
                  "standings_banner",
                  "live_overlay",
                  "mvp_card",
                  "top8_card"
                ]
              },
              "advertiser_name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              "paid_for_by": {
                "oneOf": [
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "content_category": {
                "type": "string",
                "enum": [
                  "general",
                  "food_beverage",
                  "sport_equipment",
                  "local_services",
                  "gambling",
                  "alcohol",
                  "betting",
                  "other"
                ]
              },
              "click_token": {
                "type": "string",
                "minLength": 16,
                "maxLength": 512
              }
            },
            "required": [
              "campaign_id",
              "sponsor_name",
              "title",
              "creative_url",
              "slot",
              "advertiser_name",
              "paid_for_by",
              "content_category",
              "click_token"
            ]
          }
        },
        "required": [
          "tournament_id",
          "top_scorers",
          "players",
          "teams",
          "ranking_explanation",
          "freshness"
        ]
      },
      "AdminOfficialAnalytics": {
        "type": "object",
        "properties": {
          "tournament_id": {
            "type": "string",
            "format": "uuid"
          },
          "played_matches": {
            "type": "integer",
            "minimum": 0
          },
          "official_matches": {
            "type": "integer",
            "minimum": 0
          },
          "coverage_rate": {
            "type": "number"
          },
          "correction_rate": {
            "type": "number"
          },
          "consistency_rate": {
            "type": "number"
          },
          "avg_submit_latency_hours": {
            "oneOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "avg_homologation_latency_hours": {
            "oneOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "officials": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "official_user_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "official_reports": {
                  "type": "integer",
                  "minimum": 0
                },
                "avg_submit_latency_hours": {
                  "oneOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "avg_homologation_latency_hours": {
                  "oneOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "official_user_id",
                "official_reports",
                "avg_submit_latency_hours",
                "avg_homologation_latency_hours"
              ]
            }
          },
          "evaluators": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "evaluator_user_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "submitted_ratings": {
                  "type": "integer",
                  "minimum": 0
                },
                "approved_ratings": {
                  "type": "integer",
                  "minimum": 0
                },
                "corrected_ratings": {
                  "type": "integer",
                  "minimum": 0
                },
                "rejected_ratings": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "required": [
                "evaluator_user_id",
                "submitted_ratings",
                "approved_ratings",
                "corrected_ratings",
                "rejected_ratings"
              ]
            }
          },
          "freshness": {
            "type": "object",
            "properties": {
              "generated_at": {
                "type": "string",
                "format": "date-time"
              },
              "last_official_result_at": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "official_match_count": {
                "type": "integer",
                "minimum": 0
              },
              "pending_official_count": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "generated_at",
              "last_official_result_at",
              "official_match_count",
              "pending_official_count"
            ]
          }
        },
        "required": [
          "tournament_id",
          "played_matches",
          "official_matches",
          "coverage_rate",
          "correction_rate",
          "consistency_rate",
          "avg_submit_latency_hours",
          "avg_homologation_latency_hours",
          "officials",
          "evaluators",
          "freshness"
        ]
      },
      "PublicMatchCenter": {
        "type": "object",
        "properties": {
          "match_id": {
            "type": "string",
            "format": "uuid"
          },
          "state": {
            "type": "string",
            "enum": [
              "scheduled",
              "live",
              "ended",
              "report_draft",
              "report_submitted",
              "report_official",
              "corrected",
              "cancelled",
              "postponed"
            ]
          },
          "officiality": {
            "type": "string",
            "enum": [
              "scheduled",
              "live",
              "awaiting_official",
              "official",
              "postponed",
              "cancelled"
            ]
          },
          "scheduled_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "schedule_precision": {
            "type": "string",
            "enum": [
              "exact",
              "date_only",
              "unknown"
            ]
          },
          "scheduled_on": {
            "oneOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ]
          },
          "live_started_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "live_ended_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "home_team_id": {
            "type": "string",
            "format": "uuid"
          },
          "away_team_id": {
            "type": "string",
            "format": "uuid"
          },
          "home_team": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "display_name": {
                "type": "string",
                "minLength": 1
              },
              "short_name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 8
              },
              "slug": {
                "type": "string",
                "minLength": 2,
                "maxLength": 64,
                "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
              },
              "primary_color": {
                "type": "string",
                "pattern": "^#[0-9a-fA-F]{6}$"
              },
              "logo_url": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uri"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "id",
              "display_name",
              "short_name",
              "slug",
              "primary_color",
              "logo_url"
            ]
          },
          "away_team": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "display_name": {
                "type": "string",
                "minLength": 1
              },
              "short_name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 8
              },
              "slug": {
                "type": "string",
                "minLength": 2,
                "maxLength": 64,
                "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
              },
              "primary_color": {
                "type": "string",
                "pattern": "^#[0-9a-fA-F]{6}$"
              },
              "logo_url": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uri"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "id",
              "display_name",
              "short_name",
              "slug",
              "primary_color",
              "logo_url"
            ]
          },
          "score_home": {
            "oneOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "score_away": {
            "oneOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "timeline": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "sequence": {
                  "type": "integer",
                  "minimum": 0
                },
                "minute": {
                  "oneOf": [
                    {
                      "type": "integer"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "type": {
                  "type": "string"
                },
                "side": {
                  "oneOf": [
                    {
                      "type": "string",
                      "enum": [
                        "home",
                        "away"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "player_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "player_name": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "player_slug": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "clock_anchor_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "note": {
                  "type": "string",
                  "maxLength": 280
                }
              },
              "required": [
                "sequence",
                "minute",
                "type",
                "side",
                "player_id",
                "player_name",
                "player_slug"
              ]
            }
          },
          "minute_format": {
            "type": "string",
            "enum": [
              "overall",
              "period"
            ]
          },
          "scorers": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "side": {
                  "oneOf": [
                    {
                      "type": "string",
                      "enum": [
                        "home",
                        "away"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "player_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "sport_name": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "slug": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "goals": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                }
              },
              "required": [
                "side",
                "player_id",
                "sport_name",
                "slug",
                "goals"
              ]
            }
          },
          "cards": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "side": {
                  "oneOf": [
                    {
                      "type": "string",
                      "enum": [
                        "home",
                        "away"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "yellow",
                    "red"
                  ]
                },
                "player_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "sport_name": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "slug": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "minute": {
                  "oneOf": [
                    {
                      "type": "integer"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "side",
                "type",
                "player_id",
                "sport_name",
                "slug",
                "minute"
              ]
            }
          },
          "lineups": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "side": {
                  "type": "string",
                  "enum": [
                    "home",
                    "away"
                  ]
                },
                "entries": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "player_id": {
                        "oneOf": [
                          {
                            "type": "string",
                            "format": "uuid"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "sport_name": {
                        "oneOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "slug": {
                        "oneOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "shirt_number": {
                        "type": "integer"
                      },
                      "role": {
                        "oneOf": [
                          {
                            "type": "string",
                            "enum": [
                              "GK",
                              "DEF",
                              "MID",
                              "FWD"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "starting": {
                        "type": "boolean"
                      },
                      "captain": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "player_id",
                      "sport_name",
                      "slug",
                      "shirt_number",
                      "role",
                      "starting",
                      "captain"
                    ]
                  }
                }
              },
              "required": [
                "side",
                "entries"
              ]
            }
          },
          "mvp": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "player_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "sport_name": {
                    "type": "string"
                  },
                  "slug": {
                    "type": "string"
                  }
                },
                "required": [
                  "player_id",
                  "sport_name",
                  "slug"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "sponsor": {
            "type": "object",
            "properties": {
              "campaign_id": {
                "type": "string",
                "format": "uuid"
              },
              "sponsor_name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              "title": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              "creative_url": {
                "type": "string",
                "format": "uri",
                "pattern": "^https?:\\/\\/"
              },
              "slot": {
                "type": "string",
                "enum": [
                  "feed_card",
                  "standings_banner",
                  "live_overlay",
                  "mvp_card",
                  "top8_card"
                ]
              },
              "advertiser_name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              "paid_for_by": {
                "oneOf": [
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "content_category": {
                "type": "string",
                "enum": [
                  "general",
                  "food_beverage",
                  "sport_equipment",
                  "local_services",
                  "gambling",
                  "alcohol",
                  "betting",
                  "other"
                ]
              },
              "click_token": {
                "type": "string",
                "minLength": 16,
                "maxLength": 512
              }
            },
            "required": [
              "campaign_id",
              "sponsor_name",
              "title",
              "creative_url",
              "slot",
              "advertiser_name",
              "paid_for_by",
              "content_category",
              "click_token"
            ]
          },
          "head_to_head": {
            "type": "object",
            "properties": {
              "items": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "competition_label": {
                      "type": "string",
                      "minLength": 1
                    },
                    "scheduled_at": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "schedule_precision": {
                      "type": "string",
                      "enum": [
                        "exact",
                        "date_only",
                        "unknown"
                      ]
                    },
                    "scheduled_on": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "date"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "state": {
                      "type": "string",
                      "enum": [
                        "scheduled",
                        "live",
                        "ended",
                        "report_draft",
                        "report_submitted",
                        "report_official",
                        "corrected",
                        "cancelled",
                        "postponed"
                      ]
                    },
                    "home_team_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "away_team_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "score_home": {
                      "oneOf": [
                        {
                          "type": "integer",
                          "minimum": 0
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "score_away": {
                      "oneOf": [
                        {
                          "type": "integer",
                          "minimum": 0
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "tournament_id",
                    "competition_label",
                    "scheduled_at",
                    "schedule_precision",
                    "scheduled_on",
                    "state",
                    "home_team_id",
                    "away_team_id",
                    "score_home",
                    "score_away"
                  ]
                },
                "maxItems": 5
              },
              "limit": {
                "type": "number",
                "enum": [
                  5
                ]
              }
            },
            "required": [
              "items",
              "limit"
            ]
          },
          "media_preview": {
            "type": "object",
            "properties": {
              "items": {
                "type": "array",
                "items": {},
                "maxItems": 6
              },
              "has_more": {
                "type": "boolean"
              }
            },
            "required": [
              "items",
              "has_more"
            ]
          },
          "generated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "match_id",
          "state",
          "officiality",
          "scheduled_at",
          "schedule_precision",
          "scheduled_on",
          "live_started_at",
          "live_ended_at",
          "home_team_id",
          "away_team_id",
          "score_home",
          "score_away",
          "timeline",
          "scorers",
          "cards",
          "lineups",
          "mvp",
          "generated_at"
        ]
      },
      "PublicMatchCenterTeam": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "display_name": {
            "type": "string",
            "minLength": 1
          },
          "short_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 8
          },
          "slug": {
            "type": "string",
            "minLength": 2,
            "maxLength": 64,
            "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
          },
          "primary_color": {
            "type": "string",
            "pattern": "^#[0-9a-fA-F]{6}$"
          },
          "logo_url": {
            "oneOf": [
              {
                "type": "string",
                "format": "uri"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "display_name",
          "short_name",
          "slug",
          "primary_color",
          "logo_url"
        ]
      },
      "PublicPlayerStats": {
        "type": "object",
        "properties": {
          "player": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "slug": {
                    "type": "string"
                  },
                  "sport_name": {
                    "type": "string"
                  },
                  "role": {
                    "type": "string",
                    "enum": [
                      "GK",
                      "DEF",
                      "MID",
                      "FWD"
                    ]
                  },
                  "shirt_number": {
                    "oneOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "photo_url": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uri"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "avatar_head_id": {
                    "oneOf": [
                      {
                        "type": "string",
                        "enum": [
                          "head-01",
                          "head-02",
                          "head-03",
                          "head-04",
                          "head-05",
                          "head-06",
                          "head-07",
                          "head-08",
                          "head-09",
                          "head-10",
                          "head-11",
                          "head-12",
                          "head-13",
                          "head-14",
                          "head-15",
                          "head-16",
                          "head-17",
                          "head-18",
                          "head-19",
                          "head-20",
                          "head-21",
                          "head-22",
                          "head-23",
                          "head-24",
                          "head-25",
                          "head-26",
                          "head-27",
                          "head-28",
                          "head-29",
                          "head-30",
                          "head-31",
                          "head-32",
                          "head-33",
                          "head-34",
                          "head-35",
                          "head-36",
                          "head-37",
                          "head-38",
                          "head-39",
                          "head-40",
                          "head-41",
                          "head-42",
                          "head-43",
                          "head-44",
                          "head-45",
                          "head-46",
                          "head-47",
                          "head-48",
                          "head-49",
                          "head-50",
                          "head-51",
                          "head-52",
                          "head-53",
                          "head-54",
                          "head-55",
                          "head-56",
                          "head-57",
                          "head-58",
                          "head-59",
                          "head-60",
                          "head-61",
                          "head-62",
                          "head-63",
                          "head-64",
                          "head-65",
                          "head-66",
                          "head-67",
                          "head-68",
                          "head-69",
                          "head-70",
                          "head-71",
                          "head-72",
                          "head-73",
                          "head-74",
                          "head-75",
                          "head-76",
                          "head-77",
                          "head-78",
                          "head-79",
                          "head-80",
                          "head-81",
                          "head-82",
                          "head-83",
                          "head-84",
                          "head-85",
                          "head-86",
                          "head-87",
                          "head-88",
                          "head-89",
                          "head-90",
                          "head-91",
                          "head-92",
                          "head-93",
                          "head-94",
                          "head-95",
                          "head-96",
                          "head-97",
                          "head-98",
                          "head-99",
                          "head-100",
                          "head-101",
                          "head-102",
                          "head-103",
                          "head-104",
                          "head-105",
                          "head-106",
                          "head-107",
                          "head-108",
                          "head-109",
                          "head-110",
                          "head-111",
                          "head-112",
                          "head-113",
                          "head-114",
                          "head-115",
                          "head-116",
                          "head-117",
                          "head-118",
                          "head-119",
                          "head-120",
                          "head-121",
                          "head-122",
                          "head-123",
                          "head-124",
                          "head-125",
                          "head-126",
                          "head-127",
                          "head-128",
                          "head-129",
                          "head-130",
                          "head-131",
                          "head-132",
                          "head-133",
                          "head-134",
                          "head-135",
                          "head-136",
                          "head-137",
                          "head-138",
                          "head-139",
                          "head-140",
                          "head-141",
                          "head-142",
                          "head-143",
                          "head-144",
                          "head-145",
                          "head-146",
                          "head-147",
                          "head-148",
                          "head-149",
                          "head-150",
                          "head-151",
                          "head-152",
                          "head-153",
                          "head-154",
                          "head-155",
                          "head-156",
                          "head-157",
                          "head-158",
                          "head-159",
                          "head-160",
                          "head-161",
                          "head-162",
                          "head-163",
                          "head-164",
                          "head-165",
                          "head-166",
                          "head-167",
                          "head-168",
                          "head-169",
                          "head-170",
                          "head-171",
                          "head-172",
                          "head-173",
                          "head-174",
                          "head-175",
                          "head-176",
                          "head-177",
                          "head-178",
                          "head-179",
                          "head-180",
                          "head-181",
                          "head-182",
                          "head-183"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "id",
                  "slug",
                  "sport_name",
                  "role",
                  "shirt_number",
                  "photo_url",
                  "avatar_head_id"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "is_minor_excluded": {
            "type": "boolean"
          },
          "totals": {
            "type": "object",
            "properties": {
              "goals": {
                "type": "integer",
                "minimum": 0
              },
              "assists": {
                "type": "integer",
                "minimum": 0
              },
              "yellow_cards": {
                "type": "integer",
                "minimum": 0
              },
              "red_cards": {
                "type": "integer",
                "minimum": 0
              },
              "appearances": {
                "type": "integer",
                "minimum": 0
              },
              "mvp_awards": {
                "type": "integer",
                "minimum": 0
              },
              "average_rating": {
                "oneOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "rating_count": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "goals",
              "assists",
              "yellow_cards",
              "red_cards",
              "appearances",
              "mvp_awards",
              "average_rating",
              "rating_count"
            ]
          },
          "by_tournament": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "tournament_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "season_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "season_label": {
                  "type": "string",
                  "minLength": 1
                },
                "team_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "team_name": {
                  "type": "string",
                  "minLength": 1
                },
                "stat_line": {
                  "type": "object",
                  "properties": {
                    "player_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "sport_name": {
                      "type": "string"
                    },
                    "slug": {
                      "type": "string"
                    },
                    "team_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "goals": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "assists": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "yellow_cards": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "red_cards": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "appearances": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "mvp_awards": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "average_rating": {
                      "oneOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "rating_count": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "by_team": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "team_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "goals": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "assists": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "yellow_cards": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "red_cards": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "appearances": {
                            "type": "integer",
                            "minimum": 0
                          }
                        },
                        "required": [
                          "team_id",
                          "goals",
                          "assists",
                          "yellow_cards",
                          "red_cards",
                          "appearances"
                        ]
                      }
                    }
                  },
                  "required": [
                    "player_id",
                    "sport_name",
                    "slug",
                    "team_id",
                    "goals",
                    "assists",
                    "yellow_cards",
                    "red_cards",
                    "appearances",
                    "mvp_awards",
                    "average_rating",
                    "rating_count"
                  ]
                },
                "by_team": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "team_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "team_name": {
                        "oneOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "stat_line": {
                        "type": "object",
                        "properties": {
                          "goals": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "assists": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "yellow_cards": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "red_cards": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "appearances": {
                            "type": "integer",
                            "minimum": 0
                          }
                        },
                        "required": [
                          "goals",
                          "assists",
                          "yellow_cards",
                          "red_cards",
                          "appearances"
                        ]
                      }
                    },
                    "required": [
                      "team_id",
                      "team_name",
                      "stat_line"
                    ]
                  }
                }
              },
              "required": [
                "tournament_id",
                "stat_line"
              ]
            }
          },
          "freshness": {
            "type": "object",
            "properties": {
              "generated_at": {
                "type": "string",
                "format": "date-time"
              },
              "last_official_result_at": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "official_match_count": {
                "type": "integer",
                "minimum": 0
              },
              "pending_official_count": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "generated_at",
              "last_official_result_at",
              "official_match_count",
              "pending_official_count"
            ]
          }
        },
        "required": [
          "player",
          "is_minor_excluded",
          "totals",
          "by_tournament",
          "freshness"
        ]
      },
      "PublicMediaAsset": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "type": "string",
            "enum": [
              "image",
              "video",
              "document"
            ]
          },
          "content_kind": {
            "type": "string",
            "enum": [
              "image",
              "video",
              "document"
            ]
          },
          "asset_url": {
            "type": "string",
            "format": "uri"
          },
          "thumbnail_url": {
            "oneOf": [
              {
                "type": "string",
                "format": "uri"
              },
              {
                "type": "null"
              }
            ]
          },
          "og_image_url": {
            "oneOf": [
              {
                "type": "string",
                "format": "uri"
              },
              {
                "type": "null"
              }
            ]
          },
          "title": {
            "type": "string"
          },
          "caption": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "captured_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "published_at": {
            "type": "string",
            "format": "date-time"
          },
          "subjects": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "team",
                    "match",
                    "player"
                  ]
                },
                "subject_id": {
                  "type": "string"
                },
                "slug": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "display_name": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "kind",
                "subject_id",
                "slug",
                "display_name"
              ]
            }
          }
        },
        "required": [
          "id",
          "kind",
          "content_kind",
          "asset_url",
          "thumbnail_url",
          "og_image_url",
          "title",
          "caption",
          "captured_at",
          "published_at",
          "subjects"
        ]
      },
      "PublicMediaList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "image",
                    "video",
                    "document"
                  ]
                },
                "content_kind": {
                  "type": "string",
                  "enum": [
                    "image",
                    "video",
                    "document"
                  ]
                },
                "asset_url": {
                  "type": "string",
                  "format": "uri"
                },
                "thumbnail_url": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uri"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "og_image_url": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uri"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "title": {
                  "type": "string"
                },
                "caption": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "captured_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "published_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "subjects": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "team",
                          "match",
                          "player"
                        ]
                      },
                      "subject_id": {
                        "type": "string"
                      },
                      "slug": {
                        "oneOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "display_name": {
                        "oneOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "kind",
                      "subject_id",
                      "slug",
                      "display_name"
                    ]
                  }
                }
              },
              "required": [
                "id",
                "kind",
                "content_kind",
                "asset_url",
                "thumbnail_url",
                "og_image_url",
                "title",
                "caption",
                "captured_at",
                "published_at",
                "subjects"
              ]
            },
            "maxItems": 100
          },
          "next_cursor": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 400
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "items",
          "next_cursor"
        ]
      },
      "PublicTeamRoster": {
        "type": "object",
        "properties": {
          "team_id": {
            "type": "string",
            "format": "uuid"
          },
          "season_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "members": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "player_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "slug": {
                  "type": "string"
                },
                "sport_name": {
                  "type": "string"
                },
                "role": {
                  "type": "string",
                  "enum": [
                    "GK",
                    "DEF",
                    "MID",
                    "FWD"
                  ]
                },
                "shirt_number": {
                  "type": "integer"
                },
                "photo_url": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uri"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "avatar_head_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "enum": [
                        "head-01",
                        "head-02",
                        "head-03",
                        "head-04",
                        "head-05",
                        "head-06",
                        "head-07",
                        "head-08",
                        "head-09",
                        "head-10",
                        "head-11",
                        "head-12",
                        "head-13",
                        "head-14",
                        "head-15",
                        "head-16",
                        "head-17",
                        "head-18",
                        "head-19",
                        "head-20",
                        "head-21",
                        "head-22",
                        "head-23",
                        "head-24",
                        "head-25",
                        "head-26",
                        "head-27",
                        "head-28",
                        "head-29",
                        "head-30",
                        "head-31",
                        "head-32",
                        "head-33",
                        "head-34",
                        "head-35",
                        "head-36",
                        "head-37",
                        "head-38",
                        "head-39",
                        "head-40",
                        "head-41",
                        "head-42",
                        "head-43",
                        "head-44",
                        "head-45",
                        "head-46",
                        "head-47",
                        "head-48",
                        "head-49",
                        "head-50",
                        "head-51",
                        "head-52",
                        "head-53",
                        "head-54",
                        "head-55",
                        "head-56",
                        "head-57",
                        "head-58",
                        "head-59",
                        "head-60",
                        "head-61",
                        "head-62",
                        "head-63",
                        "head-64",
                        "head-65",
                        "head-66",
                        "head-67",
                        "head-68",
                        "head-69",
                        "head-70",
                        "head-71",
                        "head-72",
                        "head-73",
                        "head-74",
                        "head-75",
                        "head-76",
                        "head-77",
                        "head-78",
                        "head-79",
                        "head-80",
                        "head-81",
                        "head-82",
                        "head-83",
                        "head-84",
                        "head-85",
                        "head-86",
                        "head-87",
                        "head-88",
                        "head-89",
                        "head-90",
                        "head-91",
                        "head-92",
                        "head-93",
                        "head-94",
                        "head-95",
                        "head-96",
                        "head-97",
                        "head-98",
                        "head-99",
                        "head-100",
                        "head-101",
                        "head-102",
                        "head-103",
                        "head-104",
                        "head-105",
                        "head-106",
                        "head-107",
                        "head-108",
                        "head-109",
                        "head-110",
                        "head-111",
                        "head-112",
                        "head-113",
                        "head-114",
                        "head-115",
                        "head-116",
                        "head-117",
                        "head-118",
                        "head-119",
                        "head-120",
                        "head-121",
                        "head-122",
                        "head-123",
                        "head-124",
                        "head-125",
                        "head-126",
                        "head-127",
                        "head-128",
                        "head-129",
                        "head-130",
                        "head-131",
                        "head-132",
                        "head-133",
                        "head-134",
                        "head-135",
                        "head-136",
                        "head-137",
                        "head-138",
                        "head-139",
                        "head-140",
                        "head-141",
                        "head-142",
                        "head-143",
                        "head-144",
                        "head-145",
                        "head-146",
                        "head-147",
                        "head-148",
                        "head-149",
                        "head-150",
                        "head-151",
                        "head-152",
                        "head-153",
                        "head-154",
                        "head-155",
                        "head-156",
                        "head-157",
                        "head-158",
                        "head-159",
                        "head-160",
                        "head-161",
                        "head-162",
                        "head-163",
                        "head-164",
                        "head-165",
                        "head-166",
                        "head-167",
                        "head-168",
                        "head-169",
                        "head-170",
                        "head-171",
                        "head-172",
                        "head-173",
                        "head-174",
                        "head-175",
                        "head-176",
                        "head-177",
                        "head-178",
                        "head-179",
                        "head-180",
                        "head-181",
                        "head-182",
                        "head-183"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "player_id",
                "slug",
                "sport_name",
                "role",
                "shirt_number",
                "photo_url"
              ]
            }
          },
          "withheld_for_protection": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "team_id",
          "season_id",
          "members",
          "withheld_for_protection"
        ]
      },
      "CommunicationHistoryResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "category": {
                  "type": "string",
                  "enum": [
                    "transactional",
                    "match_alert",
                    "fantasy",
                    "official_communication",
                    "marketing"
                  ]
                },
                "channel": {
                  "type": "string",
                  "enum": [
                    "push",
                    "email",
                    "inapp"
                  ]
                },
                "preview_safe": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 180
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "queued",
                    "sending",
                    "delivered",
                    "failed",
                    "dead_letter",
                    "suppressed"
                  ]
                },
                "scheduled_for": {
                  "type": "string",
                  "format": "date-time"
                },
                "priority": {
                  "type": "integer",
                  "minimum": 0
                },
                "is_official": {
                  "type": "boolean"
                }
              },
              "required": [
                "id",
                "category",
                "channel",
                "preview_safe",
                "status",
                "scheduled_for",
                "priority",
                "is_official"
              ]
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "FantasyHomeResponse": {
        "type": "object",
        "properties": {
          "can_play": {
            "type": "boolean"
          },
          "capabilities": {
            "type": "object",
            "properties": {
              "can_play": {
                "type": "boolean"
              },
              "private_league_join": {
                "type": "boolean"
              },
              "private_league_create": {
                "type": "boolean"
              },
              "lineup_submit": {
                "type": "boolean"
              },
              "market_orders": {
                "type": "boolean"
              },
              "auction_participate": {
                "type": "boolean"
              },
              "auction_create": {
                "type": "boolean"
              },
              "official_scoring": {
                "type": "boolean"
              },
              "live_provisional_scoring": {
                "type": "boolean"
              },
              "head_to_head": {
                "type": "boolean"
              },
              "global_leaderboard": {
                "type": "boolean"
              },
              "play_blocked_reason": {
                "oneOf": [
                  {
                    "type": "string",
                    "enum": [
                      "date_of_birth_required",
                      "adults_only"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "can_play",
              "private_league_join",
              "private_league_create",
              "lineup_submit",
              "market_orders",
              "auction_participate",
              "auction_create",
              "official_scoring",
              "live_provisional_scoring",
              "head_to_head",
              "global_leaderboard"
            ]
          },
          "leagues": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "league": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "tournament_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "name": {
                      "type": "string"
                    },
                    "visibility": {
                      "type": "string",
                      "enum": [
                        "public",
                        "private"
                      ]
                    },
                    "format": {
                      "type": "string",
                      "enum": [
                        "total_points",
                        "head_to_head"
                      ],
                      "default": "total_points"
                    },
                    "starts_on": {
                      "type": "string"
                    },
                    "ends_on": {
                      "type": "string"
                    },
                    "is_owner": {
                      "type": "boolean"
                    },
                    "archived": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "id",
                    "tournament_id",
                    "name",
                    "visibility",
                    "starts_on",
                    "ends_on",
                    "is_owner"
                  ]
                },
                "my_team": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "league_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "name": {
                          "type": "string"
                        },
                        "budget_remaining": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "id",
                        "league_id",
                        "name",
                        "budget_remaining"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "initial_budget": {
                  "type": "integer",
                  "minimum": 0
                },
                "authority": {
                  "type": "object",
                  "properties": {
                    "league_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "server_time": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "ruleset_revision_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "ruleset_version": {
                      "type": "integer",
                      "exclusiveMinimum": 0
                    },
                    "ruleset_content_hash": {
                      "type": "string",
                      "pattern": "^[0-9a-f]{64}$"
                    },
                    "deadline": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "round_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "deadline_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "locked": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "round_id",
                            "deadline_at",
                            "locked"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "numeric": {
                      "type": "object",
                      "properties": {
                        "league_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "round_ids": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "format": "uuid"
                          }
                        },
                        "ruleset_versions": {
                          "type": "array",
                          "items": {
                            "type": "integer",
                            "exclusiveMinimum": 0
                          }
                        },
                        "projection_revision_ids": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "format": "uuid"
                          }
                        },
                        "finality": {
                          "type": "string",
                          "enum": [
                            "empty",
                            "provisional",
                            "official",
                            "corrected",
                            "superseded",
                            "stale"
                          ]
                        }
                      },
                      "required": [
                        "league_id",
                        "round_ids",
                        "ruleset_versions",
                        "projection_revision_ids",
                        "finality"
                      ]
                    }
                  },
                  "required": [
                    "league_id",
                    "server_time",
                    "ruleset_revision_id",
                    "ruleset_version",
                    "ruleset_content_hash",
                    "deadline",
                    "numeric"
                  ]
                },
                "current_round": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "round_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "label": {
                          "type": "string"
                        },
                        "deadline_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "locked": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "round_id",
                        "label",
                        "deadline_at",
                        "locked"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "current_round_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "owner_powers": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "expel",
                      "rotate_code",
                      "edit_rules",
                      "market_control",
                      "review_trades"
                    ]
                  }
                }
              },
              "required": [
                "league",
                "my_team",
                "initial_budget",
                "authority"
              ]
            }
          }
        },
        "required": [
          "can_play",
          "capabilities",
          "leagues"
        ]
      },
      "FantasyFeatureCapabilitiesView": {
        "type": "object",
        "properties": {
          "can_play": {
            "type": "boolean"
          },
          "private_league_join": {
            "type": "boolean"
          },
          "private_league_create": {
            "type": "boolean"
          },
          "lineup_submit": {
            "type": "boolean"
          },
          "market_orders": {
            "type": "boolean"
          },
          "auction_participate": {
            "type": "boolean"
          },
          "auction_create": {
            "type": "boolean"
          },
          "official_scoring": {
            "type": "boolean"
          },
          "live_provisional_scoring": {
            "type": "boolean"
          },
          "head_to_head": {
            "type": "boolean"
          },
          "global_leaderboard": {
            "type": "boolean"
          },
          "play_blocked_reason": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "date_of_birth_required",
                  "adults_only"
                ]
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "can_play",
          "private_league_join",
          "private_league_create",
          "lineup_submit",
          "market_orders",
          "auction_participate",
          "auction_create",
          "official_scoring",
          "live_provisional_scoring",
          "head_to_head",
          "global_leaderboard"
        ]
      },
      "CreatePrivateLeagueRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "tournament_id": {
            "type": "string",
            "format": "uuid"
          },
          "visibility": {
            "type": "string",
            "enum": [
              "public",
              "private"
            ]
          },
          "starts_on": {
            "type": "string",
            "format": "date"
          },
          "ends_on": {
            "type": "string",
            "format": "date"
          },
          "format": {
            "type": "string",
            "enum": [
              "total_points",
              "head_to_head"
            ]
          }
        },
        "required": [
          "name",
          "tournament_id",
          "starts_on",
          "ends_on"
        ],
        "additionalProperties": false
      },
      "CreatePrivateLeagueResponse": {
        "type": "object",
        "properties": {
          "league": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "tournament_id": {
                "type": "string",
                "format": "uuid"
              },
              "name": {
                "type": "string"
              },
              "visibility": {
                "type": "string",
                "enum": [
                  "public",
                  "private"
                ]
              },
              "format": {
                "type": "string",
                "enum": [
                  "total_points",
                  "head_to_head"
                ],
                "default": "total_points"
              },
              "starts_on": {
                "type": "string"
              },
              "ends_on": {
                "type": "string"
              },
              "is_owner": {
                "type": "boolean"
              },
              "archived": {
                "type": "boolean"
              }
            },
            "required": [
              "id",
              "tournament_id",
              "name",
              "visibility",
              "starts_on",
              "ends_on",
              "is_owner"
            ]
          },
          "join_code": {
            "type": "string"
          }
        },
        "required": [
          "league",
          "join_code"
        ]
      },
      "JoinFantasyLeagueRequest": {
        "type": "object",
        "properties": {
          "join_code": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "team_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "initial_budget": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "join_code",
          "team_name"
        ],
        "additionalProperties": false
      },
      "JoinFantasyLeagueResponse": {
        "type": "object",
        "properties": {
          "league": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "tournament_id": {
                "type": "string",
                "format": "uuid"
              },
              "name": {
                "type": "string"
              },
              "visibility": {
                "type": "string",
                "enum": [
                  "public",
                  "private"
                ]
              },
              "format": {
                "type": "string",
                "enum": [
                  "total_points",
                  "head_to_head"
                ],
                "default": "total_points"
              },
              "starts_on": {
                "type": "string"
              },
              "ends_on": {
                "type": "string"
              },
              "is_owner": {
                "type": "boolean"
              },
              "archived": {
                "type": "boolean"
              }
            },
            "required": [
              "id",
              "tournament_id",
              "name",
              "visibility",
              "starts_on",
              "ends_on",
              "is_owner"
            ]
          },
          "team": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "league_id": {
                "type": "string",
                "format": "uuid"
              },
              "name": {
                "type": "string"
              },
              "budget_remaining": {
                "type": "number"
              }
            },
            "required": [
              "id",
              "league_id",
              "name",
              "budget_remaining"
            ]
          },
          "capabilities": {
            "type": "object",
            "properties": {
              "can_play": {
                "type": "boolean"
              },
              "private_league_join": {
                "type": "boolean"
              },
              "private_league_create": {
                "type": "boolean"
              },
              "lineup_submit": {
                "type": "boolean"
              },
              "market_orders": {
                "type": "boolean"
              },
              "auction_participate": {
                "type": "boolean"
              },
              "auction_create": {
                "type": "boolean"
              },
              "official_scoring": {
                "type": "boolean"
              },
              "live_provisional_scoring": {
                "type": "boolean"
              },
              "head_to_head": {
                "type": "boolean"
              },
              "global_leaderboard": {
                "type": "boolean"
              },
              "play_blocked_reason": {
                "oneOf": [
                  {
                    "type": "string",
                    "enum": [
                      "date_of_birth_required",
                      "adults_only"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "can_play",
              "private_league_join",
              "private_league_create",
              "lineup_submit",
              "market_orders",
              "auction_participate",
              "auction_create",
              "official_scoring",
              "live_provisional_scoring",
              "head_to_head",
              "global_leaderboard"
            ]
          }
        },
        "required": [
          "league",
          "team",
          "capabilities"
        ]
      },
      "FantasyLeagueDetailResponse": {
        "type": "object",
        "properties": {
          "league": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "tournament_id": {
                "type": "string",
                "format": "uuid"
              },
              "name": {
                "type": "string"
              },
              "visibility": {
                "type": "string",
                "enum": [
                  "public",
                  "private"
                ]
              },
              "format": {
                "type": "string",
                "enum": [
                  "total_points",
                  "head_to_head"
                ],
                "default": "total_points"
              },
              "starts_on": {
                "type": "string"
              },
              "ends_on": {
                "type": "string"
              },
              "is_owner": {
                "type": "boolean"
              },
              "archived": {
                "type": "boolean"
              }
            },
            "required": [
              "id",
              "tournament_id",
              "name",
              "visibility",
              "starts_on",
              "ends_on",
              "is_owner"
            ]
          },
          "leaderboard": {
            "type": "object",
            "properties": {
              "state": {
                "type": "string",
                "enum": [
                  "empty",
                  "provisional",
                  "stale",
                  "superseded",
                  "final"
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "empty",
                  "provisional",
                  "final"
                ]
              },
              "rows": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "fantasy_team_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "display_name": {
                      "type": "string"
                    },
                    "total_points": {
                      "type": "number"
                    },
                    "rounds_played": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "position": {
                      "type": "integer",
                      "exclusiveMinimum": 0
                    },
                    "forfeit_rounds": {
                      "type": "integer",
                      "minimum": 0,
                      "default": 0
                    },
                    "previous_position": {
                      "oneOf": [
                        {
                          "type": "integer",
                          "exclusiveMinimum": 0
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "default": null
                    }
                  },
                  "required": [
                    "fantasy_team_id",
                    "display_name",
                    "total_points",
                    "rounds_played",
                    "position"
                  ]
                }
              },
              "current_score_count": {
                "type": "integer",
                "minimum": 0
              },
              "provisional_score_count": {
                "type": "integer",
                "minimum": 0
              },
              "final_score_count": {
                "type": "integer",
                "minimum": 0
              },
              "stale_score_count": {
                "type": "integer",
                "minimum": 0
              },
              "superseded_in_history": {
                "type": "boolean"
              },
              "authority": {
                "type": "object",
                "properties": {
                  "league_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "round_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "ruleset_versions": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "exclusiveMinimum": 0
                    }
                  },
                  "projection_revision_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "finality": {
                    "type": "string",
                    "enum": [
                      "empty",
                      "provisional",
                      "official",
                      "corrected",
                      "superseded",
                      "stale"
                    ]
                  }
                },
                "required": [
                  "league_id",
                  "round_ids",
                  "ruleset_versions",
                  "projection_revision_ids",
                  "finality"
                ]
              }
            },
            "required": [
              "state",
              "status",
              "rows",
              "current_score_count",
              "provisional_score_count",
              "final_score_count",
              "stale_score_count",
              "superseded_in_history",
              "authority"
            ]
          },
          "my_team": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "league_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "name": {
                    "type": "string"
                  },
                  "budget_remaining": {
                    "type": "number"
                  }
                },
                "required": [
                  "id",
                  "league_id",
                  "name",
                  "budget_remaining"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "market_open": {
            "type": "boolean"
          },
          "market_closes_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "market_state": {
            "type": "string",
            "enum": [
              "auto",
              "open",
              "closed"
            ],
            "default": "auto"
          },
          "market_state_clock_open": {
            "type": "boolean",
            "default": true
          },
          "market_window_opened_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "capabilities": {
            "type": "object",
            "properties": {
              "can_play": {
                "type": "boolean"
              },
              "private_league_join": {
                "type": "boolean"
              },
              "private_league_create": {
                "type": "boolean"
              },
              "lineup_submit": {
                "type": "boolean"
              },
              "market_orders": {
                "type": "boolean"
              },
              "auction_participate": {
                "type": "boolean"
              },
              "auction_create": {
                "type": "boolean"
              },
              "official_scoring": {
                "type": "boolean"
              },
              "live_provisional_scoring": {
                "type": "boolean"
              },
              "head_to_head": {
                "type": "boolean"
              },
              "global_leaderboard": {
                "type": "boolean"
              },
              "play_blocked_reason": {
                "oneOf": [
                  {
                    "type": "string",
                    "enum": [
                      "date_of_birth_required",
                      "adults_only"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "can_play",
              "private_league_join",
              "private_league_create",
              "lineup_submit",
              "market_orders",
              "auction_participate",
              "auction_create",
              "official_scoring",
              "live_provisional_scoring",
              "head_to_head",
              "global_leaderboard"
            ]
          },
          "authority": {
            "type": "object",
            "properties": {
              "league_id": {
                "type": "string",
                "format": "uuid"
              },
              "server_time": {
                "type": "string",
                "format": "date-time"
              },
              "ruleset_revision_id": {
                "type": "string",
                "format": "uuid"
              },
              "ruleset_version": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "ruleset_content_hash": {
                "type": "string",
                "pattern": "^[0-9a-f]{64}$"
              },
              "deadline": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "round_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "deadline_at": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "locked": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "round_id",
                      "deadline_at",
                      "locked"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "numeric": {
                "type": "object",
                "properties": {
                  "league_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "round_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "ruleset_versions": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "exclusiveMinimum": 0
                    }
                  },
                  "projection_revision_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "finality": {
                    "type": "string",
                    "enum": [
                      "empty",
                      "provisional",
                      "official",
                      "corrected",
                      "superseded",
                      "stale"
                    ]
                  }
                },
                "required": [
                  "league_id",
                  "round_ids",
                  "ruleset_versions",
                  "projection_revision_ids",
                  "finality"
                ]
              }
            },
            "required": [
              "league_id",
              "server_time",
              "ruleset_revision_id",
              "ruleset_version",
              "ruleset_content_hash",
              "deadline",
              "numeric"
            ]
          },
          "owner_powers": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "expel",
                "rotate_code",
                "edit_rules",
                "market_control",
                "review_trades"
              ]
            }
          }
        },
        "required": [
          "league",
          "leaderboard",
          "my_team",
          "market_open",
          "market_closes_at",
          "capabilities",
          "authority"
        ]
      },
      "FantasyLeaguePlayersResponse": {
        "type": "object",
        "properties": {
          "league": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "tournament_id": {
                "type": "string",
                "format": "uuid"
              },
              "name": {
                "type": "string"
              },
              "visibility": {
                "type": "string",
                "enum": [
                  "public",
                  "private"
                ]
              },
              "format": {
                "type": "string",
                "enum": [
                  "total_points",
                  "head_to_head"
                ],
                "default": "total_points"
              },
              "starts_on": {
                "type": "string"
              },
              "ends_on": {
                "type": "string"
              },
              "is_owner": {
                "type": "boolean"
              },
              "archived": {
                "type": "boolean"
              }
            },
            "required": [
              "id",
              "tournament_id",
              "name",
              "visibility",
              "starts_on",
              "ends_on",
              "is_owner"
            ]
          },
          "players": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "player_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "display_name": {
                  "type": "string"
                },
                "role": {
                  "oneOf": [
                    {
                      "type": "string",
                      "enum": [
                        "GK",
                        "DEF",
                        "MID",
                        "FWD"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "shirt_number": {
                  "oneOf": [
                    {
                      "type": "integer"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "team_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "team_display_name": {
                  "type": "string"
                },
                "current_value": {
                  "type": "integer",
                  "minimum": 0
                },
                "owned_by_me": {
                  "type": "boolean"
                },
                "owned_in_league": {
                  "type": "boolean"
                },
                "owner_team_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "owner_team_name": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "stats": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "matches_played": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "goals": {
                          "oneOf": [
                            {
                              "type": "integer",
                              "minimum": 0
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "assists": {
                          "oneOf": [
                            {
                              "type": "integer",
                              "minimum": 0
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "cards": {
                          "oneOf": [
                            {
                              "type": "integer",
                              "minimum": 0
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "points_to_date": {
                          "type": "number"
                        },
                        "last_round_points": {
                          "oneOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "matches_played",
                        "goals",
                        "assists",
                        "cards",
                        "points_to_date",
                        "last_round_points"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "public_slug": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "canonical_display_name": {
                  "type": "string"
                },
                "avatar_head_id": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "availability": {
                  "type": "object",
                  "required": [
                    "state",
                    "reason"
                  ]
                },
                "market_value_authority": {
                  "type": "object",
                  "required": [
                    "kind",
                    "ruleset_revision_id",
                    "ruleset_version",
                    "source"
                  ]
                }
              },
              "required": [
                "player_id",
                "display_name",
                "role",
                "shirt_number",
                "team_id",
                "team_display_name",
                "current_value",
                "owned_by_me",
                "owned_in_league",
                "canonical_display_name",
                "avatar_head_id",
                "availability",
                "market_value_authority"
              ]
            }
          },
          "ruleset_capability": {
            "type": "object",
            "required": [
              "state",
              "reason"
            ]
          }
        },
        "required": [
          "league",
          "players",
          "ruleset_capability"
        ]
      },
      "FantasyLeaguePlayerDetailResponse": {
        "type": "object",
        "properties": {
          "player": {
            "type": "object",
            "properties": {
              "player_id": {
                "type": "string",
                "format": "uuid"
              },
              "display_name": {
                "type": "string"
              },
              "role": {
                "oneOf": [
                  {
                    "type": "string",
                    "enum": [
                      "GK",
                      "DEF",
                      "MID",
                      "FWD"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "shirt_number": {
                "oneOf": [
                  {
                    "type": "integer"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "team_id": {
                "type": "string",
                "format": "uuid"
              },
              "team_display_name": {
                "type": "string"
              },
              "current_value": {
                "type": "integer",
                "minimum": 0
              },
              "owned_by_me": {
                "type": "boolean"
              },
              "owned_in_league": {
                "type": "boolean"
              },
              "owner_team_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null
              },
              "owner_team_name": {
                "oneOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null
              },
              "stats": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "matches_played": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "goals": {
                        "oneOf": [
                          {
                            "type": "integer",
                            "minimum": 0
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "assists": {
                        "oneOf": [
                          {
                            "type": "integer",
                            "minimum": 0
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "cards": {
                        "oneOf": [
                          {
                            "type": "integer",
                            "minimum": 0
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "points_to_date": {
                        "type": "number"
                      },
                      "last_round_points": {
                        "oneOf": [
                          {
                            "type": "number"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "matches_played",
                      "goals",
                      "assists",
                      "cards",
                      "points_to_date",
                      "last_round_points"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null
              },
              "public_slug": {
                "oneOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null
              }
            },
            "required": [
              "player_id",
              "display_name",
              "role",
              "shirt_number",
              "team_id",
              "team_display_name",
              "current_value",
              "owned_by_me",
              "owned_in_league"
            ]
          },
          "value_history": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "round_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "value": {
                  "type": "integer",
                  "minimum": 0
                },
                "points": {
                  "type": "number"
                }
              },
              "required": [
                "round_id",
                "value",
                "points"
              ]
            }
          }
        },
        "required": [
          "player",
          "value_history"
        ]
      },
      "CreateFantasyTeamRequest": {
        "type": "object",
        "properties": {
          "league_id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "initial_budget": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "league_id",
          "name"
        ],
        "additionalProperties": false
      },
      "CreateFantasyTeamResponse": {
        "type": "object",
        "properties": {
          "team": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "league_id": {
                "type": "string",
                "format": "uuid"
              },
              "name": {
                "type": "string"
              },
              "budget_remaining": {
                "type": "number"
              }
            },
            "required": [
              "id",
              "league_id",
              "name",
              "budget_remaining"
            ]
          }
        },
        "required": [
          "team"
        ]
      },
      "FantasyTeamDetailResponse": {
        "type": "object",
        "properties": {
          "team": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "league_id": {
                "type": "string",
                "format": "uuid"
              },
              "name": {
                "type": "string"
              },
              "budget_remaining": {
                "type": "number"
              }
            },
            "required": [
              "id",
              "league_id",
              "name",
              "budget_remaining"
            ]
          },
          "roster": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "player_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "display_name": {
                  "type": "string"
                },
                "role": {
                  "oneOf": [
                    {
                      "type": "string",
                      "enum": [
                        "GK",
                        "DEF",
                        "MID",
                        "FWD"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "shirt_number": {
                  "oneOf": [
                    {
                      "type": "integer"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "acquired_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "acquired_price": {
                  "type": "number"
                },
                "current_value": {
                  "type": "integer",
                  "minimum": 0
                },
                "sell_recovery": {
                  "type": "integer",
                  "minimum": 0,
                  "default": 0
                },
                "public_slug": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                }
              },
              "required": [
                "player_id",
                "display_name",
                "role",
                "shirt_number",
                "acquired_at",
                "acquired_price",
                "current_value"
              ]
            }
          },
          "scores": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "league_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "round_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "points": {
                  "type": "number"
                },
                "breakdown": {
                  "type": "object",
                  "additionalProperties": true
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "provisional",
                    "final",
                    "corrected"
                  ]
                },
                "rule_version": {
                  "type": "integer"
                },
                "ruleset_revision_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "projection_revision_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "source_report_version_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "finality": {
                  "type": "string",
                  "enum": [
                    "empty",
                    "provisional",
                    "official",
                    "corrected",
                    "superseded",
                    "stale"
                  ]
                },
                "computed_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "superseded": {
                  "type": "boolean"
                }
              },
              "required": [
                "id",
                "league_id",
                "round_id",
                "points",
                "breakdown",
                "status",
                "rule_version",
                "ruleset_revision_id",
                "projection_revision_id",
                "source_report_version_id",
                "finality",
                "computed_at",
                "superseded"
              ]
            }
          },
          "orders": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "fantasy_team_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "idempotency_key": {
                  "type": "string"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "buy",
                    "sell",
                    "swap",
                    "trade"
                  ]
                },
                "player_in_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "player_out_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "proposed_price": {
                  "type": "number"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "pending",
                    "accepted",
                    "rejected",
                    "cancelled",
                    "countered",
                    "in_review",
                    "expired"
                  ]
                },
                "submitted_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "decided_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "decision_reason": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "executed_price": {
                  "oneOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "resulting_transaction_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "budget_after": {
                  "oneOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "counterparty_team_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "counterparty_team_name": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "proposer_team_name": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "recipient_team_name": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "players_out": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "default": []
                },
                "players_in": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "default": []
                },
                "credits_delta": {
                  "type": "integer",
                  "default": 0
                },
                "message_preset": {
                  "type": "string",
                  "enum": [
                    "none",
                    "che_ne_dici",
                    "mi_serve_un_portiere",
                    "mi_serve_un_difensore",
                    "mi_serve_un_centrocampista",
                    "mi_serve_un_attaccante",
                    "scambio_alla_pari",
                    "ultima_offerta"
                  ],
                  "default": "none"
                },
                "expires_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "counter_of_order_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "countered_by_order_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "review_mode": {
                  "oneOf": [
                    {
                      "type": "string",
                      "enum": [
                        "none",
                        "commissioner"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "counterparty_transaction_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                }
              },
              "required": [
                "id",
                "fantasy_team_id",
                "idempotency_key",
                "kind",
                "player_in_id",
                "player_out_id",
                "proposed_price",
                "status",
                "submitted_at",
                "decided_at",
                "decision_reason"
              ]
            }
          },
          "transactions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "fantasy_team_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "buy",
                    "sell",
                    "swap",
                    "trade_in",
                    "trade_out",
                    "reversal"
                  ]
                },
                "player_in_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "player_out_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "players_in": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "default": []
                },
                "players_out": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "default": []
                },
                "trade_order_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "counterparty_transaction_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "price": {
                  "type": "number"
                },
                "executed_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "reversed_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "reversal_reason": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "transfer_cap_exempt": {
                  "type": "boolean",
                  "default": false
                }
              },
              "required": [
                "id",
                "fantasy_team_id",
                "kind",
                "player_in_id",
                "player_out_id",
                "price",
                "executed_at",
                "reversed_at",
                "reversal_reason"
              ]
            },
            "default": []
          },
          "latest_lineup": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "round_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "starting_player_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "starting_players": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "player_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "display_name": {
                          "type": "string"
                        },
                        "role": {
                          "oneOf": [
                            {
                              "type": "string",
                              "enum": [
                                "GK",
                                "DEF",
                                "MID",
                                "FWD"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "shirt_number": {
                          "oneOf": [
                            {
                              "type": "integer"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "public_slug": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "default": null
                        },
                        "score": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "points": {
                                  "type": "number"
                                },
                                "voto": {
                                  "oneOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "provisional",
                                    "final",
                                    "corrected"
                                  ]
                                },
                                "breakdown": {
                                  "type": "object",
                                  "additionalProperties": true
                                },
                                "substitution": {
                                  "type": "object",
                                  "properties": {
                                    "kind": {
                                      "type": "string",
                                      "enum": [
                                        "none",
                                        "same_role",
                                        "out_of_position"
                                      ]
                                    },
                                    "replaced_player_id": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "format": "uuid"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "kind",
                                    "replaced_player_id"
                                  ]
                                }
                              },
                              "required": [
                                "points",
                                "voto",
                                "status",
                                "breakdown",
                                "substitution"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "default": null
                        }
                      },
                      "required": [
                        "player_id",
                        "display_name",
                        "role",
                        "shirt_number"
                      ]
                    }
                  },
                  "bench_player_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "bench_players": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "player_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "display_name": {
                          "type": "string"
                        },
                        "role": {
                          "oneOf": [
                            {
                              "type": "string",
                              "enum": [
                                "GK",
                                "DEF",
                                "MID",
                                "FWD"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "shirt_number": {
                          "oneOf": [
                            {
                              "type": "integer"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "public_slug": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "default": null
                        },
                        "score": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "points": {
                                  "type": "number"
                                },
                                "voto": {
                                  "oneOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "provisional",
                                    "final",
                                    "corrected"
                                  ]
                                },
                                "breakdown": {
                                  "type": "object",
                                  "additionalProperties": true
                                },
                                "substitution": {
                                  "type": "object",
                                  "properties": {
                                    "kind": {
                                      "type": "string",
                                      "enum": [
                                        "none",
                                        "same_role",
                                        "out_of_position"
                                      ]
                                    },
                                    "replaced_player_id": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "format": "uuid"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "kind",
                                    "replaced_player_id"
                                  ]
                                }
                              },
                              "required": [
                                "points",
                                "voto",
                                "status",
                                "breakdown",
                                "substitution"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "default": null
                        }
                      },
                      "required": [
                        "player_id",
                        "display_name",
                        "role",
                        "shirt_number"
                      ]
                    }
                  },
                  "captain_player_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "captain_player": {
                    "type": "object",
                    "properties": {
                      "player_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "display_name": {
                        "type": "string"
                      },
                      "role": {
                        "oneOf": [
                          {
                            "type": "string",
                            "enum": [
                              "GK",
                              "DEF",
                              "MID",
                              "FWD"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "shirt_number": {
                        "oneOf": [
                          {
                            "type": "integer"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "public_slug": {
                        "oneOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "default": null
                      },
                      "score": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "points": {
                                "type": "number"
                              },
                              "voto": {
                                "oneOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "provisional",
                                  "final",
                                  "corrected"
                                ]
                              },
                              "breakdown": {
                                "type": "object",
                                "additionalProperties": true
                              },
                              "substitution": {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "none",
                                      "same_role",
                                      "out_of_position"
                                    ]
                                  },
                                  "replaced_player_id": {
                                    "oneOf": [
                                      {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "kind",
                                  "replaced_player_id"
                                ]
                              }
                            },
                            "required": [
                              "points",
                              "voto",
                              "status",
                              "breakdown",
                              "substitution"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "default": null
                      }
                    },
                    "required": [
                      "player_id",
                      "display_name",
                      "role",
                      "shirt_number"
                    ]
                  },
                  "vice_player_id": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "vice_player": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "player_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "display_name": {
                            "type": "string"
                          },
                          "role": {
                            "oneOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "GK",
                                  "DEF",
                                  "MID",
                                  "FWD"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "shirt_number": {
                            "oneOf": [
                              {
                                "type": "integer"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "public_slug": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          },
                          "score": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "points": {
                                    "type": "number"
                                  },
                                  "voto": {
                                    "oneOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "status": {
                                    "type": "string",
                                    "enum": [
                                      "provisional",
                                      "final",
                                      "corrected"
                                    ]
                                  },
                                  "breakdown": {
                                    "type": "object",
                                    "additionalProperties": true
                                  },
                                  "substitution": {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "none",
                                          "same_role",
                                          "out_of_position"
                                        ]
                                      },
                                      "replaced_player_id": {
                                        "oneOf": [
                                          {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "replaced_player_id"
                                    ]
                                  }
                                },
                                "required": [
                                  "points",
                                  "voto",
                                  "status",
                                  "breakdown",
                                  "substitution"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          }
                        },
                        "required": [
                          "player_id",
                          "display_name",
                          "role",
                          "shirt_number"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "formation_string": {
                    "type": "string"
                  },
                  "locked_player_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "locked_at": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "date-time"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "scored_round_id": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "team_round_points": {
                    "oneOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "team_round_breakdown": {
                    "oneOf": [
                      {
                        "type": "object",
                        "additionalProperties": true
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "round_id",
                  "starting_player_ids",
                  "starting_players",
                  "bench_player_ids",
                  "bench_players",
                  "captain_player_id",
                  "captain_player",
                  "locked_at",
                  "scored_round_id",
                  "team_round_points",
                  "team_round_breakdown"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "market_open": {
            "type": "boolean"
          },
          "market_closes_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "market_state": {
            "type": "string",
            "enum": [
              "auto",
              "open",
              "closed"
            ],
            "default": "auto"
          },
          "market_state_clock_open": {
            "type": "boolean",
            "default": true
          },
          "market_window_opened_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "active_round": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "round_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "label": {
                    "type": "string"
                  },
                  "deadline_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "locked": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "round_id",
                  "label",
                  "deadline_at",
                  "locked"
                ]
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "current_round": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "round_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "label": {
                    "type": "string"
                  },
                  "deadline_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "locked": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "round_id",
                  "label",
                  "deadline_at",
                  "locked"
                ]
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "current_round_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "lineup_configuration": {
            "type": "object",
            "properties": {
              "ruleset_version": {
                "type": "integer",
                "minimum": 1
              },
              "composition": {
                "type": "object",
                "properties": {
                  "squad_size": {
                    "type": "integer",
                    "exclusiveMinimum": 0
                  },
                  "role_quota": {
                    "type": "object",
                    "properties": {
                      "GK": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "DEF": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "MID": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "FWD": {
                        "type": "integer",
                        "minimum": 0
                      }
                    },
                    "required": [
                      "GK",
                      "DEF",
                      "MID",
                      "FWD"
                    ],
                    "additionalProperties": false
                  },
                  "formation": {
                    "type": "object",
                    "properties": {
                      "GK": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "DEF": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "MID": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "FWD": {
                        "type": "integer",
                        "minimum": 0
                      }
                    },
                    "required": [
                      "GK",
                      "DEF",
                      "MID",
                      "FWD"
                    ],
                    "additionalProperties": false
                  },
                  "formation_string": {
                    "type": "string",
                    "pattern": "^1-\\d-\\d-\\d$"
                  },
                  "available_formations": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "formation_string": {
                          "type": "string",
                          "pattern": "^1-\\d-\\d-\\d$"
                        },
                        "formation": {
                          "type": "object",
                          "properties": {
                            "GK": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "DEF": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "MID": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "FWD": {
                              "type": "integer",
                              "minimum": 0
                            }
                          },
                          "required": [
                            "GK",
                            "DEF",
                            "MID",
                            "FWD"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "formation_string",
                        "formation"
                      ],
                      "additionalProperties": false
                    },
                    "minItems": 1
                  },
                  "bench": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "required": [
                  "squad_size",
                  "role_quota",
                  "formation",
                  "bench"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "ruleset_version",
              "composition"
            ]
          }
        },
        "required": [
          "team",
          "roster",
          "scores",
          "orders",
          "latest_lineup",
          "market_open",
          "market_closes_at"
        ]
      },
      "SubmitFantasyLineupRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "round_id",
          "starting_player_ids",
          "bench_player_ids",
          "captain_player_id"
        ],
        "properties": {
          "intent": {
            "type": "string",
            "enum": [
              "draft",
              "submit"
            ],
            "default": "submit"
          },
          "round_id": {
            "type": "string",
            "format": "uuid"
          },
          "starting_player_ids": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "bench_player_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "captain_player_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "vice_player_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "formation_string": {
            "type": "string",
            "minLength": 1
          },
          "operation_id": {
            "type": "string",
            "minLength": 8,
            "maxLength": 200
          },
          "expected_draft_revision": {
            "oneOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "SubmitFantasyLineupResponse": {
        "type": "object",
        "properties": {
          "lineup": {
            "type": "object",
            "properties": {
              "round_id": {
                "type": "string",
                "format": "uuid"
              },
              "starting_player_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "starting_players": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "player_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "display_name": {
                      "type": "string"
                    },
                    "role": {
                      "oneOf": [
                        {
                          "type": "string",
                          "enum": [
                            "GK",
                            "DEF",
                            "MID",
                            "FWD"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "shirt_number": {
                      "oneOf": [
                        {
                          "type": "integer"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "public_slug": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "default": null
                    },
                    "score": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "points": {
                              "type": "number"
                            },
                            "voto": {
                              "oneOf": [
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "provisional",
                                "final",
                                "corrected"
                              ]
                            },
                            "breakdown": {
                              "type": "object",
                              "additionalProperties": true
                            },
                            "substitution": {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "none",
                                    "same_role",
                                    "out_of_position"
                                  ]
                                },
                                "replaced_player_id": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "kind",
                                "replaced_player_id"
                              ]
                            }
                          },
                          "required": [
                            "points",
                            "voto",
                            "status",
                            "breakdown",
                            "substitution"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "default": null
                    }
                  },
                  "required": [
                    "player_id",
                    "display_name",
                    "role",
                    "shirt_number"
                  ]
                }
              },
              "bench_player_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "bench_players": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "player_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "display_name": {
                      "type": "string"
                    },
                    "role": {
                      "oneOf": [
                        {
                          "type": "string",
                          "enum": [
                            "GK",
                            "DEF",
                            "MID",
                            "FWD"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "shirt_number": {
                      "oneOf": [
                        {
                          "type": "integer"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "public_slug": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "default": null
                    },
                    "score": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "points": {
                              "type": "number"
                            },
                            "voto": {
                              "oneOf": [
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "provisional",
                                "final",
                                "corrected"
                              ]
                            },
                            "breakdown": {
                              "type": "object",
                              "additionalProperties": true
                            },
                            "substitution": {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "none",
                                    "same_role",
                                    "out_of_position"
                                  ]
                                },
                                "replaced_player_id": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "format": "uuid"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "kind",
                                "replaced_player_id"
                              ]
                            }
                          },
                          "required": [
                            "points",
                            "voto",
                            "status",
                            "breakdown",
                            "substitution"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "default": null
                    }
                  },
                  "required": [
                    "player_id",
                    "display_name",
                    "role",
                    "shirt_number"
                  ]
                }
              },
              "captain_player_id": {
                "type": "string",
                "format": "uuid"
              },
              "captain_player": {
                "type": "object",
                "properties": {
                  "player_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "display_name": {
                    "type": "string"
                  },
                  "role": {
                    "oneOf": [
                      {
                        "type": "string",
                        "enum": [
                          "GK",
                          "DEF",
                          "MID",
                          "FWD"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "shirt_number": {
                    "oneOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "public_slug": {
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "score": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "points": {
                            "type": "number"
                          },
                          "voto": {
                            "oneOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "provisional",
                              "final",
                              "corrected"
                            ]
                          },
                          "breakdown": {
                            "type": "object",
                            "additionalProperties": true
                          },
                          "substitution": {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "none",
                                  "same_role",
                                  "out_of_position"
                                ]
                              },
                              "replaced_player_id": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "kind",
                              "replaced_player_id"
                            ]
                          }
                        },
                        "required": [
                          "points",
                          "voto",
                          "status",
                          "breakdown",
                          "substitution"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  }
                },
                "required": [
                  "player_id",
                  "display_name",
                  "role",
                  "shirt_number"
                ]
              },
              "vice_player_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null
              },
              "vice_player": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "player_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "display_name": {
                        "type": "string"
                      },
                      "role": {
                        "oneOf": [
                          {
                            "type": "string",
                            "enum": [
                              "GK",
                              "DEF",
                              "MID",
                              "FWD"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "shirt_number": {
                        "oneOf": [
                          {
                            "type": "integer"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "public_slug": {
                        "oneOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "default": null
                      },
                      "score": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "points": {
                                "type": "number"
                              },
                              "voto": {
                                "oneOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "provisional",
                                  "final",
                                  "corrected"
                                ]
                              },
                              "breakdown": {
                                "type": "object",
                                "additionalProperties": true
                              },
                              "substitution": {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "none",
                                      "same_role",
                                      "out_of_position"
                                    ]
                                  },
                                  "replaced_player_id": {
                                    "oneOf": [
                                      {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "kind",
                                  "replaced_player_id"
                                ]
                              }
                            },
                            "required": [
                              "points",
                              "voto",
                              "status",
                              "breakdown",
                              "substitution"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "default": null
                      }
                    },
                    "required": [
                      "player_id",
                      "display_name",
                      "role",
                      "shirt_number"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null
              },
              "formation_string": {
                "type": "string"
              },
              "locked_player_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "locked_at": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "scored_round_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "team_round_points": {
                "oneOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "team_round_breakdown": {
                "oneOf": [
                  {
                    "type": "object",
                    "additionalProperties": true
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "round_id",
              "starting_player_ids",
              "starting_players",
              "bench_player_ids",
              "bench_players",
              "captain_player_id",
              "captain_player",
              "locked_at",
              "scored_round_id",
              "team_round_points",
              "team_round_breakdown"
            ]
          }
        },
        "required": [
          "lineup"
        ]
      },
      "SubmitFantasyMarketOrderRequest": {
        "type": "object",
        "properties": {
          "idempotency_key": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "kind": {
            "type": "string",
            "enum": [
              "buy",
              "sell",
              "swap"
            ]
          },
          "player_in_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "player_out_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "proposed_price": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "idempotency_key",
          "kind",
          "player_in_id",
          "player_out_id"
        ],
        "additionalProperties": false
      },
      "CancelFantasyMarketOrderRequest": {
        "type": "object",
        "properties": {
          "idempotency_key": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          }
        },
        "required": [
          "idempotency_key"
        ],
        "additionalProperties": false
      },
      "PublishOwnedLeagueRulesRequest": {
        "type": "object",
        "properties": {
          "initial_budget": {
            "type": "integer",
            "minimum": 0
          },
          "weights": {
            "type": "object",
            "additionalProperties": true
          },
          "captain_multiplier": {
            "type": "number",
            "minimum": 1,
            "maximum": 3
          },
          "rating_weight": {
            "type": "number",
            "minimum": 0,
            "maximum": 5
          },
          "mvp_bonus": {
            "type": "number",
            "minimum": 0,
            "maximum": 10
          },
          "lineup_lock_policy": {
            "type": "string",
            "enum": [
              "global_deadline",
              "progressive_lock"
            ]
          },
          "available_formations": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "formation_string": {
                  "type": "string",
                  "pattern": "^1-\\d-\\d-\\d$"
                },
                "formation": {
                  "type": "object",
                  "properties": {
                    "GK": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "DEF": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "MID": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "FWD": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "GK",
                    "DEF",
                    "MID",
                    "FWD"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "formation_string",
                "formation"
              ],
              "additionalProperties": false
            },
            "minItems": 1
          },
          "transfer_window": {
            "type": "object",
            "properties": {
              "close_buffer_minutes": {
                "type": "integer",
                "minimum": 0,
                "maximum": 1440
              },
              "max_transfers_per_window": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 99
              },
              "sell_recovery_fraction": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "initial_build_exempt": {
                "type": "boolean"
              },
              "trade_review": {
                "type": "string",
                "enum": [
                  "none",
                  "commissioner"
                ]
              },
              "trades_count_as_transfers": {
                "type": "boolean"
              },
              "trade_deadline_rounds_before_end": {
                "type": "integer",
                "minimum": 0,
                "maximum": 38
              }
            },
            "required": [],
            "additionalProperties": false
          }
        },
        "required": [],
        "additionalProperties": false
      },
      "PublishOwnedLeagueRulesResponse": {
        "type": "object",
        "properties": {
          "version": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "revision_id": {
            "type": "string",
            "format": "uuid"
          },
          "content_hash": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "previous_ruleset_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "activated_at": {
            "type": "string",
            "format": "date-time"
          },
          "initial_budget": {
            "type": "integer",
            "minimum": 0
          },
          "weights": {
            "type": "object",
            "additionalProperties": true
          },
          "captain_multiplier": {
            "type": "number"
          },
          "rating_weight": {
            "type": "number"
          },
          "performance_source": {
            "type": "string",
            "enum": [
              "evaluator_rating",
              "evaluator_vote",
              "automatic_participation"
            ],
            "default": "evaluator_rating"
          },
          "participation_baseline": {
            "type": "number",
            "minimum": 0,
            "maximum": 10,
            "default": 0
          },
          "mvp_bonus": {
            "type": "number"
          },
          "auto_substitution_limit": {
            "oneOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "composition": {
            "type": "object",
            "properties": {
              "squad_size": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "role_quota": {
                "type": "object",
                "properties": {
                  "GK": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "DEF": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "MID": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "FWD": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "required": [
                  "GK",
                  "DEF",
                  "MID",
                  "FWD"
                ],
                "additionalProperties": false
              },
              "formation": {
                "type": "object",
                "properties": {
                  "GK": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "DEF": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "MID": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "FWD": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "required": [
                  "GK",
                  "DEF",
                  "MID",
                  "FWD"
                ],
                "additionalProperties": false
              },
              "formation_string": {
                "type": "string",
                "pattern": "^1-\\d-\\d-\\d$"
              },
              "available_formations": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "formation_string": {
                      "type": "string",
                      "pattern": "^1-\\d-\\d-\\d$"
                    },
                    "formation": {
                      "type": "object",
                      "properties": {
                        "GK": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "DEF": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "MID": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "FWD": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "GK",
                        "DEF",
                        "MID",
                        "FWD"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "formation_string",
                    "formation"
                  ],
                  "additionalProperties": false
                },
                "minItems": 1
              },
              "bench": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "squad_size",
              "role_quota",
              "formation",
              "bench"
            ],
            "additionalProperties": false
          },
          "lineup_lock_policy": {
            "type": "string",
            "enum": [
              "global_deadline",
              "progressive_lock"
            ]
          },
          "transfer_window": {
            "type": "object",
            "properties": {
              "closes_at": {
                "type": "string",
                "enum": [
                  "round_deadline"
                ]
              },
              "close_buffer_minutes": {
                "type": "integer",
                "minimum": 0,
                "default": 0
              },
              "max_transfers_per_window": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "default": 3
              },
              "sell_recovery_fraction": {
                "type": "number",
                "minimum": 0,
                "maximum": 1,
                "default": 0.5
              },
              "initial_build_exempt": {
                "type": "boolean"
              },
              "trade_review": {
                "type": "string",
                "enum": [
                  "none",
                  "commissioner"
                ]
              },
              "trades_count_as_transfers": {
                "type": "boolean"
              },
              "trade_deadline_rounds_before_end": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "closes_at"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "version",
          "revision_id",
          "previous_ruleset_id",
          "activated_at",
          "initial_budget",
          "weights",
          "captain_multiplier",
          "rating_weight",
          "mvp_bonus",
          "composition",
          "lineup_lock_policy",
          "transfer_window"
        ]
      },
      "SetFantasyMarketStateRequest": {
        "type": "object",
        "properties": {
          "market_state": {
            "type": "string",
            "enum": [
              "auto",
              "open",
              "closed"
            ]
          }
        },
        "required": [
          "market_state"
        ],
        "additionalProperties": false
      },
      "AdminArchiveFantasyLeagueRequest": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string",
            "minLength": 3,
            "maxLength": 500
          }
        },
        "required": [
          "reason"
        ],
        "additionalProperties": false
      },
      "AdminCreateFantasyLeagueRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "tournament_id": {
            "type": "string",
            "format": "uuid"
          },
          "starts_on": {
            "type": "string",
            "format": "date"
          },
          "ends_on": {
            "type": "string",
            "format": "date"
          },
          "format": {
            "type": "string",
            "enum": [
              "total_points",
              "head_to_head"
            ]
          }
        },
        "required": [
          "name",
          "tournament_id",
          "starts_on",
          "ends_on"
        ],
        "additionalProperties": false
      },
      "SetFantasyMarketStateResponse": {
        "type": "object",
        "properties": {
          "league": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "tournament_id": {
                "type": "string",
                "format": "uuid"
              },
              "name": {
                "type": "string"
              },
              "visibility": {
                "type": "string",
                "enum": [
                  "public",
                  "private"
                ]
              },
              "format": {
                "type": "string",
                "enum": [
                  "total_points",
                  "head_to_head"
                ],
                "default": "total_points"
              },
              "starts_on": {
                "type": "string"
              },
              "ends_on": {
                "type": "string"
              },
              "is_owner": {
                "type": "boolean"
              },
              "archived": {
                "type": "boolean"
              }
            },
            "required": [
              "id",
              "tournament_id",
              "name",
              "visibility",
              "starts_on",
              "ends_on",
              "is_owner"
            ]
          },
          "market_open": {
            "type": "boolean"
          },
          "market_closes_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "market_state": {
            "type": "string",
            "enum": [
              "auto",
              "open",
              "closed"
            ]
          },
          "market_state_clock_open": {
            "type": "boolean"
          },
          "market_window_opened_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "ruleset_capability": {
            "type": "object",
            "properties": {
              "state": {
                "type": "string",
                "enum": [
                  "enabled",
                  "disabled"
                ]
              },
              "reason": {
                "oneOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "recovery": {
                "type": "string"
              }
            },
            "required": [
              "state",
              "reason"
            ]
          },
          "market_rules": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "ruleset_revision_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "ruleset_version": {
                    "type": "integer",
                    "exclusiveMinimum": 0
                  },
                  "close_buffer_minutes": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "max_transfers_per_window": {
                    "type": "integer",
                    "exclusiveMinimum": 0
                  },
                  "sell_recovery_fraction": {
                    "type": "number"
                  },
                  "initial_build_exempt": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "ruleset_revision_id",
                  "ruleset_version",
                  "close_buffer_minutes",
                  "max_transfers_per_window",
                  "sell_recovery_fraction",
                  "initial_build_exempt"
                ]
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "league",
          "market_open",
          "market_closes_at",
          "market_state",
          "market_state_clock_open",
          "market_window_opened_at",
          "ruleset_capability",
          "market_rules"
        ]
      },
      "AdminSetFantasyMarketStateResponse": {
        "type": "object",
        "properties": {
          "league_id": {
            "type": "string",
            "format": "uuid"
          },
          "market_state": {
            "type": "string",
            "enum": [
              "auto",
              "open",
              "closed"
            ]
          },
          "market_open": {
            "type": "boolean"
          },
          "market_closes_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "market_state_clock_open": {
            "type": "boolean"
          }
        },
        "required": [
          "league_id",
          "market_state",
          "market_open",
          "market_closes_at",
          "market_state_clock_open"
        ]
      },
      "FantasyMarketOrderResponse": {
        "type": "object",
        "properties": {
          "order": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "fantasy_team_id": {
                "type": "string",
                "format": "uuid"
              },
              "idempotency_key": {
                "type": "string"
              },
              "kind": {
                "type": "string",
                "enum": [
                  "buy",
                  "sell",
                  "swap",
                  "trade"
                ]
              },
              "player_in_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "player_out_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "proposed_price": {
                "type": "number"
              },
              "status": {
                "type": "string",
                "enum": [
                  "pending",
                  "accepted",
                  "rejected",
                  "cancelled",
                  "countered",
                  "in_review",
                  "expired"
                ]
              },
              "submitted_at": {
                "type": "string",
                "format": "date-time"
              },
              "decided_at": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "decision_reason": {
                "oneOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "executed_price": {
                "oneOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null
              },
              "resulting_transaction_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null
              },
              "budget_after": {
                "oneOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null
              },
              "counterparty_team_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null
              },
              "counterparty_team_name": {
                "oneOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null
              },
              "proposer_team_name": {
                "oneOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null
              },
              "recipient_team_name": {
                "oneOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null
              },
              "players_out": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                },
                "default": []
              },
              "players_in": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                },
                "default": []
              },
              "credits_delta": {
                "type": "integer",
                "default": 0
              },
              "message_preset": {
                "type": "string",
                "enum": [
                  "none",
                  "che_ne_dici",
                  "mi_serve_un_portiere",
                  "mi_serve_un_difensore",
                  "mi_serve_un_centrocampista",
                  "mi_serve_un_attaccante",
                  "scambio_alla_pari",
                  "ultima_offerta"
                ],
                "default": "none"
              },
              "expires_at": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null
              },
              "counter_of_order_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null
              },
              "countered_by_order_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null
              },
              "review_mode": {
                "oneOf": [
                  {
                    "type": "string",
                    "enum": [
                      "none",
                      "commissioner"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null
              },
              "counterparty_transaction_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null
              }
            },
            "required": [
              "id",
              "fantasy_team_id",
              "idempotency_key",
              "kind",
              "player_in_id",
              "player_out_id",
              "proposed_price",
              "status",
              "submitted_at",
              "decided_at",
              "decision_reason"
            ]
          }
        },
        "required": [
          "order"
        ]
      },
      "ProposeFantasyTradeRequest": {
        "type": "object",
        "properties": {
          "idempotency_key": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "counterparty_team_id": {
            "type": "string",
            "format": "uuid"
          },
          "players_out": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "maxItems": 12
          },
          "players_in": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "maxItems": 12
          },
          "credits_delta": {
            "type": "integer",
            "minimum": -500,
            "maximum": 500
          },
          "message_preset": {
            "type": "string",
            "enum": [
              "none",
              "che_ne_dici",
              "mi_serve_un_portiere",
              "mi_serve_un_difensore",
              "mi_serve_un_centrocampista",
              "mi_serve_un_attaccante",
              "scambio_alla_pari",
              "ultima_offerta"
            ]
          }
        },
        "required": [
          "idempotency_key",
          "counterparty_team_id",
          "players_out",
          "players_in"
        ],
        "additionalProperties": false
      },
      "CounterFantasyTradeRequest": {
        "type": "object",
        "properties": {
          "idempotency_key": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "players_out": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "maxItems": 12
          },
          "players_in": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "maxItems": 12
          },
          "credits_delta": {
            "type": "integer",
            "minimum": -500,
            "maximum": 500
          },
          "message_preset": {
            "type": "string",
            "enum": [
              "none",
              "che_ne_dici",
              "mi_serve_un_portiere",
              "mi_serve_un_difensore",
              "mi_serve_un_centrocampista",
              "mi_serve_un_attaccante",
              "scambio_alla_pari",
              "ultima_offerta"
            ]
          }
        },
        "required": [
          "idempotency_key",
          "players_out",
          "players_in"
        ],
        "additionalProperties": false
      },
      "DecideFantasyTradeRequest": {
        "type": "object",
        "properties": {
          "idempotency_key": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          }
        },
        "required": [
          "idempotency_key"
        ],
        "additionalProperties": false
      },
      "ReviewFantasyTradeRequest": {
        "type": "object",
        "properties": {
          "decision": {
            "type": "string",
            "enum": [
              "approve",
              "reject"
            ]
          },
          "reason": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "decision"
        ],
        "additionalProperties": false
      },
      "FantasyTradeResponse": {
        "type": "object",
        "properties": {
          "order": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "fantasy_team_id": {
                "type": "string",
                "format": "uuid"
              },
              "idempotency_key": {
                "type": "string"
              },
              "kind": {
                "type": "string",
                "enum": [
                  "buy",
                  "sell",
                  "swap",
                  "trade"
                ]
              },
              "player_in_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "player_out_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "proposed_price": {
                "type": "number"
              },
              "status": {
                "type": "string",
                "enum": [
                  "pending",
                  "accepted",
                  "rejected",
                  "cancelled",
                  "countered",
                  "in_review",
                  "expired"
                ]
              },
              "submitted_at": {
                "type": "string",
                "format": "date-time"
              },
              "decided_at": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "decision_reason": {
                "oneOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "executed_price": {
                "oneOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null
              },
              "resulting_transaction_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null
              },
              "budget_after": {
                "oneOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null
              },
              "counterparty_team_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null
              },
              "counterparty_team_name": {
                "oneOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null
              },
              "proposer_team_name": {
                "oneOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null
              },
              "recipient_team_name": {
                "oneOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null
              },
              "players_out": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                },
                "default": []
              },
              "players_in": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                },
                "default": []
              },
              "credits_delta": {
                "type": "integer",
                "default": 0
              },
              "message_preset": {
                "type": "string",
                "enum": [
                  "none",
                  "che_ne_dici",
                  "mi_serve_un_portiere",
                  "mi_serve_un_difensore",
                  "mi_serve_un_centrocampista",
                  "mi_serve_un_attaccante",
                  "scambio_alla_pari",
                  "ultima_offerta"
                ],
                "default": "none"
              },
              "expires_at": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null
              },
              "counter_of_order_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null
              },
              "countered_by_order_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null
              },
              "review_mode": {
                "oneOf": [
                  {
                    "type": "string",
                    "enum": [
                      "none",
                      "commissioner"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null
              },
              "counterparty_transaction_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null
              }
            },
            "required": [
              "id",
              "fantasy_team_id",
              "idempotency_key",
              "kind",
              "player_in_id",
              "player_out_id",
              "proposed_price",
              "status",
              "submitted_at",
              "decided_at",
              "decision_reason"
            ]
          }
        },
        "required": [
          "order"
        ]
      },
      "FantasyLeagueMarketResponse": {
        "type": "object",
        "properties": {
          "league_id": {
            "type": "string",
            "format": "uuid"
          },
          "my_team_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "window": {
            "type": "object",
            "properties": {
              "open": {
                "type": "boolean"
              },
              "opened_at": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "closes_at": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "market_state": {
                "type": "string",
                "enum": [
                  "auto",
                  "open",
                  "closed"
                ]
              },
              "rounds_remaining": {
                "oneOf": [
                  {
                    "type": "integer",
                    "minimum": 0
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "open",
              "opened_at",
              "closes_at",
              "market_state",
              "rounds_remaining"
            ]
          },
          "trade_rules": {
            "type": "object",
            "properties": {
              "review": {
                "type": "string",
                "enum": [
                  "none",
                  "commissioner"
                ]
              },
              "counts_as_transfer": {
                "type": "boolean"
              },
              "deadline_rounds_before_end": {
                "type": "integer",
                "minimum": 0
              },
              "max_pending_offers": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "trading_open": {
                "type": "boolean"
              }
            },
            "required": [
              "review",
              "counts_as_transfer",
              "deadline_rounds_before_end",
              "max_pending_offers",
              "trading_open"
            ]
          },
          "received": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "fantasy_team_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "idempotency_key": {
                  "type": "string"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "buy",
                    "sell",
                    "swap",
                    "trade"
                  ]
                },
                "player_in_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "player_out_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "proposed_price": {
                  "type": "number"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "pending",
                    "accepted",
                    "rejected",
                    "cancelled",
                    "countered",
                    "in_review",
                    "expired"
                  ]
                },
                "submitted_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "decided_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "decision_reason": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "executed_price": {
                  "oneOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "resulting_transaction_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "budget_after": {
                  "oneOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "counterparty_team_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "counterparty_team_name": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "proposer_team_name": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "recipient_team_name": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "players_out": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "default": []
                },
                "players_in": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "default": []
                },
                "credits_delta": {
                  "type": "integer",
                  "default": 0
                },
                "message_preset": {
                  "type": "string",
                  "enum": [
                    "none",
                    "che_ne_dici",
                    "mi_serve_un_portiere",
                    "mi_serve_un_difensore",
                    "mi_serve_un_centrocampista",
                    "mi_serve_un_attaccante",
                    "scambio_alla_pari",
                    "ultima_offerta"
                  ],
                  "default": "none"
                },
                "expires_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "counter_of_order_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "countered_by_order_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "review_mode": {
                  "oneOf": [
                    {
                      "type": "string",
                      "enum": [
                        "none",
                        "commissioner"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "counterparty_transaction_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                }
              },
              "required": [
                "id",
                "fantasy_team_id",
                "idempotency_key",
                "kind",
                "player_in_id",
                "player_out_id",
                "proposed_price",
                "status",
                "submitted_at",
                "decided_at",
                "decision_reason"
              ]
            }
          },
          "sent": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "fantasy_team_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "idempotency_key": {
                  "type": "string"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "buy",
                    "sell",
                    "swap",
                    "trade"
                  ]
                },
                "player_in_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "player_out_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "proposed_price": {
                  "type": "number"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "pending",
                    "accepted",
                    "rejected",
                    "cancelled",
                    "countered",
                    "in_review",
                    "expired"
                  ]
                },
                "submitted_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "decided_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "decision_reason": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "executed_price": {
                  "oneOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "resulting_transaction_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "budget_after": {
                  "oneOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "counterparty_team_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "counterparty_team_name": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "proposer_team_name": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "recipient_team_name": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "players_out": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "default": []
                },
                "players_in": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "default": []
                },
                "credits_delta": {
                  "type": "integer",
                  "default": 0
                },
                "message_preset": {
                  "type": "string",
                  "enum": [
                    "none",
                    "che_ne_dici",
                    "mi_serve_un_portiere",
                    "mi_serve_un_difensore",
                    "mi_serve_un_centrocampista",
                    "mi_serve_un_attaccante",
                    "scambio_alla_pari",
                    "ultima_offerta"
                  ],
                  "default": "none"
                },
                "expires_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "counter_of_order_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "countered_by_order_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "review_mode": {
                  "oneOf": [
                    {
                      "type": "string",
                      "enum": [
                        "none",
                        "commissioner"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "counterparty_transaction_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                }
              },
              "required": [
                "id",
                "fantasy_team_id",
                "idempotency_key",
                "kind",
                "player_in_id",
                "player_out_id",
                "proposed_price",
                "status",
                "submitted_at",
                "decided_at",
                "decision_reason"
              ]
            }
          },
          "movements": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "transaction": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "fantasy_team_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "buy",
                        "sell",
                        "swap",
                        "trade_in",
                        "trade_out",
                        "reversal"
                      ]
                    },
                    "player_in_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "player_out_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "players_in": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "default": []
                    },
                    "players_out": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "default": []
                    },
                    "trade_order_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "default": null
                    },
                    "counterparty_transaction_id": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "default": null
                    },
                    "price": {
                      "type": "number"
                    },
                    "executed_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "reversed_at": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "reversal_reason": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "transfer_cap_exempt": {
                      "type": "boolean",
                      "default": false
                    }
                  },
                  "required": [
                    "id",
                    "fantasy_team_id",
                    "kind",
                    "player_in_id",
                    "player_out_id",
                    "price",
                    "executed_at",
                    "reversed_at",
                    "reversal_reason"
                  ]
                },
                "fantasy_team_label": {
                  "type": "string"
                }
              },
              "required": [
                "transaction",
                "fantasy_team_label"
              ]
            }
          },
          "team_labels": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "fantasy_team_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "label": {
                  "type": "string"
                }
              },
              "required": [
                "fantasy_team_id",
                "label"
              ]
            }
          },
          "review_queue": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "fantasy_team_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "idempotency_key": {
                  "type": "string"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "buy",
                    "sell",
                    "swap",
                    "trade"
                  ]
                },
                "player_in_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "player_out_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "proposed_price": {
                  "type": "number"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "pending",
                    "accepted",
                    "rejected",
                    "cancelled",
                    "countered",
                    "in_review",
                    "expired"
                  ]
                },
                "submitted_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "decided_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "decision_reason": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "executed_price": {
                  "oneOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "resulting_transaction_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "budget_after": {
                  "oneOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "counterparty_team_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "counterparty_team_name": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "proposer_team_name": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "recipient_team_name": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "players_out": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "default": []
                },
                "players_in": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "default": []
                },
                "credits_delta": {
                  "type": "integer",
                  "default": 0
                },
                "message_preset": {
                  "type": "string",
                  "enum": [
                    "none",
                    "che_ne_dici",
                    "mi_serve_un_portiere",
                    "mi_serve_un_difensore",
                    "mi_serve_un_centrocampista",
                    "mi_serve_un_attaccante",
                    "scambio_alla_pari",
                    "ultima_offerta"
                  ],
                  "default": "none"
                },
                "expires_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "counter_of_order_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "countered_by_order_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "review_mode": {
                  "oneOf": [
                    {
                      "type": "string",
                      "enum": [
                        "none",
                        "commissioner"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "counterparty_transaction_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                }
              },
              "required": [
                "id",
                "fantasy_team_id",
                "idempotency_key",
                "kind",
                "player_in_id",
                "player_out_id",
                "proposed_price",
                "status",
                "submitted_at",
                "decided_at",
                "decision_reason"
              ]
            },
            "default": []
          },
          "can_review": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "league_id",
          "my_team_id",
          "window",
          "trade_rules",
          "received",
          "sent",
          "movements",
          "team_labels"
        ]
      },
      "AdminReverseFantasyTransactionRequest": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          }
        },
        "required": [
          "reason"
        ],
        "additionalProperties": false
      },
      "AdminReverseFantasyTransactionResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "fantasy_team_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "buy",
                    "sell",
                    "swap",
                    "trade_in",
                    "trade_out",
                    "reversal"
                  ]
                },
                "player_in_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "player_out_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "players_in": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "default": []
                },
                "players_out": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "default": []
                },
                "trade_order_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "counterparty_transaction_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "price": {
                  "type": "number"
                },
                "executed_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "reversed_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "reversal_reason": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "transfer_cap_exempt": {
                  "type": "boolean",
                  "default": false
                }
              },
              "required": [
                "id",
                "fantasy_team_id",
                "kind",
                "player_in_id",
                "player_out_id",
                "price",
                "executed_at",
                "reversed_at",
                "reversal_reason"
              ]
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "CreateFantasyAuctionRequest": {
        "type": "object",
        "properties": {
          "league_id": {
            "type": "string",
            "format": "uuid"
          },
          "bid_duration_seconds": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 3600
          },
          "anti_snipe_seconds": {
            "type": "integer",
            "minimum": 0,
            "maximum": 600
          }
        },
        "required": [
          "league_id"
        ]
      },
      "CreateFantasyAuctionResponse": {
        "type": "object",
        "properties": {
          "auction": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "league_id": {
                "type": "string",
                "format": "uuid"
              },
              "status": {
                "type": "string",
                "enum": [
                  "lobby",
                  "nomination",
                  "bidding",
                  "sold",
                  "completed",
                  "cancelled"
                ]
              },
              "bid_duration_seconds": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "anti_snipe_seconds": {
                "type": "integer",
                "minimum": 0
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "started_at": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "completed_at": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "id",
              "league_id",
              "status",
              "bid_duration_seconds",
              "anti_snipe_seconds",
              "created_at",
              "started_at",
              "completed_at"
            ]
          },
          "state": {
            "type": "object",
            "properties": {
              "auction_id": {
                "type": "string",
                "format": "uuid"
              },
              "league_id": {
                "type": "string",
                "format": "uuid"
              },
              "status": {
                "type": "string",
                "enum": [
                  "lobby",
                  "nomination",
                  "bidding",
                  "sold",
                  "completed",
                  "cancelled"
                ]
              },
              "bid_duration_seconds": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "anti_snipe_seconds": {
                "type": "integer",
                "minimum": 0
              },
              "turn_seat": {
                "oneOf": [
                  {
                    "type": "integer",
                    "minimum": 0
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "turn_team_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "nomination_deadline_at": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "can_administer": {
                "type": "boolean"
              },
              "participants": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "fantasy_team_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "team_name": {
                      "type": "string"
                    },
                    "budget_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "slots_filled": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "seat": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "max_bid": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "fantasy_team_id",
                    "team_name",
                    "budget_remaining",
                    "slots_filled",
                    "seat",
                    "max_bid"
                  ]
                }
              },
              "current_lot": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "lot_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "seq": {
                        "type": "integer",
                        "exclusiveMinimum": 0
                      },
                      "player_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "role": {
                        "type": "string",
                        "enum": [
                          "GK",
                          "DEF",
                          "MID",
                          "FWD"
                        ]
                      },
                      "opening_price": {
                        "type": "integer",
                        "exclusiveMinimum": 0
                      },
                      "current_price": {
                        "type": "integer",
                        "exclusiveMinimum": 0
                      },
                      "current_winner_team_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "min_next_bid": {
                        "type": "integer",
                        "exclusiveMinimum": 0
                      },
                      "closes_at": {
                        "oneOf": [
                          {
                            "type": "string",
                            "format": "date-time"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "passed_team_ids": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "format": "uuid"
                        }
                      }
                    },
                    "required": [
                      "lot_id",
                      "seq",
                      "player_id",
                      "role",
                      "current_price",
                      "current_winner_team_id",
                      "min_next_bid",
                      "closes_at",
                      "passed_team_ids"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "bid_history": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "fantasy_team_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "team_name": {
                      "type": "string"
                    },
                    "amount": {
                      "type": "integer",
                      "exclusiveMinimum": 0
                    },
                    "placed_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "fantasy_team_id",
                    "team_name",
                    "amount",
                    "placed_at"
                  ]
                }
              },
              "all_squads_full": {
                "type": "boolean"
              },
              "revision": {
                "type": "integer",
                "minimum": 0
              },
              "at": {
                "type": "string",
                "format": "date-time"
              }
            },
            "required": [
              "auction_id",
              "league_id",
              "status",
              "bid_duration_seconds",
              "anti_snipe_seconds",
              "turn_seat",
              "turn_team_id",
              "participants",
              "current_lot",
              "all_squads_full",
              "at"
            ]
          }
        },
        "required": [
          "auction",
          "state"
        ]
      },
      "JoinFantasyAuctionRequest": {
        "type": "object",
        "properties": {
          "fantasy_team_id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "fantasy_team_id"
        ]
      },
      "NominateFantasyAuctionRequest": {
        "type": "object",
        "properties": {
          "fantasy_team_id": {
            "type": "string",
            "format": "uuid"
          },
          "player_id": {
            "type": "string",
            "format": "uuid"
          },
          "opening_price": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "fantasy_team_id",
          "player_id"
        ]
      },
      "PlaceFantasyAuctionBidRequest": {
        "type": "object",
        "properties": {
          "fantasy_team_id": {
            "type": "string",
            "format": "uuid"
          },
          "amount": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "idempotency_key": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "fantasy_team_id",
          "amount",
          "idempotency_key"
        ]
      },
      "PassFantasyAuctionRequest": {
        "type": "object",
        "properties": {
          "fantasy_team_id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "fantasy_team_id"
        ]
      },
      "CancelFantasyAuctionRequest": {
        "type": "object",
        "properties": {
          "reason": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": []
      },
      "SkipFantasyAuctionTurnRequest": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "FantasyAuctionActionResponse": {
        "type": "object",
        "properties": {
          "state": {
            "type": "object",
            "properties": {
              "auction_id": {
                "type": "string",
                "format": "uuid"
              },
              "league_id": {
                "type": "string",
                "format": "uuid"
              },
              "status": {
                "type": "string",
                "enum": [
                  "lobby",
                  "nomination",
                  "bidding",
                  "sold",
                  "completed",
                  "cancelled"
                ]
              },
              "bid_duration_seconds": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "anti_snipe_seconds": {
                "type": "integer",
                "minimum": 0
              },
              "turn_seat": {
                "oneOf": [
                  {
                    "type": "integer",
                    "minimum": 0
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "turn_team_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "nomination_deadline_at": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "can_administer": {
                "type": "boolean"
              },
              "participants": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "fantasy_team_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "team_name": {
                      "type": "string"
                    },
                    "budget_remaining": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "slots_filled": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "seat": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "max_bid": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "fantasy_team_id",
                    "team_name",
                    "budget_remaining",
                    "slots_filled",
                    "seat",
                    "max_bid"
                  ]
                }
              },
              "current_lot": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "lot_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "seq": {
                        "type": "integer",
                        "exclusiveMinimum": 0
                      },
                      "player_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "role": {
                        "type": "string",
                        "enum": [
                          "GK",
                          "DEF",
                          "MID",
                          "FWD"
                        ]
                      },
                      "opening_price": {
                        "type": "integer",
                        "exclusiveMinimum": 0
                      },
                      "current_price": {
                        "type": "integer",
                        "exclusiveMinimum": 0
                      },
                      "current_winner_team_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "min_next_bid": {
                        "type": "integer",
                        "exclusiveMinimum": 0
                      },
                      "closes_at": {
                        "oneOf": [
                          {
                            "type": "string",
                            "format": "date-time"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "passed_team_ids": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "format": "uuid"
                        }
                      }
                    },
                    "required": [
                      "lot_id",
                      "seq",
                      "player_id",
                      "role",
                      "current_price",
                      "current_winner_team_id",
                      "min_next_bid",
                      "closes_at",
                      "passed_team_ids"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "bid_history": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "fantasy_team_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "team_name": {
                      "type": "string"
                    },
                    "amount": {
                      "type": "integer",
                      "exclusiveMinimum": 0
                    },
                    "placed_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "fantasy_team_id",
                    "team_name",
                    "amount",
                    "placed_at"
                  ]
                }
              },
              "all_squads_full": {
                "type": "boolean"
              },
              "revision": {
                "type": "integer",
                "minimum": 0
              },
              "at": {
                "type": "string",
                "format": "date-time"
              }
            },
            "required": [
              "auction_id",
              "league_id",
              "status",
              "bid_duration_seconds",
              "anti_snipe_seconds",
              "turn_seat",
              "turn_team_id",
              "participants",
              "current_lot",
              "all_squads_full",
              "at"
            ]
          }
        },
        "required": [
          "state"
        ]
      },
      "FantasyAuctionParticipantView": {
        "type": "object",
        "properties": {
          "fantasy_team_id": {
            "type": "string",
            "format": "uuid"
          },
          "team_name": {
            "type": "string"
          },
          "budget_remaining": {
            "type": "integer",
            "minimum": 0
          },
          "slots_filled": {
            "type": "integer",
            "minimum": 0
          },
          "seat": {
            "type": "integer",
            "minimum": 0
          },
          "max_bid": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "fantasy_team_id",
          "team_name",
          "budget_remaining",
          "slots_filled",
          "seat",
          "max_bid"
        ]
      },
      "FantasyAuctionLotView": {
        "type": "object",
        "properties": {
          "lot_id": {
            "type": "string",
            "format": "uuid"
          },
          "seq": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "player_id": {
            "type": "string",
            "format": "uuid"
          },
          "role": {
            "type": "string",
            "enum": [
              "GK",
              "DEF",
              "MID",
              "FWD"
            ]
          },
          "opening_price": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "current_price": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "current_winner_team_id": {
            "type": "string",
            "format": "uuid"
          },
          "min_next_bid": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "closes_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "passed_team_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        },
        "required": [
          "lot_id",
          "seq",
          "player_id",
          "role",
          "current_price",
          "current_winner_team_id",
          "min_next_bid",
          "closes_at",
          "passed_team_ids"
        ]
      },
      "FantasyAuctionStateView": {
        "type": "object",
        "properties": {
          "auction_id": {
            "type": "string",
            "format": "uuid"
          },
          "league_id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "enum": [
              "lobby",
              "nomination",
              "bidding",
              "sold",
              "completed",
              "cancelled"
            ]
          },
          "bid_duration_seconds": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "anti_snipe_seconds": {
            "type": "integer",
            "minimum": 0
          },
          "turn_seat": {
            "oneOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "turn_team_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "nomination_deadline_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "can_administer": {
            "type": "boolean"
          },
          "participants": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "fantasy_team_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "team_name": {
                  "type": "string"
                },
                "budget_remaining": {
                  "type": "integer",
                  "minimum": 0
                },
                "slots_filled": {
                  "type": "integer",
                  "minimum": 0
                },
                "seat": {
                  "type": "integer",
                  "minimum": 0
                },
                "max_bid": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "required": [
                "fantasy_team_id",
                "team_name",
                "budget_remaining",
                "slots_filled",
                "seat",
                "max_bid"
              ]
            }
          },
          "current_lot": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "lot_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "seq": {
                    "type": "integer",
                    "exclusiveMinimum": 0
                  },
                  "player_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "role": {
                    "type": "string",
                    "enum": [
                      "GK",
                      "DEF",
                      "MID",
                      "FWD"
                    ]
                  },
                  "opening_price": {
                    "type": "integer",
                    "exclusiveMinimum": 0
                  },
                  "current_price": {
                    "type": "integer",
                    "exclusiveMinimum": 0
                  },
                  "current_winner_team_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "min_next_bid": {
                    "type": "integer",
                    "exclusiveMinimum": 0
                  },
                  "closes_at": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "date-time"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "passed_team_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                },
                "required": [
                  "lot_id",
                  "seq",
                  "player_id",
                  "role",
                  "current_price",
                  "current_winner_team_id",
                  "min_next_bid",
                  "closes_at",
                  "passed_team_ids"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "bid_history": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "fantasy_team_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "team_name": {
                  "type": "string"
                },
                "amount": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "placed_at": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "fantasy_team_id",
                "team_name",
                "amount",
                "placed_at"
              ]
            }
          },
          "all_squads_full": {
            "type": "boolean"
          },
          "revision": {
            "type": "integer",
            "minimum": 0
          },
          "at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "auction_id",
          "league_id",
          "status",
          "bid_duration_seconds",
          "anti_snipe_seconds",
          "turn_seat",
          "turn_team_id",
          "participants",
          "current_lot",
          "all_squads_full",
          "at"
        ]
      },
      "FantasyAuctionRoomView": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "league_id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "enum": [
              "lobby",
              "nomination",
              "bidding",
              "sold",
              "completed",
              "cancelled"
            ]
          },
          "bid_duration_seconds": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "anti_snipe_seconds": {
            "type": "integer",
            "minimum": 0
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "started_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "completed_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "league_id",
          "status",
          "bid_duration_seconds",
          "anti_snipe_seconds",
          "created_at",
          "started_at",
          "completed_at"
        ]
      },
      "FantasyAuctionSummaryView": {
        "type": "object",
        "properties": {
          "auction_id": {
            "type": "string",
            "format": "uuid"
          },
          "league_id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "enum": [
              "lobby",
              "nomination",
              "bidding",
              "sold",
              "completed",
              "cancelled"
            ]
          },
          "participants_count": {
            "type": "integer",
            "minimum": 0
          },
          "bid_duration_seconds": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "anti_snipe_seconds": {
            "type": "integer",
            "minimum": 0
          },
          "joined": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "started_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "completed_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "auction_id",
          "league_id",
          "status",
          "participants_count",
          "bid_duration_seconds",
          "anti_snipe_seconds",
          "joined",
          "created_at",
          "started_at",
          "completed_at"
        ]
      },
      "FantasyAuctionListResponse": {
        "type": "object",
        "properties": {
          "auctions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "auction_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "league_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "lobby",
                    "nomination",
                    "bidding",
                    "sold",
                    "completed",
                    "cancelled"
                  ]
                },
                "participants_count": {
                  "type": "integer",
                  "minimum": 0
                },
                "bid_duration_seconds": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "anti_snipe_seconds": {
                  "type": "integer",
                  "minimum": 0
                },
                "joined": {
                  "type": "boolean"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "started_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "completed_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "auction_id",
                "league_id",
                "status",
                "participants_count",
                "bid_duration_seconds",
                "anti_snipe_seconds",
                "joined",
                "created_at",
                "started_at",
                "completed_at"
              ]
            }
          },
          "can_create": {
            "type": "boolean"
          }
        },
        "required": [
          "auctions",
          "can_create"
        ]
      },
      "FantasyUpcomingRoundsResponse": {
        "type": "object",
        "properties": {
          "rounds": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "round_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "label": {
                  "type": "string"
                },
                "kickoff_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "deadline_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "locked": {
                  "type": "boolean"
                },
                "fixture_count": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "required": [
                "round_id",
                "label",
                "kickoff_at",
                "deadline_at",
                "locked",
                "fixture_count"
              ]
            }
          },
          "current_round": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "round_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "label": {
                    "type": "string"
                  },
                  "deadline_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "locked": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "round_id",
                  "label",
                  "deadline_at",
                  "locked"
                ]
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "current_round_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "default": null
          }
        },
        "required": [
          "rounds"
        ]
      },
      "FantasyRuleSetView": {
        "type": "object",
        "properties": {
          "revision_id": {
            "type": "string",
            "format": "uuid"
          },
          "version": {
            "type": "integer",
            "minimum": 1
          },
          "content_hash": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "lifecycle_status": {
            "type": "string",
            "enum": [
              "published"
            ]
          },
          "previous_ruleset_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "effective_from_round_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "activated_at": {
            "type": "string",
            "format": "date-time"
          },
          "weights": {
            "type": "object",
            "additionalProperties": true
          },
          "captain_multiplier": {
            "type": "number"
          },
          "captain_mode": {
            "type": "string",
            "enum": [
              "double",
              "modifier"
            ],
            "default": "double"
          },
          "rating_weight": {
            "type": "number"
          },
          "performance_source": {
            "type": "string",
            "enum": [
              "evaluator_rating",
              "evaluator_vote",
              "automatic_participation"
            ],
            "default": "evaluator_rating"
          },
          "participation_baseline": {
            "type": "number",
            "minimum": 0,
            "maximum": 10,
            "default": 0
          },
          "mvp_bonus": {
            "type": "number"
          },
          "auto_substitution_limit": {
            "oneOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "initial_budget": {
            "type": "integer",
            "minimum": 0
          },
          "composition": {
            "type": "object",
            "properties": {
              "squad_size": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "role_quota": {
                "type": "object",
                "properties": {
                  "GK": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "DEF": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "MID": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "FWD": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "required": [
                  "GK",
                  "DEF",
                  "MID",
                  "FWD"
                ],
                "additionalProperties": false
              },
              "formation": {
                "type": "object",
                "properties": {
                  "GK": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "DEF": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "MID": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "FWD": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "required": [
                  "GK",
                  "DEF",
                  "MID",
                  "FWD"
                ],
                "additionalProperties": false
              },
              "formation_string": {
                "type": "string",
                "pattern": "^1-\\d-\\d-\\d$"
              },
              "available_formations": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "formation_string": {
                      "type": "string",
                      "pattern": "^1-\\d-\\d-\\d$"
                    },
                    "formation": {
                      "type": "object",
                      "properties": {
                        "GK": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "DEF": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "MID": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "FWD": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "GK",
                        "DEF",
                        "MID",
                        "FWD"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "formation_string",
                    "formation"
                  ],
                  "additionalProperties": false
                },
                "minItems": 1
              },
              "bench": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "squad_size",
              "role_quota",
              "formation",
              "bench"
            ],
            "additionalProperties": false
          },
          "lineup_lock_policy": {
            "type": "string",
            "enum": [
              "global_deadline",
              "progressive_lock"
            ],
            "default": "global_deadline"
          },
          "transfer_window": {
            "type": "object",
            "properties": {
              "closes_at": {
                "type": "string",
                "enum": [
                  "round_deadline"
                ]
              },
              "close_buffer_minutes": {
                "type": "integer",
                "minimum": 0,
                "default": 0
              },
              "max_transfers_per_window": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "default": 3
              },
              "sell_recovery_fraction": {
                "type": "number",
                "minimum": 0,
                "maximum": 1,
                "default": 0.5
              },
              "initial_build_exempt": {
                "type": "boolean"
              },
              "trade_review": {
                "type": "string",
                "enum": [
                  "none",
                  "commissioner"
                ]
              },
              "trades_count_as_transfers": {
                "type": "boolean"
              },
              "trade_deadline_rounds_before_end": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "closes_at"
            ],
            "additionalProperties": false
          },
          "defense_modifier": {
            "type": "object",
            "properties": {
              "requires": {
                "type": "object",
                "properties": {
                  "GK": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "DEF": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "required": [
                  "GK",
                  "DEF"
                ]
              },
              "bands": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "min_average": {
                      "type": "number"
                    },
                    "bonus": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "min_average",
                    "bonus"
                  ]
                },
                "minItems": 1
              },
              "source": {
                "type": "string",
                "enum": [
                  "platform_default",
                  "league_ruleset"
                ]
              }
            },
            "required": [
              "requires",
              "bands",
              "source"
            ]
          }
        },
        "required": [
          "revision_id",
          "version",
          "content_hash",
          "lifecycle_status",
          "previous_ruleset_id",
          "effective_from_round_id",
          "activated_at",
          "weights",
          "captain_multiplier",
          "rating_weight",
          "mvp_bonus",
          "initial_budget",
          "composition",
          "transfer_window"
        ]
      },
      "FantasyAutoPickResponse": {
        "type": "object",
        "properties": {
          "squad": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "player_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "display_name": {
                  "type": "string"
                },
                "role": {
                  "oneOf": [
                    {
                      "type": "string",
                      "enum": [
                        "GK",
                        "DEF",
                        "MID",
                        "FWD"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "shirt_number": {
                  "oneOf": [
                    {
                      "type": "integer"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "team_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "team_display_name": {
                  "type": "string"
                },
                "current_value": {
                  "type": "integer",
                  "minimum": 0
                },
                "owned_by_me": {
                  "type": "boolean"
                },
                "owned_in_league": {
                  "type": "boolean"
                },
                "owner_team_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "owner_team_name": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "stats": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "matches_played": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "goals": {
                          "oneOf": [
                            {
                              "type": "integer",
                              "minimum": 0
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "assists": {
                          "oneOf": [
                            {
                              "type": "integer",
                              "minimum": 0
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "cards": {
                          "oneOf": [
                            {
                              "type": "integer",
                              "minimum": 0
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "points_to_date": {
                          "type": "number"
                        },
                        "last_round_points": {
                          "oneOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "matches_played",
                        "goals",
                        "assists",
                        "cards",
                        "points_to_date",
                        "last_round_points"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "public_slug": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                }
              },
              "required": [
                "player_id",
                "display_name",
                "role",
                "shirt_number",
                "team_id",
                "team_display_name",
                "current_value",
                "owned_by_me",
                "owned_in_league"
              ]
            }
          },
          "total_value": {
            "type": "integer",
            "minimum": 0
          },
          "budget": {
            "type": "integer",
            "minimum": 0
          },
          "open_slots": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "squad",
          "total_value",
          "budget"
        ]
      },
      "FantasyH2HStandingsResponse": {
        "type": "object",
        "properties": {
          "league": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "tournament_id": {
                "type": "string",
                "format": "uuid"
              },
              "name": {
                "type": "string"
              },
              "visibility": {
                "type": "string",
                "enum": [
                  "public",
                  "private"
                ]
              },
              "format": {
                "type": "string",
                "enum": [
                  "total_points",
                  "head_to_head"
                ],
                "default": "total_points"
              },
              "starts_on": {
                "type": "string"
              },
              "ends_on": {
                "type": "string"
              },
              "is_owner": {
                "type": "boolean"
              },
              "archived": {
                "type": "boolean"
              }
            },
            "required": [
              "id",
              "tournament_id",
              "name",
              "visibility",
              "starts_on",
              "ends_on",
              "is_owner"
            ]
          },
          "format": {
            "type": "string",
            "enum": [
              "total_points",
              "head_to_head"
            ],
            "default": "total_points"
          },
          "h2h_available": {
            "type": "boolean",
            "default": false
          },
          "standings": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "fantasy_team_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "display_name": {
                  "type": "string"
                },
                "position": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "played": {
                  "type": "integer",
                  "minimum": 0
                },
                "wins": {
                  "type": "integer",
                  "minimum": 0
                },
                "draws": {
                  "type": "integer",
                  "minimum": 0
                },
                "losses": {
                  "type": "integer",
                  "minimum": 0
                },
                "goals_for": {
                  "type": "integer",
                  "minimum": 0
                },
                "goals_against": {
                  "type": "integer",
                  "minimum": 0
                },
                "goal_difference": {
                  "type": "integer"
                },
                "points": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "required": [
                "fantasy_team_id",
                "display_name",
                "position",
                "played",
                "wins",
                "draws",
                "losses",
                "goals_for",
                "goals_against",
                "goal_difference",
                "points"
              ]
            }
          },
          "fixtures": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "round_index": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "round_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "leg_index": {
                  "oneOf": [
                    {
                      "type": "number",
                      "enum": [
                        1
                      ]
                    },
                    {
                      "type": "number",
                      "enum": [
                        2
                      ]
                    }
                  ]
                },
                "home_team_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "away_team_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "home_team_label": {
                  "type": "string"
                },
                "away_team_label": {
                  "type": "string"
                },
                "home_goals": {
                  "oneOf": [
                    {
                      "type": "integer",
                      "minimum": 0
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "away_goals": {
                  "oneOf": [
                    {
                      "type": "integer",
                      "minimum": 0
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "played": {
                  "type": "boolean"
                }
              },
              "required": [
                "round_index",
                "leg_index",
                "home_team_id",
                "away_team_id",
                "home_team_label",
                "away_team_label",
                "home_goals",
                "away_goals",
                "played"
              ]
            }
          },
          "authority": {
            "type": "object",
            "properties": {
              "state": {
                "type": "string",
                "enum": [
                  "available",
                  "not_applicable"
                ]
              },
              "reason": {
                "oneOf": [
                  {
                    "type": "string",
                    "enum": [
                      "league_format_total_points",
                      "h2h_not_configured"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "message": {
                "oneOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null
              },
              "alternative": {
                "oneOf": [
                  {
                    "type": "string",
                    "enum": [
                      "points_leaderboard"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null
              }
            },
            "required": [
              "state",
              "reason"
            ]
          },
          "conversion": {
            "type": "object",
            "properties": {
              "first_goal_threshold": {
                "type": "number"
              },
              "gap": {
                "type": "number"
              }
            },
            "required": [
              "first_goal_threshold",
              "gap"
            ]
          }
        },
        "required": [
          "league",
          "standings",
          "fixtures",
          "authority",
          "conversion"
        ]
      },
      "FantasyLeagueTeamsResponse": {
        "type": "object",
        "properties": {
          "league": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "tournament_id": {
                "type": "string",
                "format": "uuid"
              },
              "name": {
                "type": "string"
              },
              "visibility": {
                "type": "string",
                "enum": [
                  "public",
                  "private"
                ]
              },
              "format": {
                "type": "string",
                "enum": [
                  "total_points",
                  "head_to_head"
                ],
                "default": "total_points"
              },
              "starts_on": {
                "type": "string"
              },
              "ends_on": {
                "type": "string"
              },
              "is_owner": {
                "type": "boolean"
              },
              "archived": {
                "type": "boolean"
              }
            },
            "required": [
              "id",
              "tournament_id",
              "name",
              "visibility",
              "starts_on",
              "ends_on",
              "is_owner"
            ]
          },
          "teams": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "fantasy_team_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "name": {
                  "type": "string"
                },
                "is_mine": {
                  "type": "boolean"
                },
                "total_points": {
                  "oneOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "rounds_played": {
                  "oneOf": [
                    {
                      "type": "integer",
                      "minimum": 0
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "position": {
                  "oneOf": [
                    {
                      "type": "integer",
                      "exclusiveMinimum": 0
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "forfeit_rounds": {
                  "oneOf": [
                    {
                      "type": "integer",
                      "minimum": 0
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "manager_display_name": {
                  "oneOf": [
                    {
                      "type": "string",
                      "minLength": 1
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "fantasy_team_id",
                "name",
                "is_mine",
                "total_points",
                "rounds_played",
                "position",
                "forfeit_rounds",
                "manager_display_name"
              ]
            }
          },
          "standings_state": {
            "type": "string",
            "enum": [
              "empty",
              "provisional",
              "stale",
              "superseded",
              "final"
            ]
          },
          "manager_identity": {
            "type": "object",
            "properties": {
              "state": {
                "type": "string",
                "enum": [
                  "enabled",
                  "platform_default",
                  "disabled"
                ]
              },
              "reason": {
                "type": "string",
                "enum": [
                  "manager_identity_not_published",
                  "platform_default",
                  "league_decision"
                ]
              },
              "owner_gate": {
                "type": "string",
                "enum": [
                  "OG-24"
                ]
              },
              "recovery": {
                "type": "string",
                "minLength": 1,
                "maxLength": 240
              },
              "profile_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "minLength": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "visible_fields": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "display_name"
                  ]
                }
              }
            },
            "required": [
              "state",
              "reason",
              "owner_gate",
              "recovery",
              "profile_id",
              "visible_fields"
            ]
          }
        },
        "required": [
          "league",
          "teams",
          "standings_state",
          "manager_identity"
        ]
      },
      "FantasyLeagueTeamDetailResponse": {
        "type": "object",
        "properties": {
          "team": {
            "type": "object",
            "properties": {
              "fantasy_team_id": {
                "type": "string",
                "format": "uuid"
              },
              "name": {
                "type": "string"
              },
              "is_mine": {
                "type": "boolean"
              },
              "total_points": {
                "oneOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "rounds_played": {
                "oneOf": [
                  {
                    "type": "integer",
                    "minimum": 0
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "position": {
                "oneOf": [
                  {
                    "type": "integer",
                    "exclusiveMinimum": 0
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "forfeit_rounds": {
                "oneOf": [
                  {
                    "type": "integer",
                    "minimum": 0
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "manager_display_name": {
                "oneOf": [
                  {
                    "type": "string",
                    "minLength": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "fantasy_team_id",
              "name",
              "is_mine",
              "total_points",
              "rounds_played",
              "position",
              "forfeit_rounds",
              "manager_display_name"
            ]
          },
          "standings_state": {
            "type": "string",
            "enum": [
              "empty",
              "provisional",
              "stale",
              "superseded",
              "final"
            ]
          },
          "roster": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "player_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "display_name": {
                  "type": "string"
                },
                "role": {
                  "oneOf": [
                    {
                      "type": "string",
                      "enum": [
                        "GK",
                        "DEF",
                        "MID",
                        "FWD"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "shirt_number": {
                  "oneOf": [
                    {
                      "type": "integer"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "acquired_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "acquired_price": {
                  "type": "number"
                },
                "current_value": {
                  "type": "integer",
                  "minimum": 0
                },
                "sell_recovery": {
                  "type": "integer",
                  "minimum": 0,
                  "default": 0
                },
                "public_slug": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                }
              },
              "required": [
                "player_id",
                "display_name",
                "role",
                "shirt_number",
                "acquired_at",
                "acquired_price",
                "current_value"
              ]
            }
          },
          "rounds": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "round_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "label": {
                  "type": "string"
                },
                "phase": {
                  "type": "string",
                  "enum": [
                    "past",
                    "live",
                    "upcoming"
                  ]
                },
                "locked": {
                  "type": "boolean"
                },
                "kickoff_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "points": {
                  "oneOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "finality": {
                  "oneOf": [
                    {
                      "type": "string",
                      "enum": [
                        "empty",
                        "provisional",
                        "official",
                        "corrected",
                        "superseded",
                        "stale"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "team_round_status": {
                  "oneOf": [
                    {
                      "type": "string",
                      "enum": [
                        "scored",
                        "forfeit_no_lineup"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "position_after": {
                  "oneOf": [
                    {
                      "type": "integer",
                      "exclusiveMinimum": 0
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "cumulative_points": {
                  "oneOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "lineup_submitted": {
                  "oneOf": [
                    {
                      "type": "boolean"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "opponent": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "fantasy_team_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "name": {
                          "type": "string"
                        },
                        "side": {
                          "type": "string",
                          "enum": [
                            "home",
                            "away"
                          ]
                        },
                        "my_goals": {
                          "oneOf": [
                            {
                              "type": "integer",
                              "minimum": 0
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "opponent_goals": {
                          "oneOf": [
                            {
                              "type": "integer",
                              "minimum": 0
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "played": {
                          "type": "boolean"
                        },
                        "outcome": {
                          "oneOf": [
                            {
                              "type": "string",
                              "enum": [
                                "win",
                                "draw",
                                "loss"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "fantasy_team_id",
                        "name",
                        "side",
                        "my_goals",
                        "opponent_goals",
                        "played",
                        "outcome"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "round_id",
                "label",
                "phase",
                "locked",
                "kickoff_at",
                "points",
                "finality",
                "team_round_status",
                "position_after",
                "cumulative_points",
                "lineup_submitted",
                "opponent"
              ]
            },
            "default": []
          }
        },
        "required": [
          "team",
          "standings_state",
          "roster"
        ]
      },
      "FantasyCalendarResponse": {
        "type": "object",
        "properties": {
          "league": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "tournament_id": {
                "type": "string",
                "format": "uuid"
              },
              "name": {
                "type": "string"
              },
              "visibility": {
                "type": "string",
                "enum": [
                  "public",
                  "private"
                ]
              },
              "format": {
                "type": "string",
                "enum": [
                  "total_points",
                  "head_to_head"
                ],
                "default": "total_points"
              },
              "starts_on": {
                "type": "string"
              },
              "ends_on": {
                "type": "string"
              },
              "is_owner": {
                "type": "boolean"
              },
              "archived": {
                "type": "boolean"
              }
            },
            "required": [
              "id",
              "tournament_id",
              "name",
              "visibility",
              "starts_on",
              "ends_on",
              "is_owner"
            ]
          },
          "my_team": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "league_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "name": {
                    "type": "string"
                  },
                  "budget_remaining": {
                    "type": "number"
                  }
                },
                "required": [
                  "id",
                  "league_id",
                  "name",
                  "budget_remaining"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "standings_state": {
            "type": "string",
            "enum": [
              "empty",
              "provisional",
              "stale",
              "superseded",
              "final"
            ]
          },
          "server_time": {
            "type": "string",
            "format": "date-time"
          },
          "next_round_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "rounds": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "round_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "label": {
                  "type": "string"
                },
                "kickoff_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "deadline_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "locked": {
                  "type": "boolean"
                },
                "phase": {
                  "type": "string",
                  "enum": [
                    "past",
                    "live",
                    "upcoming"
                  ]
                },
                "fixture_count": {
                  "type": "integer",
                  "minimum": 0
                },
                "fixtures": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "match_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "scheduled_at": {
                        "oneOf": [
                          {
                            "type": "string",
                            "format": "date-time"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "schedule_precision": {
                        "type": "string",
                        "enum": [
                          "exact",
                          "date_only",
                          "unknown"
                        ]
                      },
                      "scheduled_on": {
                        "oneOf": [
                          {
                            "type": "string",
                            "format": "date"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "state": {
                        "type": "string",
                        "enum": [
                          "scheduled",
                          "live",
                          "ended",
                          "report_draft",
                          "report_submitted",
                          "report_official",
                          "corrected",
                          "cancelled",
                          "postponed"
                        ]
                      },
                      "home_team_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "home_team_label": {
                        "type": "string"
                      },
                      "away_team_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "away_team_label": {
                        "type": "string"
                      },
                      "home_score": {
                        "oneOf": [
                          {
                            "type": "integer",
                            "minimum": 0
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "away_score": {
                        "oneOf": [
                          {
                            "type": "integer",
                            "minimum": 0
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "public_match_available": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "match_id",
                      "scheduled_at",
                      "schedule_precision",
                      "scheduled_on",
                      "state",
                      "home_team_id",
                      "home_team_label",
                      "away_team_id",
                      "away_team_label",
                      "home_score",
                      "away_score",
                      "public_match_available"
                    ]
                  }
                },
                "my_round": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "fantasy_team_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "lineup_state": {
                          "type": "string",
                          "enum": [
                            "submitted",
                            "draft",
                            "missing"
                          ]
                        },
                        "points": {
                          "oneOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "finality": {
                          "oneOf": [
                            {
                              "type": "string",
                              "enum": [
                                "empty",
                                "provisional",
                                "official",
                                "corrected",
                                "superseded",
                                "stale"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "team_round_status": {
                          "oneOf": [
                            {
                              "type": "string",
                              "enum": [
                                "scored",
                                "forfeit_no_lineup"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "position_after": {
                          "oneOf": [
                            {
                              "type": "integer",
                              "exclusiveMinimum": 0
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "cumulative_points": {
                          "oneOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "fantasy_team_id",
                        "lineup_state",
                        "points",
                        "finality",
                        "team_round_status",
                        "position_after",
                        "cumulative_points"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "opponent": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "fantasy_team_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "name": {
                          "type": "string"
                        },
                        "side": {
                          "type": "string",
                          "enum": [
                            "home",
                            "away"
                          ]
                        },
                        "my_goals": {
                          "oneOf": [
                            {
                              "type": "integer",
                              "minimum": 0
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "opponent_goals": {
                          "oneOf": [
                            {
                              "type": "integer",
                              "minimum": 0
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "played": {
                          "type": "boolean"
                        },
                        "outcome": {
                          "oneOf": [
                            {
                              "type": "string",
                              "enum": [
                                "win",
                                "draw",
                                "loss"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "fantasy_team_id",
                        "name",
                        "side",
                        "my_goals",
                        "opponent_goals",
                        "played",
                        "outcome"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "round_id",
                "label",
                "kickoff_at",
                "deadline_at",
                "locked",
                "phase",
                "fixture_count",
                "fixtures",
                "my_round",
                "opponent"
              ]
            }
          }
        },
        "required": [
          "league",
          "my_team",
          "standings_state",
          "server_time",
          "next_round_id",
          "rounds"
        ]
      },
      "FantasyRoundDetailResponse": {
        "type": "object",
        "properties": {
          "league": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "tournament_id": {
                "type": "string",
                "format": "uuid"
              },
              "name": {
                "type": "string"
              },
              "visibility": {
                "type": "string",
                "enum": [
                  "public",
                  "private"
                ]
              },
              "format": {
                "type": "string",
                "enum": [
                  "total_points",
                  "head_to_head"
                ],
                "default": "total_points"
              },
              "starts_on": {
                "type": "string"
              },
              "ends_on": {
                "type": "string"
              },
              "is_owner": {
                "type": "boolean"
              },
              "archived": {
                "type": "boolean"
              }
            },
            "required": [
              "id",
              "tournament_id",
              "name",
              "visibility",
              "starts_on",
              "ends_on",
              "is_owner"
            ]
          },
          "round": {
            "type": "object",
            "properties": {
              "round_id": {
                "type": "string",
                "format": "uuid"
              },
              "label": {
                "type": "string"
              },
              "kickoff_at": {
                "type": "string",
                "format": "date-time"
              },
              "deadline_at": {
                "type": "string",
                "format": "date-time"
              },
              "locked": {
                "type": "boolean"
              },
              "phase": {
                "type": "string",
                "enum": [
                  "past",
                  "live",
                  "upcoming"
                ]
              },
              "fixture_count": {
                "type": "integer",
                "minimum": 0
              },
              "fixtures": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "match_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "scheduled_at": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "schedule_precision": {
                      "type": "string",
                      "enum": [
                        "exact",
                        "date_only",
                        "unknown"
                      ]
                    },
                    "scheduled_on": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "date"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "state": {
                      "type": "string",
                      "enum": [
                        "scheduled",
                        "live",
                        "ended",
                        "report_draft",
                        "report_submitted",
                        "report_official",
                        "corrected",
                        "cancelled",
                        "postponed"
                      ]
                    },
                    "home_team_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "home_team_label": {
                      "type": "string"
                    },
                    "away_team_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "away_team_label": {
                      "type": "string"
                    },
                    "home_score": {
                      "oneOf": [
                        {
                          "type": "integer",
                          "minimum": 0
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "away_score": {
                      "oneOf": [
                        {
                          "type": "integer",
                          "minimum": 0
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "public_match_available": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "match_id",
                    "scheduled_at",
                    "schedule_precision",
                    "scheduled_on",
                    "state",
                    "home_team_id",
                    "home_team_label",
                    "away_team_id",
                    "away_team_label",
                    "home_score",
                    "away_score",
                    "public_match_available"
                  ]
                }
              },
              "my_round": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "fantasy_team_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "lineup_state": {
                        "type": "string",
                        "enum": [
                          "submitted",
                          "draft",
                          "missing"
                        ]
                      },
                      "points": {
                        "oneOf": [
                          {
                            "type": "number"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "finality": {
                        "oneOf": [
                          {
                            "type": "string",
                            "enum": [
                              "empty",
                              "provisional",
                              "official",
                              "corrected",
                              "superseded",
                              "stale"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "team_round_status": {
                        "oneOf": [
                          {
                            "type": "string",
                            "enum": [
                              "scored",
                              "forfeit_no_lineup"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "position_after": {
                        "oneOf": [
                          {
                            "type": "integer",
                            "exclusiveMinimum": 0
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "cumulative_points": {
                        "oneOf": [
                          {
                            "type": "number"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "fantasy_team_id",
                      "lineup_state",
                      "points",
                      "finality",
                      "team_round_status",
                      "position_after",
                      "cumulative_points"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "opponent": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "fantasy_team_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "name": {
                        "type": "string"
                      },
                      "side": {
                        "type": "string",
                        "enum": [
                          "home",
                          "away"
                        ]
                      },
                      "my_goals": {
                        "oneOf": [
                          {
                            "type": "integer",
                            "minimum": 0
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "opponent_goals": {
                        "oneOf": [
                          {
                            "type": "integer",
                            "minimum": 0
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "played": {
                        "type": "boolean"
                      },
                      "outcome": {
                        "oneOf": [
                          {
                            "type": "string",
                            "enum": [
                              "win",
                              "draw",
                              "loss"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "fantasy_team_id",
                      "name",
                      "side",
                      "my_goals",
                      "opponent_goals",
                      "played",
                      "outcome"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "round_id",
              "label",
              "kickoff_at",
              "deadline_at",
              "locked",
              "phase",
              "fixture_count",
              "fixtures",
              "my_round",
              "opponent"
            ]
          },
          "my_team": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "league_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "name": {
                    "type": "string"
                  },
                  "budget_remaining": {
                    "type": "number"
                  }
                },
                "required": [
                  "id",
                  "league_id",
                  "name",
                  "budget_remaining"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "standings_state": {
            "type": "string",
            "enum": [
              "empty",
              "provisional",
              "stale",
              "superseded",
              "final"
            ]
          },
          "server_time": {
            "type": "string",
            "format": "date-time"
          },
          "correction_window": {
            "type": "object",
            "properties": {
              "first_published_at": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "closes_at": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "state": {
                "type": "string",
                "enum": [
                  "awaiting_publication",
                  "open",
                  "expired"
                ]
              }
            },
            "required": [
              "first_published_at",
              "closes_at",
              "state"
            ]
          },
          "lineup": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "round_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "starting_player_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "starting_players": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "player_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "display_name": {
                          "type": "string"
                        },
                        "role": {
                          "oneOf": [
                            {
                              "type": "string",
                              "enum": [
                                "GK",
                                "DEF",
                                "MID",
                                "FWD"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "shirt_number": {
                          "oneOf": [
                            {
                              "type": "integer"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "public_slug": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "default": null
                        },
                        "score": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "points": {
                                  "type": "number"
                                },
                                "voto": {
                                  "oneOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "provisional",
                                    "final",
                                    "corrected"
                                  ]
                                },
                                "breakdown": {
                                  "type": "object",
                                  "additionalProperties": true
                                },
                                "substitution": {
                                  "type": "object",
                                  "properties": {
                                    "kind": {
                                      "type": "string",
                                      "enum": [
                                        "none",
                                        "same_role",
                                        "out_of_position"
                                      ]
                                    },
                                    "replaced_player_id": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "format": "uuid"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "kind",
                                    "replaced_player_id"
                                  ]
                                }
                              },
                              "required": [
                                "points",
                                "voto",
                                "status",
                                "breakdown",
                                "substitution"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "default": null
                        }
                      },
                      "required": [
                        "player_id",
                        "display_name",
                        "role",
                        "shirt_number"
                      ]
                    }
                  },
                  "bench_player_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "bench_players": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "player_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "display_name": {
                          "type": "string"
                        },
                        "role": {
                          "oneOf": [
                            {
                              "type": "string",
                              "enum": [
                                "GK",
                                "DEF",
                                "MID",
                                "FWD"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "shirt_number": {
                          "oneOf": [
                            {
                              "type": "integer"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "public_slug": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "default": null
                        },
                        "score": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "points": {
                                  "type": "number"
                                },
                                "voto": {
                                  "oneOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "provisional",
                                    "final",
                                    "corrected"
                                  ]
                                },
                                "breakdown": {
                                  "type": "object",
                                  "additionalProperties": true
                                },
                                "substitution": {
                                  "type": "object",
                                  "properties": {
                                    "kind": {
                                      "type": "string",
                                      "enum": [
                                        "none",
                                        "same_role",
                                        "out_of_position"
                                      ]
                                    },
                                    "replaced_player_id": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "format": "uuid"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "kind",
                                    "replaced_player_id"
                                  ]
                                }
                              },
                              "required": [
                                "points",
                                "voto",
                                "status",
                                "breakdown",
                                "substitution"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "default": null
                        }
                      },
                      "required": [
                        "player_id",
                        "display_name",
                        "role",
                        "shirt_number"
                      ]
                    }
                  },
                  "captain_player_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "captain_player": {
                    "type": "object",
                    "properties": {
                      "player_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "display_name": {
                        "type": "string"
                      },
                      "role": {
                        "oneOf": [
                          {
                            "type": "string",
                            "enum": [
                              "GK",
                              "DEF",
                              "MID",
                              "FWD"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "shirt_number": {
                        "oneOf": [
                          {
                            "type": "integer"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "public_slug": {
                        "oneOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "default": null
                      },
                      "score": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "points": {
                                "type": "number"
                              },
                              "voto": {
                                "oneOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "provisional",
                                  "final",
                                  "corrected"
                                ]
                              },
                              "breakdown": {
                                "type": "object",
                                "additionalProperties": true
                              },
                              "substitution": {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "none",
                                      "same_role",
                                      "out_of_position"
                                    ]
                                  },
                                  "replaced_player_id": {
                                    "oneOf": [
                                      {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "kind",
                                  "replaced_player_id"
                                ]
                              }
                            },
                            "required": [
                              "points",
                              "voto",
                              "status",
                              "breakdown",
                              "substitution"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "default": null
                      }
                    },
                    "required": [
                      "player_id",
                      "display_name",
                      "role",
                      "shirt_number"
                    ]
                  },
                  "vice_player_id": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "vice_player": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "player_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "display_name": {
                            "type": "string"
                          },
                          "role": {
                            "oneOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "GK",
                                  "DEF",
                                  "MID",
                                  "FWD"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "shirt_number": {
                            "oneOf": [
                              {
                                "type": "integer"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "public_slug": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          },
                          "score": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "points": {
                                    "type": "number"
                                  },
                                  "voto": {
                                    "oneOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "status": {
                                    "type": "string",
                                    "enum": [
                                      "provisional",
                                      "final",
                                      "corrected"
                                    ]
                                  },
                                  "breakdown": {
                                    "type": "object",
                                    "additionalProperties": true
                                  },
                                  "substitution": {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "none",
                                          "same_role",
                                          "out_of_position"
                                        ]
                                      },
                                      "replaced_player_id": {
                                        "oneOf": [
                                          {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "replaced_player_id"
                                    ]
                                  }
                                },
                                "required": [
                                  "points",
                                  "voto",
                                  "status",
                                  "breakdown",
                                  "substitution"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          }
                        },
                        "required": [
                          "player_id",
                          "display_name",
                          "role",
                          "shirt_number"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "formation_string": {
                    "type": "string"
                  },
                  "locked_player_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "locked_at": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "date-time"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "scored_round_id": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "team_round_points": {
                    "oneOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "team_round_breakdown": {
                    "oneOf": [
                      {
                        "type": "object",
                        "additionalProperties": true
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "round_id",
                  "starting_player_ids",
                  "starting_players",
                  "bench_player_ids",
                  "bench_players",
                  "captain_player_id",
                  "captain_player",
                  "locked_at",
                  "scored_round_id",
                  "team_round_points",
                  "team_round_breakdown"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "score": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "league_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "round_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "points": {
                    "type": "number"
                  },
                  "breakdown": {
                    "type": "object",
                    "additionalProperties": true
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "provisional",
                      "final",
                      "corrected"
                    ]
                  },
                  "rule_version": {
                    "type": "integer"
                  },
                  "ruleset_revision_id": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "projection_revision_id": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "source_report_version_id": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "finality": {
                    "type": "string",
                    "enum": [
                      "empty",
                      "provisional",
                      "official",
                      "corrected",
                      "superseded",
                      "stale"
                    ]
                  },
                  "computed_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "superseded": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "id",
                  "league_id",
                  "round_id",
                  "points",
                  "breakdown",
                  "status",
                  "rule_version",
                  "ruleset_revision_id",
                  "projection_revision_id",
                  "source_report_version_id",
                  "finality",
                  "computed_at",
                  "superseded"
                ]
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "league",
          "round",
          "my_team",
          "standings_state",
          "server_time",
          "correction_window",
          "lineup",
          "score"
        ]
      },
      "FantasyTeamRoundLineupResponse": {
        "type": "object",
        "properties": {
          "league": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "tournament_id": {
                "type": "string",
                "format": "uuid"
              },
              "name": {
                "type": "string"
              },
              "visibility": {
                "type": "string",
                "enum": [
                  "public",
                  "private"
                ]
              },
              "format": {
                "type": "string",
                "enum": [
                  "total_points",
                  "head_to_head"
                ],
                "default": "total_points"
              },
              "starts_on": {
                "type": "string"
              },
              "ends_on": {
                "type": "string"
              },
              "is_owner": {
                "type": "boolean"
              },
              "archived": {
                "type": "boolean"
              }
            },
            "required": [
              "id",
              "tournament_id",
              "name",
              "visibility",
              "starts_on",
              "ends_on",
              "is_owner"
            ]
          },
          "round": {
            "type": "object",
            "properties": {
              "round_id": {
                "type": "string",
                "format": "uuid"
              },
              "label": {
                "type": "string"
              },
              "kickoff_at": {
                "type": "string",
                "format": "date-time"
              },
              "deadline_at": {
                "type": "string",
                "format": "date-time"
              },
              "locked": {
                "type": "boolean"
              },
              "phase": {
                "type": "string",
                "enum": [
                  "past",
                  "live",
                  "upcoming"
                ]
              },
              "fixture_count": {
                "type": "integer",
                "minimum": 0
              },
              "fixtures": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "match_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "scheduled_at": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "schedule_precision": {
                      "type": "string",
                      "enum": [
                        "exact",
                        "date_only",
                        "unknown"
                      ]
                    },
                    "scheduled_on": {
                      "oneOf": [
                        {
                          "type": "string",
                          "format": "date"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "state": {
                      "type": "string",
                      "enum": [
                        "scheduled",
                        "live",
                        "ended",
                        "report_draft",
                        "report_submitted",
                        "report_official",
                        "corrected",
                        "cancelled",
                        "postponed"
                      ]
                    },
                    "home_team_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "home_team_label": {
                      "type": "string"
                    },
                    "away_team_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "away_team_label": {
                      "type": "string"
                    },
                    "home_score": {
                      "oneOf": [
                        {
                          "type": "integer",
                          "minimum": 0
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "away_score": {
                      "oneOf": [
                        {
                          "type": "integer",
                          "minimum": 0
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "public_match_available": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "match_id",
                    "scheduled_at",
                    "schedule_precision",
                    "scheduled_on",
                    "state",
                    "home_team_id",
                    "home_team_label",
                    "away_team_id",
                    "away_team_label",
                    "home_score",
                    "away_score",
                    "public_match_available"
                  ]
                }
              },
              "my_round": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "fantasy_team_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "lineup_state": {
                        "type": "string",
                        "enum": [
                          "submitted",
                          "draft",
                          "missing"
                        ]
                      },
                      "points": {
                        "oneOf": [
                          {
                            "type": "number"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "finality": {
                        "oneOf": [
                          {
                            "type": "string",
                            "enum": [
                              "empty",
                              "provisional",
                              "official",
                              "corrected",
                              "superseded",
                              "stale"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "team_round_status": {
                        "oneOf": [
                          {
                            "type": "string",
                            "enum": [
                              "scored",
                              "forfeit_no_lineup"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "position_after": {
                        "oneOf": [
                          {
                            "type": "integer",
                            "exclusiveMinimum": 0
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "cumulative_points": {
                        "oneOf": [
                          {
                            "type": "number"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "fantasy_team_id",
                      "lineup_state",
                      "points",
                      "finality",
                      "team_round_status",
                      "position_after",
                      "cumulative_points"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "opponent": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "fantasy_team_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "name": {
                        "type": "string"
                      },
                      "side": {
                        "type": "string",
                        "enum": [
                          "home",
                          "away"
                        ]
                      },
                      "my_goals": {
                        "oneOf": [
                          {
                            "type": "integer",
                            "minimum": 0
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "opponent_goals": {
                        "oneOf": [
                          {
                            "type": "integer",
                            "minimum": 0
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "played": {
                        "type": "boolean"
                      },
                      "outcome": {
                        "oneOf": [
                          {
                            "type": "string",
                            "enum": [
                              "win",
                              "draw",
                              "loss"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "fantasy_team_id",
                      "name",
                      "side",
                      "my_goals",
                      "opponent_goals",
                      "played",
                      "outcome"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "round_id",
              "label",
              "kickoff_at",
              "deadline_at",
              "locked",
              "phase",
              "fixture_count",
              "fixtures",
              "my_round",
              "opponent"
            ]
          },
          "server_time": {
            "type": "string",
            "format": "date-time"
          },
          "standings_state": {
            "type": "string",
            "enum": [
              "empty",
              "provisional",
              "stale",
              "superseded",
              "final"
            ]
          },
          "team": {
            "type": "object",
            "properties": {
              "fantasy_team_id": {
                "type": "string",
                "format": "uuid"
              },
              "name": {
                "type": "string"
              },
              "is_mine": {
                "type": "boolean"
              },
              "total_points": {
                "oneOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "rounds_played": {
                "oneOf": [
                  {
                    "type": "integer",
                    "minimum": 0
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "position": {
                "oneOf": [
                  {
                    "type": "integer",
                    "exclusiveMinimum": 0
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "forfeit_rounds": {
                "oneOf": [
                  {
                    "type": "integer",
                    "minimum": 0
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "manager_display_name": {
                "oneOf": [
                  {
                    "type": "string",
                    "minLength": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "fantasy_team_id",
              "name",
              "is_mine",
              "total_points",
              "rounds_played",
              "position",
              "forfeit_rounds",
              "manager_display_name"
            ]
          },
          "lineup": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "round_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "starting_player_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "starting_players": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "player_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "display_name": {
                          "type": "string"
                        },
                        "role": {
                          "oneOf": [
                            {
                              "type": "string",
                              "enum": [
                                "GK",
                                "DEF",
                                "MID",
                                "FWD"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "shirt_number": {
                          "oneOf": [
                            {
                              "type": "integer"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "public_slug": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "default": null
                        },
                        "score": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "points": {
                                  "type": "number"
                                },
                                "voto": {
                                  "oneOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "provisional",
                                    "final",
                                    "corrected"
                                  ]
                                },
                                "breakdown": {
                                  "type": "object",
                                  "additionalProperties": true
                                },
                                "substitution": {
                                  "type": "object",
                                  "properties": {
                                    "kind": {
                                      "type": "string",
                                      "enum": [
                                        "none",
                                        "same_role",
                                        "out_of_position"
                                      ]
                                    },
                                    "replaced_player_id": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "format": "uuid"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "kind",
                                    "replaced_player_id"
                                  ]
                                }
                              },
                              "required": [
                                "points",
                                "voto",
                                "status",
                                "breakdown",
                                "substitution"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "default": null
                        }
                      },
                      "required": [
                        "player_id",
                        "display_name",
                        "role",
                        "shirt_number"
                      ]
                    }
                  },
                  "bench_player_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "bench_players": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "player_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "display_name": {
                          "type": "string"
                        },
                        "role": {
                          "oneOf": [
                            {
                              "type": "string",
                              "enum": [
                                "GK",
                                "DEF",
                                "MID",
                                "FWD"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "shirt_number": {
                          "oneOf": [
                            {
                              "type": "integer"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "public_slug": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "default": null
                        },
                        "score": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "points": {
                                  "type": "number"
                                },
                                "voto": {
                                  "oneOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "provisional",
                                    "final",
                                    "corrected"
                                  ]
                                },
                                "breakdown": {
                                  "type": "object",
                                  "additionalProperties": true
                                },
                                "substitution": {
                                  "type": "object",
                                  "properties": {
                                    "kind": {
                                      "type": "string",
                                      "enum": [
                                        "none",
                                        "same_role",
                                        "out_of_position"
                                      ]
                                    },
                                    "replaced_player_id": {
                                      "oneOf": [
                                        {
                                          "type": "string",
                                          "format": "uuid"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "kind",
                                    "replaced_player_id"
                                  ]
                                }
                              },
                              "required": [
                                "points",
                                "voto",
                                "status",
                                "breakdown",
                                "substitution"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "default": null
                        }
                      },
                      "required": [
                        "player_id",
                        "display_name",
                        "role",
                        "shirt_number"
                      ]
                    }
                  },
                  "captain_player_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "captain_player": {
                    "type": "object",
                    "properties": {
                      "player_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "display_name": {
                        "type": "string"
                      },
                      "role": {
                        "oneOf": [
                          {
                            "type": "string",
                            "enum": [
                              "GK",
                              "DEF",
                              "MID",
                              "FWD"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "shirt_number": {
                        "oneOf": [
                          {
                            "type": "integer"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "public_slug": {
                        "oneOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "default": null
                      },
                      "score": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "points": {
                                "type": "number"
                              },
                              "voto": {
                                "oneOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "provisional",
                                  "final",
                                  "corrected"
                                ]
                              },
                              "breakdown": {
                                "type": "object",
                                "additionalProperties": true
                              },
                              "substitution": {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "none",
                                      "same_role",
                                      "out_of_position"
                                    ]
                                  },
                                  "replaced_player_id": {
                                    "oneOf": [
                                      {
                                        "type": "string",
                                        "format": "uuid"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "kind",
                                  "replaced_player_id"
                                ]
                              }
                            },
                            "required": [
                              "points",
                              "voto",
                              "status",
                              "breakdown",
                              "substitution"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "default": null
                      }
                    },
                    "required": [
                      "player_id",
                      "display_name",
                      "role",
                      "shirt_number"
                    ]
                  },
                  "vice_player_id": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "vice_player": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "player_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "display_name": {
                            "type": "string"
                          },
                          "role": {
                            "oneOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "GK",
                                  "DEF",
                                  "MID",
                                  "FWD"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "shirt_number": {
                            "oneOf": [
                              {
                                "type": "integer"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "public_slug": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          },
                          "score": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "points": {
                                    "type": "number"
                                  },
                                  "voto": {
                                    "oneOf": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "status": {
                                    "type": "string",
                                    "enum": [
                                      "provisional",
                                      "final",
                                      "corrected"
                                    ]
                                  },
                                  "breakdown": {
                                    "type": "object",
                                    "additionalProperties": true
                                  },
                                  "substitution": {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "none",
                                          "same_role",
                                          "out_of_position"
                                        ]
                                      },
                                      "replaced_player_id": {
                                        "oneOf": [
                                          {
                                            "type": "string",
                                            "format": "uuid"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "replaced_player_id"
                                    ]
                                  }
                                },
                                "required": [
                                  "points",
                                  "voto",
                                  "status",
                                  "breakdown",
                                  "substitution"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          }
                        },
                        "required": [
                          "player_id",
                          "display_name",
                          "role",
                          "shirt_number"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "formation_string": {
                    "type": "string"
                  },
                  "locked_player_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "locked_at": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "date-time"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "scored_round_id": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "team_round_points": {
                    "oneOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "team_round_breakdown": {
                    "oneOf": [
                      {
                        "type": "object",
                        "additionalProperties": true
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "round_id",
                  "starting_player_ids",
                  "starting_players",
                  "bench_player_ids",
                  "bench_players",
                  "captain_player_id",
                  "captain_player",
                  "locked_at",
                  "scored_round_id",
                  "team_round_points",
                  "team_round_breakdown"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "score": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "league_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "round_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "points": {
                    "type": "number"
                  },
                  "breakdown": {
                    "type": "object",
                    "additionalProperties": true
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "provisional",
                      "final",
                      "corrected"
                    ]
                  },
                  "rule_version": {
                    "type": "integer"
                  },
                  "ruleset_revision_id": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "projection_revision_id": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "source_report_version_id": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "finality": {
                    "type": "string",
                    "enum": [
                      "empty",
                      "provisional",
                      "official",
                      "corrected",
                      "superseded",
                      "stale"
                    ]
                  },
                  "computed_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "superseded": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "id",
                  "league_id",
                  "round_id",
                  "points",
                  "breakdown",
                  "status",
                  "rule_version",
                  "ruleset_revision_id",
                  "projection_revision_id",
                  "source_report_version_id",
                  "finality",
                  "computed_at",
                  "superseded"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "round_line": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "round_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "label": {
                    "type": "string"
                  },
                  "phase": {
                    "type": "string",
                    "enum": [
                      "past",
                      "live",
                      "upcoming"
                    ]
                  },
                  "locked": {
                    "type": "boolean"
                  },
                  "kickoff_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "points": {
                    "oneOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "finality": {
                    "oneOf": [
                      {
                        "type": "string",
                        "enum": [
                          "empty",
                          "provisional",
                          "official",
                          "corrected",
                          "superseded",
                          "stale"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "team_round_status": {
                    "oneOf": [
                      {
                        "type": "string",
                        "enum": [
                          "scored",
                          "forfeit_no_lineup"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "position_after": {
                    "oneOf": [
                      {
                        "type": "integer",
                        "exclusiveMinimum": 0
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "cumulative_points": {
                    "oneOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "lineup_submitted": {
                    "oneOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "opponent": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "fantasy_team_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "name": {
                            "type": "string"
                          },
                          "side": {
                            "type": "string",
                            "enum": [
                              "home",
                              "away"
                            ]
                          },
                          "my_goals": {
                            "oneOf": [
                              {
                                "type": "integer",
                                "minimum": 0
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "opponent_goals": {
                            "oneOf": [
                              {
                                "type": "integer",
                                "minimum": 0
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "played": {
                            "type": "boolean"
                          },
                          "outcome": {
                            "oneOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "win",
                                  "draw",
                                  "loss"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "fantasy_team_id",
                          "name",
                          "side",
                          "my_goals",
                          "opponent_goals",
                          "played",
                          "outcome"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "round_id",
                  "label",
                  "phase",
                  "locked",
                  "kickoff_at",
                  "points",
                  "finality",
                  "team_round_status",
                  "position_after",
                  "cumulative_points",
                  "lineup_submitted",
                  "opponent"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "opponent": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "team": {
                    "type": "object",
                    "properties": {
                      "fantasy_team_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "name": {
                        "type": "string"
                      },
                      "is_mine": {
                        "type": "boolean"
                      },
                      "total_points": {
                        "oneOf": [
                          {
                            "type": "number"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "rounds_played": {
                        "oneOf": [
                          {
                            "type": "integer",
                            "minimum": 0
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "position": {
                        "oneOf": [
                          {
                            "type": "integer",
                            "exclusiveMinimum": 0
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "forfeit_rounds": {
                        "oneOf": [
                          {
                            "type": "integer",
                            "minimum": 0
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "manager_display_name": {
                        "oneOf": [
                          {
                            "type": "string",
                            "minLength": 1
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "fantasy_team_id",
                      "name",
                      "is_mine",
                      "total_points",
                      "rounds_played",
                      "position",
                      "forfeit_rounds",
                      "manager_display_name"
                    ]
                  },
                  "lineup": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "round_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "starting_player_ids": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "format": "uuid"
                            }
                          },
                          "starting_players": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "player_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "display_name": {
                                  "type": "string"
                                },
                                "role": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "enum": [
                                        "GK",
                                        "DEF",
                                        "MID",
                                        "FWD"
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "shirt_number": {
                                  "oneOf": [
                                    {
                                      "type": "integer"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "public_slug": {
                                  "oneOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "default": null
                                },
                                "score": {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "points": {
                                          "type": "number"
                                        },
                                        "voto": {
                                          "oneOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "status": {
                                          "type": "string",
                                          "enum": [
                                            "provisional",
                                            "final",
                                            "corrected"
                                          ]
                                        },
                                        "breakdown": {
                                          "type": "object",
                                          "additionalProperties": true
                                        },
                                        "substitution": {
                                          "type": "object",
                                          "properties": {
                                            "kind": {
                                              "type": "string",
                                              "enum": [
                                                "none",
                                                "same_role",
                                                "out_of_position"
                                              ]
                                            },
                                            "replaced_player_id": {
                                              "oneOf": [
                                                {
                                                  "type": "string",
                                                  "format": "uuid"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "kind",
                                            "replaced_player_id"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "points",
                                        "voto",
                                        "status",
                                        "breakdown",
                                        "substitution"
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "default": null
                                }
                              },
                              "required": [
                                "player_id",
                                "display_name",
                                "role",
                                "shirt_number"
                              ]
                            }
                          },
                          "bench_player_ids": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "format": "uuid"
                            }
                          },
                          "bench_players": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "player_id": {
                                  "type": "string",
                                  "format": "uuid"
                                },
                                "display_name": {
                                  "type": "string"
                                },
                                "role": {
                                  "oneOf": [
                                    {
                                      "type": "string",
                                      "enum": [
                                        "GK",
                                        "DEF",
                                        "MID",
                                        "FWD"
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "shirt_number": {
                                  "oneOf": [
                                    {
                                      "type": "integer"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "public_slug": {
                                  "oneOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "default": null
                                },
                                "score": {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "points": {
                                          "type": "number"
                                        },
                                        "voto": {
                                          "oneOf": [
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "status": {
                                          "type": "string",
                                          "enum": [
                                            "provisional",
                                            "final",
                                            "corrected"
                                          ]
                                        },
                                        "breakdown": {
                                          "type": "object",
                                          "additionalProperties": true
                                        },
                                        "substitution": {
                                          "type": "object",
                                          "properties": {
                                            "kind": {
                                              "type": "string",
                                              "enum": [
                                                "none",
                                                "same_role",
                                                "out_of_position"
                                              ]
                                            },
                                            "replaced_player_id": {
                                              "oneOf": [
                                                {
                                                  "type": "string",
                                                  "format": "uuid"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "kind",
                                            "replaced_player_id"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "points",
                                        "voto",
                                        "status",
                                        "breakdown",
                                        "substitution"
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "default": null
                                }
                              },
                              "required": [
                                "player_id",
                                "display_name",
                                "role",
                                "shirt_number"
                              ]
                            }
                          },
                          "captain_player_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "captain_player": {
                            "type": "object",
                            "properties": {
                              "player_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "display_name": {
                                "type": "string"
                              },
                              "role": {
                                "oneOf": [
                                  {
                                    "type": "string",
                                    "enum": [
                                      "GK",
                                      "DEF",
                                      "MID",
                                      "FWD"
                                    ]
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "shirt_number": {
                                "oneOf": [
                                  {
                                    "type": "integer"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "public_slug": {
                                "oneOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "default": null
                              },
                              "score": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "points": {
                                        "type": "number"
                                      },
                                      "voto": {
                                        "oneOf": [
                                          {
                                            "type": "number"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "status": {
                                        "type": "string",
                                        "enum": [
                                          "provisional",
                                          "final",
                                          "corrected"
                                        ]
                                      },
                                      "breakdown": {
                                        "type": "object",
                                        "additionalProperties": true
                                      },
                                      "substitution": {
                                        "type": "object",
                                        "properties": {
                                          "kind": {
                                            "type": "string",
                                            "enum": [
                                              "none",
                                              "same_role",
                                              "out_of_position"
                                            ]
                                          },
                                          "replaced_player_id": {
                                            "oneOf": [
                                              {
                                                "type": "string",
                                                "format": "uuid"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "kind",
                                          "replaced_player_id"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "points",
                                      "voto",
                                      "status",
                                      "breakdown",
                                      "substitution"
                                    ]
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "default": null
                              }
                            },
                            "required": [
                              "player_id",
                              "display_name",
                              "role",
                              "shirt_number"
                            ]
                          },
                          "vice_player_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          },
                          "vice_player": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "player_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "display_name": {
                                    "type": "string"
                                  },
                                  "role": {
                                    "oneOf": [
                                      {
                                        "type": "string",
                                        "enum": [
                                          "GK",
                                          "DEF",
                                          "MID",
                                          "FWD"
                                        ]
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "shirt_number": {
                                    "oneOf": [
                                      {
                                        "type": "integer"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "public_slug": {
                                    "oneOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "default": null
                                  },
                                  "score": {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "points": {
                                            "type": "number"
                                          },
                                          "voto": {
                                            "oneOf": [
                                              {
                                                "type": "number"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "status": {
                                            "type": "string",
                                            "enum": [
                                              "provisional",
                                              "final",
                                              "corrected"
                                            ]
                                          },
                                          "breakdown": {
                                            "type": "object",
                                            "additionalProperties": true
                                          },
                                          "substitution": {
                                            "type": "object",
                                            "properties": {
                                              "kind": {
                                                "type": "string",
                                                "enum": [
                                                  "none",
                                                  "same_role",
                                                  "out_of_position"
                                                ]
                                              },
                                              "replaced_player_id": {
                                                "oneOf": [
                                                  {
                                                    "type": "string",
                                                    "format": "uuid"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              }
                                            },
                                            "required": [
                                              "kind",
                                              "replaced_player_id"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "points",
                                          "voto",
                                          "status",
                                          "breakdown",
                                          "substitution"
                                        ]
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "default": null
                                  }
                                },
                                "required": [
                                  "player_id",
                                  "display_name",
                                  "role",
                                  "shirt_number"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          },
                          "formation_string": {
                            "type": "string"
                          },
                          "locked_player_ids": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "format": "uuid"
                            }
                          },
                          "locked_at": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "scored_round_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "team_round_points": {
                            "oneOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "team_round_breakdown": {
                            "oneOf": [
                              {
                                "type": "object",
                                "additionalProperties": true
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "round_id",
                          "starting_player_ids",
                          "starting_players",
                          "bench_player_ids",
                          "bench_players",
                          "captain_player_id",
                          "captain_player",
                          "locked_at",
                          "scored_round_id",
                          "team_round_points",
                          "team_round_breakdown"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "score": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "league_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "round_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "points": {
                            "type": "number"
                          },
                          "breakdown": {
                            "type": "object",
                            "additionalProperties": true
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "provisional",
                              "final",
                              "corrected"
                            ]
                          },
                          "rule_version": {
                            "type": "integer"
                          },
                          "ruleset_revision_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "projection_revision_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "source_report_version_id": {
                            "oneOf": [
                              {
                                "type": "string",
                                "format": "uuid"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "finality": {
                            "type": "string",
                            "enum": [
                              "empty",
                              "provisional",
                              "official",
                              "corrected",
                              "superseded",
                              "stale"
                            ]
                          },
                          "computed_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "superseded": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "id",
                          "league_id",
                          "round_id",
                          "points",
                          "breakdown",
                          "status",
                          "rule_version",
                          "ruleset_revision_id",
                          "projection_revision_id",
                          "source_report_version_id",
                          "finality",
                          "computed_at",
                          "superseded"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "round_line": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "round_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "label": {
                            "type": "string"
                          },
                          "phase": {
                            "type": "string",
                            "enum": [
                              "past",
                              "live",
                              "upcoming"
                            ]
                          },
                          "locked": {
                            "type": "boolean"
                          },
                          "kickoff_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "points": {
                            "oneOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "finality": {
                            "oneOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "empty",
                                  "provisional",
                                  "official",
                                  "corrected",
                                  "superseded",
                                  "stale"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "team_round_status": {
                            "oneOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "scored",
                                  "forfeit_no_lineup"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "position_after": {
                            "oneOf": [
                              {
                                "type": "integer",
                                "exclusiveMinimum": 0
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "cumulative_points": {
                            "oneOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "lineup_submitted": {
                            "oneOf": [
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "opponent": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "fantasy_team_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "side": {
                                    "type": "string",
                                    "enum": [
                                      "home",
                                      "away"
                                    ]
                                  },
                                  "my_goals": {
                                    "oneOf": [
                                      {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "opponent_goals": {
                                    "oneOf": [
                                      {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "played": {
                                    "type": "boolean"
                                  },
                                  "outcome": {
                                    "oneOf": [
                                      {
                                        "type": "string",
                                        "enum": [
                                          "win",
                                          "draw",
                                          "loss"
                                        ]
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "fantasy_team_id",
                                  "name",
                                  "side",
                                  "my_goals",
                                  "opponent_goals",
                                  "played",
                                  "outcome"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "round_id",
                          "label",
                          "phase",
                          "locked",
                          "kickoff_at",
                          "points",
                          "finality",
                          "team_round_status",
                          "position_after",
                          "cumulative_points",
                          "lineup_submitted",
                          "opponent"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "team",
                  "lineup",
                  "score",
                  "round_line"
                ]
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "league",
          "round",
          "server_time",
          "standings_state",
          "team",
          "lineup",
          "score",
          "round_line",
          "opponent"
        ]
      },
      "AdminDisciplineResponse": {
        "type": "object",
        "properties": {
          "tournament_id": {
            "type": "string",
            "format": "uuid"
          },
          "players": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "tenant_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "tournament_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "player_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "team_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "accumulated_yellows": {
                  "type": "integer",
                  "minimum": 0
                },
                "total_yellows": {
                  "type": "integer",
                  "minimum": 0
                },
                "total_reds": {
                  "type": "integer",
                  "minimum": 0
                },
                "diffida": {
                  "type": "boolean"
                },
                "served_suspensions": {
                  "type": "integer",
                  "minimum": 0
                },
                "pending_suspension_matches": {
                  "type": "integer",
                  "minimum": 0
                },
                "suspended_next_fixture": {
                  "type": "boolean"
                },
                "last_card_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "sources": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "match_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "type": {
                        "type": "string",
                        "enum": [
                          "yellow_card",
                          "red_card",
                          "second_yellow"
                        ]
                      },
                      "round_id": {
                        "oneOf": [
                          {
                            "type": "string",
                            "format": "uuid"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "match_id",
                      "type",
                      "round_id"
                    ]
                  }
                }
              },
              "required": [
                "tenant_id",
                "tournament_id",
                "player_id",
                "team_id",
                "accumulated_yellows",
                "total_yellows",
                "total_reds",
                "diffida",
                "served_suspensions",
                "pending_suspension_matches",
                "suspended_next_fixture",
                "last_card_at",
                "sources"
              ]
            }
          },
          "point_adjustments": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "team_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "group_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "points_delta": {
                  "type": "integer"
                },
                "reason": {
                  "type": "string",
                  "minLength": 1
                },
                "goals_for_delta": {
                  "type": "integer"
                },
                "goals_against_delta": {
                  "type": "integer"
                }
              },
              "required": [
                "team_id",
                "group_id",
                "points_delta",
                "reason"
              ]
            }
          },
          "provisional_send_offs": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "player_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "team_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "match_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "card": {
                  "type": "string",
                  "enum": [
                    "red_card",
                    "second_yellow"
                  ]
                }
              },
              "required": [
                "player_id",
                "team_id",
                "match_id",
                "card"
              ]
            }
          },
          "suspension_effective_at": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "immediately",
                  "homologation",
                  "communique"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "decision_gaps": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string",
                  "minLength": 1
                },
                "questions": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "pattern": "^Q\\d{3}$"
                  },
                  "minItems": 1
                },
                "detail": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "required": [
                "key",
                "questions",
                "detail"
              ]
            }
          }
        },
        "required": [
          "tournament_id",
          "players",
          "point_adjustments",
          "provisional_send_offs",
          "suspension_effective_at",
          "decision_gaps"
        ]
      },
      "AdminFixtureEligibilityResponse": {
        "type": "object",
        "properties": {
          "match_id": {
            "type": "string",
            "format": "uuid"
          },
          "home": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "match_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "player_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "team_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "eligible": {
                  "type": "boolean"
                },
                "reasons": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "suspended",
                      "not_rostered",
                      "roster_not_active",
                      "medical_block",
                      "not_registered_before_deadline",
                      "squad_below_minimum"
                    ]
                  }
                }
              },
              "required": [
                "match_id",
                "player_id",
                "team_id",
                "eligible",
                "reasons"
              ]
            }
          },
          "away": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "match_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "player_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "team_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "eligible": {
                  "type": "boolean"
                },
                "reasons": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "suspended",
                      "not_rostered",
                      "roster_not_active",
                      "medical_block",
                      "not_registered_before_deadline",
                      "squad_below_minimum"
                    ]
                  }
                }
              },
              "required": [
                "match_id",
                "player_id",
                "team_id",
                "eligible",
                "reasons"
              ]
            }
          },
          "ineligible_call_ups": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "match_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "player_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "team_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "eligible": {
                  "type": "boolean"
                },
                "reasons": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "suspended",
                      "not_rostered",
                      "roster_not_active",
                      "medical_block",
                      "not_registered_before_deadline",
                      "squad_below_minimum"
                    ]
                  }
                }
              },
              "required": [
                "match_id",
                "player_id",
                "team_id",
                "eligible",
                "reasons"
              ]
            }
          }
        },
        "required": [
          "match_id",
          "home",
          "away",
          "ineligible_call_ups"
        ]
      },
      "AdminDisciplineOverrideRequest": {
        "type": "object",
        "properties": {
          "tournament_id": {
            "type": "string",
            "format": "uuid"
          },
          "player_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "kind": {
            "type": "string",
            "enum": [
              "add_suspension",
              "clear_suspension",
              "pardon_card",
              "manual_diffida",
              "point_deduction"
            ]
          },
          "matches_count": {
            "oneOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "points_delta": {
            "oneOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "target_team_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "penalty_goals": {
            "oneOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "effective_from_round_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "reason": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "tournament_id",
          "player_id",
          "kind",
          "matches_count",
          "points_delta",
          "target_team_id",
          "effective_from_round_id",
          "reason"
        ]
      },
      "AdminDisciplineOverrideResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "tournament_id": {
            "type": "string",
            "format": "uuid"
          },
          "player_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "kind": {
            "type": "string",
            "enum": [
              "add_suspension",
              "clear_suspension",
              "pardon_card",
              "manual_diffida",
              "point_deduction"
            ]
          },
          "matches_count": {
            "oneOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "points_delta": {
            "oneOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "target_team_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "penalty_goals": {
            "oneOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "effective_from_round_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "reason": {
            "type": "string",
            "minLength": 1
          },
          "decided_by": {
            "type": "string",
            "format": "uuid"
          },
          "decided_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "updated_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "tenant_id",
          "tournament_id",
          "player_id",
          "kind",
          "matches_count",
          "points_delta",
          "target_team_id",
          "effective_from_round_id",
          "reason",
          "decided_by",
          "decided_at",
          "created_at",
          "updated_at",
          "created_by",
          "updated_by"
        ]
      },
      "AdminForfeitRequest": {
        "type": "object",
        "properties": {
          "against_team_id": {
            "type": "string",
            "format": "uuid"
          },
          "player_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "reason": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "against_team_id",
          "player_id",
          "reason"
        ]
      },
      "AdminForfeitResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "match_id": {
            "type": "string",
            "format": "uuid"
          },
          "version": {
            "type": "integer",
            "minimum": 1
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "submitted",
              "official",
              "superseded"
            ]
          },
          "score_home": {
            "type": "integer",
            "minimum": 0
          },
          "score_away": {
            "type": "integer",
            "minimum": 0
          },
          "ended_after": {
            "type": "string",
            "enum": [
              "regulation",
              "extra_time",
              "penalties"
            ]
          },
          "penalty_shootout": {
            "type": "object",
            "properties": {
              "home": {
                "type": "integer",
                "minimum": 0
              },
              "away": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "home",
              "away"
            ]
          },
          "result_origin": {
            "type": "string",
            "enum": [
              "played",
              "forfeit"
            ]
          },
          "forfeit_trigger": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "no_show",
                  "ineligible_player",
                  "roster_below_minimum",
                  "late_result_confirmation_both_secretariats"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "event_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "source_event_sequence": {
            "type": "integer",
            "minimum": 0
          },
          "submitted_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "submitted_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "approved_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "approved_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "superseded_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "superseded_by_version": {
            "oneOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "notes": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "import_provenance": {
            "type": "object",
            "properties": {
              "source_system": {
                "type": "string",
                "minLength": 1,
                "maxLength": 120
              },
              "source_id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              "source_url": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uri"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "source_note": {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              "imported_at": {
                "type": "string",
                "format": "date-time"
              },
              "imported_by": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "source_system",
              "source_id",
              "source_url",
              "source_note",
              "imported_at",
              "imported_by"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "updated_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "tenant_id",
          "match_id",
          "version",
          "status",
          "score_home",
          "score_away",
          "event_ids",
          "submitted_by",
          "submitted_at",
          "approved_by",
          "approved_at",
          "superseded_at",
          "superseded_by_version",
          "notes",
          "created_at",
          "updated_at",
          "created_by",
          "updated_by"
        ]
      },
      "AdminForfeitProposalList": {
        "type": "object",
        "properties": {
          "tournament_id": {
            "type": "string",
            "format": "uuid"
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "tenant_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "tournament_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "match_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "trigger": {
                  "type": "string",
                  "enum": [
                    "late_result_confirmation_both_secretariats"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "pending",
                    "confirming",
                    "confirmed",
                    "dismissed"
                  ]
                },
                "eligible_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "confirmed_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "confirmed_by": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "against_team_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "report_version_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "dismissed_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "dismissed_by": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "dismissal_reason": {
                  "oneOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1000
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "generation_idempotency_key": {
                  "oneOf": [
                    {
                      "type": "string",
                      "minLength": 8,
                      "maxLength": 200
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "generation_payload_hash": {
                  "oneOf": [
                    {
                      "type": "string",
                      "minLength": 64,
                      "maxLength": 64
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "decision_idempotency_key": {
                  "oneOf": [
                    {
                      "type": "string",
                      "minLength": 8,
                      "maxLength": 200
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "decision_payload_hash": {
                  "oneOf": [
                    {
                      "type": "string",
                      "minLength": 64,
                      "maxLength": 64
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "created_by": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "updated_by": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "tenant_id",
                "tournament_id",
                "match_id",
                "trigger",
                "status",
                "eligible_at",
                "confirmed_at",
                "confirmed_by",
                "against_team_id",
                "created_at",
                "updated_at",
                "created_by",
                "updated_by"
              ]
            }
          }
        },
        "required": [
          "tournament_id",
          "items"
        ]
      },
      "AdminForfeitProposalGenerateRequest": {
        "type": "object",
        "properties": {
          "idempotency_key": {
            "type": "string",
            "minLength": 8,
            "maxLength": 200
          }
        },
        "required": [
          "idempotency_key"
        ]
      },
      "AdminForfeitProposalGenerateResponse": {
        "type": "object",
        "properties": {
          "generated": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "tenant_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "tournament_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "match_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "trigger": {
                  "type": "string",
                  "enum": [
                    "late_result_confirmation_both_secretariats"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "pending",
                    "confirming",
                    "confirmed",
                    "dismissed"
                  ]
                },
                "eligible_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "confirmed_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "confirmed_by": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "against_team_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "report_version_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "dismissed_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "dismissed_by": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "dismissal_reason": {
                  "oneOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1000
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "generation_idempotency_key": {
                  "oneOf": [
                    {
                      "type": "string",
                      "minLength": 8,
                      "maxLength": 200
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "generation_payload_hash": {
                  "oneOf": [
                    {
                      "type": "string",
                      "minLength": 64,
                      "maxLength": 64
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "decision_idempotency_key": {
                  "oneOf": [
                    {
                      "type": "string",
                      "minLength": 8,
                      "maxLength": 200
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "decision_payload_hash": {
                  "oneOf": [
                    {
                      "type": "string",
                      "minLength": 64,
                      "maxLength": 64
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "created_by": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "updated_by": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "tenant_id",
                "tournament_id",
                "match_id",
                "trigger",
                "status",
                "eligible_at",
                "confirmed_at",
                "confirmed_by",
                "against_team_id",
                "created_at",
                "updated_at",
                "created_by",
                "updated_by"
              ]
            }
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "tenant_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "tournament_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "match_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "trigger": {
                  "type": "string",
                  "enum": [
                    "late_result_confirmation_both_secretariats"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "pending",
                    "confirming",
                    "confirmed",
                    "dismissed"
                  ]
                },
                "eligible_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "confirmed_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "confirmed_by": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "against_team_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "report_version_id": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "dismissed_at": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "dismissed_by": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "dismissal_reason": {
                  "oneOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1000
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "generation_idempotency_key": {
                  "oneOf": [
                    {
                      "type": "string",
                      "minLength": 8,
                      "maxLength": 200
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "generation_payload_hash": {
                  "oneOf": [
                    {
                      "type": "string",
                      "minLength": 64,
                      "maxLength": 64
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "decision_idempotency_key": {
                  "oneOf": [
                    {
                      "type": "string",
                      "minLength": 8,
                      "maxLength": 200
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "decision_payload_hash": {
                  "oneOf": [
                    {
                      "type": "string",
                      "minLength": 64,
                      "maxLength": 64
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "created_by": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "updated_by": {
                  "oneOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "tenant_id",
                "tournament_id",
                "match_id",
                "trigger",
                "status",
                "eligible_at",
                "confirmed_at",
                "confirmed_by",
                "against_team_id",
                "created_at",
                "updated_at",
                "created_by",
                "updated_by"
              ]
            }
          }
        },
        "required": [
          "generated",
          "items"
        ]
      },
      "AdminForfeitProposalConfirmRequest": {
        "type": "object",
        "properties": {
          "against_team_id": {
            "type": "string",
            "format": "uuid"
          },
          "reason": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1000
          },
          "idempotency_key": {
            "type": "string",
            "minLength": 8,
            "maxLength": 200
          }
        },
        "required": [
          "against_team_id",
          "reason",
          "idempotency_key"
        ]
      },
      "AdminForfeitProposalConfirmResponse": {
        "type": "object",
        "properties": {
          "proposal": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "tenant_id": {
                "type": "string",
                "format": "uuid"
              },
              "tournament_id": {
                "type": "string",
                "format": "uuid"
              },
              "match_id": {
                "type": "string",
                "format": "uuid"
              },
              "trigger": {
                "type": "string",
                "enum": [
                  "late_result_confirmation_both_secretariats"
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "pending",
                  "confirming",
                  "confirmed",
                  "dismissed"
                ]
              },
              "eligible_at": {
                "type": "string",
                "format": "date-time"
              },
              "confirmed_at": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "confirmed_by": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "against_team_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "report_version_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "dismissed_at": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "dismissed_by": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "dismissal_reason": {
                "oneOf": [
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1000
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "generation_idempotency_key": {
                "oneOf": [
                  {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 200
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "generation_payload_hash": {
                "oneOf": [
                  {
                    "type": "string",
                    "minLength": 64,
                    "maxLength": 64
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "decision_idempotency_key": {
                "oneOf": [
                  {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 200
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "decision_payload_hash": {
                "oneOf": [
                  {
                    "type": "string",
                    "minLength": 64,
                    "maxLength": 64
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "created_by": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "updated_by": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "id",
              "tenant_id",
              "tournament_id",
              "match_id",
              "trigger",
              "status",
              "eligible_at",
              "confirmed_at",
              "confirmed_by",
              "against_team_id",
              "created_at",
              "updated_at",
              "created_by",
              "updated_by"
            ]
          },
          "report": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "tenant_id": {
                "type": "string",
                "format": "uuid"
              },
              "match_id": {
                "type": "string",
                "format": "uuid"
              },
              "version": {
                "type": "integer",
                "minimum": 1
              },
              "status": {
                "type": "string",
                "enum": [
                  "draft",
                  "submitted",
                  "official",
                  "superseded"
                ]
              },
              "score_home": {
                "type": "integer",
                "minimum": 0
              },
              "score_away": {
                "type": "integer",
                "minimum": 0
              },
              "ended_after": {
                "type": "string",
                "enum": [
                  "regulation",
                  "extra_time",
                  "penalties"
                ]
              },
              "penalty_shootout": {
                "type": "object",
                "properties": {
                  "home": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "away": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "required": [
                  "home",
                  "away"
                ]
              },
              "result_origin": {
                "type": "string",
                "enum": [
                  "played",
                  "forfeit"
                ]
              },
              "forfeit_trigger": {
                "oneOf": [
                  {
                    "type": "string",
                    "enum": [
                      "no_show",
                      "ineligible_player",
                      "roster_below_minimum",
                      "late_result_confirmation_both_secretariats"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "event_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "source_event_sequence": {
                "type": "integer",
                "minimum": 0
              },
              "submitted_by": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "submitted_at": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "approved_by": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "approved_at": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "superseded_at": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "superseded_by_version": {
                "oneOf": [
                  {
                    "type": "integer",
                    "minimum": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "notes": {
                "oneOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "import_provenance": {
                "type": "object",
                "properties": {
                  "source_system": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "source_id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "source_url": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uri"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "source_note": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  },
                  "imported_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "imported_by": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "source_system",
                  "source_id",
                  "source_url",
                  "source_note",
                  "imported_at",
                  "imported_by"
                ]
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "created_by": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "updated_by": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "id",
              "tenant_id",
              "match_id",
              "version",
              "status",
              "score_home",
              "score_away",
              "event_ids",
              "submitted_by",
              "submitted_at",
              "approved_by",
              "approved_at",
              "superseded_at",
              "superseded_by_version",
              "notes",
              "created_at",
              "updated_at",
              "created_by",
              "updated_by"
            ]
          }
        },
        "required": [
          "proposal",
          "report"
        ]
      },
      "AdminForfeitProposalRejectRequest": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1000
          },
          "idempotency_key": {
            "type": "string",
            "minLength": 8,
            "maxLength": 200
          }
        },
        "required": [
          "reason",
          "idempotency_key"
        ]
      },
      "AdminForfeitProposalRejectResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid"
          },
          "tournament_id": {
            "type": "string",
            "format": "uuid"
          },
          "match_id": {
            "type": "string",
            "format": "uuid"
          },
          "trigger": {
            "type": "string",
            "enum": [
              "late_result_confirmation_both_secretariats"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "confirming",
              "confirmed",
              "dismissed"
            ]
          },
          "eligible_at": {
            "type": "string",
            "format": "date-time"
          },
          "confirmed_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "confirmed_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "against_team_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "report_version_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "dismissed_at": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "dismissed_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "dismissal_reason": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 1000
              },
              {
                "type": "null"
              }
            ]
          },
          "generation_idempotency_key": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 8,
                "maxLength": 200
              },
              {
                "type": "null"
              }
            ]
          },
          "generation_payload_hash": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 64,
                "maxLength": 64
              },
              {
                "type": "null"
              }
            ]
          },
          "decision_idempotency_key": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 8,
                "maxLength": 200
              },
              {
                "type": "null"
              }
            ]
          },
          "decision_payload_hash": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 64,
                "maxLength": 64
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "updated_by": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "tenant_id",
          "tournament_id",
          "match_id",
          "trigger",
          "status",
          "eligible_at",
          "confirmed_at",
          "confirmed_by",
          "against_team_id",
          "created_at",
          "updated_at",
          "created_by",
          "updated_by"
        ]
      },
      "AdminTournamentPhaseStandingRow": {
        "type": "object",
        "properties": {
          "team_id": {
            "type": "string",
            "format": "uuid"
          },
          "team_display_name": {
            "type": "string",
            "minLength": 1
          },
          "team_slug": {
            "type": "string",
            "minLength": 2,
            "maxLength": 64,
            "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
          },
          "position": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "played": {
            "type": "integer",
            "minimum": 0
          },
          "won": {
            "type": "integer",
            "minimum": 0
          },
          "drawn": {
            "type": "integer",
            "minimum": 0
          },
          "lost": {
            "type": "integer",
            "minimum": 0
          },
          "goals_for": {
            "type": "integer",
            "minimum": 0
          },
          "goals_against": {
            "type": "integer",
            "minimum": 0
          },
          "goal_difference": {
            "type": "integer"
          },
          "points": {
            "type": "integer"
          },
          "points_adjustment": {
            "type": "integer"
          },
          "ranking_status": {
            "type": "string",
            "enum": [
              "resolved",
              "pending_resolution"
            ]
          }
        },
        "required": [
          "team_id",
          "team_display_name",
          "team_slug",
          "position",
          "played",
          "won",
          "drawn",
          "lost",
          "goals_for",
          "goals_against",
          "goal_difference",
          "points",
          "points_adjustment",
          "ranking_status"
        ]
      },
      "AdminTournamentPhaseGroupTeamRow": {
        "type": "object",
        "properties": {
          "team_id": {
            "type": "string",
            "format": "uuid"
          },
          "team_display_name": {
            "type": "string",
            "minLength": 1
          },
          "team_slug": {
            "type": "string",
            "minLength": 2,
            "maxLength": 64,
            "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
          },
          "membership_revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "assigned_at": {
            "type": "string",
            "format": "date-time"
          },
          "match_count": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "team_id",
          "team_display_name",
          "team_slug",
          "membership_revision",
          "assigned_at",
          "match_count"
        ]
      },
      "AdminTournamentPhaseGroupRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tournament_id": {
            "type": "string",
            "format": "uuid"
          },
          "phase_id": {
            "type": "string",
            "format": "uuid"
          },
          "label": {
            "type": "string",
            "minLength": 1
          },
          "order_index": {
            "type": "integer",
            "minimum": 0
          },
          "match_count": {
            "type": "integer",
            "minimum": 0
          },
          "teams": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "team_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "team_display_name": {
                  "type": "string",
                  "minLength": 1
                },
                "team_slug": {
                  "type": "string",
                  "minLength": 2,
                  "maxLength": 64,
                  "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
                },
                "membership_revision": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "assigned_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "match_count": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "required": [
                "team_id",
                "team_display_name",
                "team_slug",
                "membership_revision",
                "assigned_at",
                "match_count"
              ]
            }
          },
          "standings_state": {
            "type": "string",
            "enum": [
              "projected",
              "no_teams_assigned",
              "no_official_match",
              "not_applicable_for_kind"
            ]
          },
          "standings": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "team_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "team_display_name": {
                  "type": "string",
                  "minLength": 1
                },
                "team_slug": {
                  "type": "string",
                  "minLength": 2,
                  "maxLength": 64,
                  "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
                },
                "position": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "played": {
                  "type": "integer",
                  "minimum": 0
                },
                "won": {
                  "type": "integer",
                  "minimum": 0
                },
                "drawn": {
                  "type": "integer",
                  "minimum": 0
                },
                "lost": {
                  "type": "integer",
                  "minimum": 0
                },
                "goals_for": {
                  "type": "integer",
                  "minimum": 0
                },
                "goals_against": {
                  "type": "integer",
                  "minimum": 0
                },
                "goal_difference": {
                  "type": "integer"
                },
                "points": {
                  "type": "integer"
                },
                "points_adjustment": {
                  "type": "integer"
                },
                "ranking_status": {
                  "type": "string",
                  "enum": [
                    "resolved",
                    "pending_resolution"
                  ]
                }
              },
              "required": [
                "team_id",
                "team_display_name",
                "team_slug",
                "position",
                "played",
                "won",
                "drawn",
                "lost",
                "goals_for",
                "goals_against",
                "goal_difference",
                "points",
                "points_adjustment",
                "ranking_status"
              ]
            }
          }
        },
        "required": [
          "id",
          "tournament_id",
          "phase_id",
          "label",
          "order_index",
          "match_count",
          "teams",
          "standings_state",
          "standings"
        ]
      },
      "AdminTournamentPhaseRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tournament_id": {
            "type": "string",
            "format": "uuid"
          },
          "label": {
            "type": "string",
            "minLength": 1
          },
          "kind": {
            "type": "string",
            "enum": [
              "group_stage",
              "league",
              "knockout",
              "placement"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "active",
              "closed"
            ]
          },
          "order_index": {
            "type": "integer",
            "minimum": 0
          },
          "starts_on": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "ends_on": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "supports_groups": {
            "type": "boolean"
          },
          "match_count": {
            "type": "integer",
            "minimum": 0
          },
          "groups": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "tournament_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "phase_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "label": {
                  "type": "string",
                  "minLength": 1
                },
                "order_index": {
                  "type": "integer",
                  "minimum": 0
                },
                "match_count": {
                  "type": "integer",
                  "minimum": 0
                },
                "teams": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "team_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "team_display_name": {
                        "type": "string",
                        "minLength": 1
                      },
                      "team_slug": {
                        "type": "string",
                        "minLength": 2,
                        "maxLength": 64,
                        "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
                      },
                      "membership_revision": {
                        "type": "integer",
                        "exclusiveMinimum": 0
                      },
                      "assigned_at": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "match_count": {
                        "type": "integer",
                        "minimum": 0
                      }
                    },
                    "required": [
                      "team_id",
                      "team_display_name",
                      "team_slug",
                      "membership_revision",
                      "assigned_at",
                      "match_count"
                    ]
                  }
                },
                "standings_state": {
                  "type": "string",
                  "enum": [
                    "projected",
                    "no_teams_assigned",
                    "no_official_match",
                    "not_applicable_for_kind"
                  ]
                },
                "standings": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "team_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "team_display_name": {
                        "type": "string",
                        "minLength": 1
                      },
                      "team_slug": {
                        "type": "string",
                        "minLength": 2,
                        "maxLength": 64,
                        "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
                      },
                      "position": {
                        "type": "integer",
                        "exclusiveMinimum": 0
                      },
                      "played": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "won": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "drawn": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "lost": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "goals_for": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "goals_against": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "goal_difference": {
                        "type": "integer"
                      },
                      "points": {
                        "type": "integer"
                      },
                      "points_adjustment": {
                        "type": "integer"
                      },
                      "ranking_status": {
                        "type": "string",
                        "enum": [
                          "resolved",
                          "pending_resolution"
                        ]
                      }
                    },
                    "required": [
                      "team_id",
                      "team_display_name",
                      "team_slug",
                      "position",
                      "played",
                      "won",
                      "drawn",
                      "lost",
                      "goals_for",
                      "goals_against",
                      "goal_difference",
                      "points",
                      "points_adjustment",
                      "ranking_status"
                    ]
                  }
                }
              },
              "required": [
                "id",
                "tournament_id",
                "phase_id",
                "label",
                "order_index",
                "match_count",
                "teams",
                "standings_state",
                "standings"
              ]
            }
          }
        },
        "required": [
          "id",
          "tournament_id",
          "label",
          "kind",
          "status",
          "order_index",
          "starts_on",
          "ends_on",
          "supports_groups",
          "match_count",
          "groups"
        ]
      },
      "AdminTournamentPhaseStructure": {
        "type": "object",
        "properties": {
          "tournament_id": {
            "type": "string",
            "format": "uuid"
          },
          "unassigned_team_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "phases": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "tournament_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "label": {
                  "type": "string",
                  "minLength": 1
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "group_stage",
                    "league",
                    "knockout",
                    "placement"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "draft",
                    "active",
                    "closed"
                  ]
                },
                "order_index": {
                  "type": "integer",
                  "minimum": 0
                },
                "starts_on": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "ends_on": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "supports_groups": {
                  "type": "boolean"
                },
                "match_count": {
                  "type": "integer",
                  "minimum": 0
                },
                "groups": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "tournament_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "phase_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "label": {
                        "type": "string",
                        "minLength": 1
                      },
                      "order_index": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "match_count": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "teams": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "team_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "team_display_name": {
                              "type": "string",
                              "minLength": 1
                            },
                            "team_slug": {
                              "type": "string",
                              "minLength": 2,
                              "maxLength": 64,
                              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
                            },
                            "membership_revision": {
                              "type": "integer",
                              "exclusiveMinimum": 0
                            },
                            "assigned_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "match_count": {
                              "type": "integer",
                              "minimum": 0
                            }
                          },
                          "required": [
                            "team_id",
                            "team_display_name",
                            "team_slug",
                            "membership_revision",
                            "assigned_at",
                            "match_count"
                          ]
                        }
                      },
                      "standings_state": {
                        "type": "string",
                        "enum": [
                          "projected",
                          "no_teams_assigned",
                          "no_official_match",
                          "not_applicable_for_kind"
                        ]
                      },
                      "standings": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "team_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "team_display_name": {
                              "type": "string",
                              "minLength": 1
                            },
                            "team_slug": {
                              "type": "string",
                              "minLength": 2,
                              "maxLength": 64,
                              "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
                            },
                            "position": {
                              "type": "integer",
                              "exclusiveMinimum": 0
                            },
                            "played": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "won": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "drawn": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "lost": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "goals_for": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "goals_against": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "goal_difference": {
                              "type": "integer"
                            },
                            "points": {
                              "type": "integer"
                            },
                            "points_adjustment": {
                              "type": "integer"
                            },
                            "ranking_status": {
                              "type": "string",
                              "enum": [
                                "resolved",
                                "pending_resolution"
                              ]
                            }
                          },
                          "required": [
                            "team_id",
                            "team_display_name",
                            "team_slug",
                            "position",
                            "played",
                            "won",
                            "drawn",
                            "lost",
                            "goals_for",
                            "goals_against",
                            "goal_difference",
                            "points",
                            "points_adjustment",
                            "ranking_status"
                          ]
                        }
                      }
                    },
                    "required": [
                      "id",
                      "tournament_id",
                      "phase_id",
                      "label",
                      "order_index",
                      "match_count",
                      "teams",
                      "standings_state",
                      "standings"
                    ]
                  }
                }
              },
              "required": [
                "id",
                "tournament_id",
                "label",
                "kind",
                "status",
                "order_index",
                "starts_on",
                "ends_on",
                "supports_groups",
                "match_count",
                "groups"
              ]
            }
          }
        },
        "required": [
          "tournament_id",
          "unassigned_team_ids",
          "phases"
        ]
      },
      "AdminTournamentPhaseCreate": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "kind": {
            "type": "string",
            "enum": [
              "group_stage",
              "league",
              "knockout",
              "placement"
            ]
          },
          "order_index": {
            "type": "integer",
            "minimum": 0,
            "maximum": 64
          },
          "starts_on": {
            "oneOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ]
          },
          "ends_on": {
            "oneOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "label",
          "kind"
        ]
      },
      "AdminTournamentPhaseUpdate": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "order_index": {
            "type": "integer",
            "minimum": 0,
            "maximum": 64
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "active",
              "closed"
            ]
          },
          "starts_on": {
            "oneOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ]
          },
          "ends_on": {
            "oneOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": []
      },
      "AdminTournamentPhaseGroupCreate": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "order_index": {
            "type": "integer",
            "minimum": 0,
            "maximum": 64
          }
        },
        "required": [
          "label"
        ]
      },
      "AdminTournamentPhaseGroupUpdate": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "order_index": {
            "type": "integer",
            "minimum": 0,
            "maximum": 64
          }
        },
        "required": []
      },
      "AdminTournamentPhaseGroupTeamAssign": {
        "type": "object",
        "properties": {
          "team_id": {
            "type": "string",
            "format": "uuid"
          },
          "action": {
            "type": "string",
            "enum": [
              "add",
              "remove"
            ]
          },
          "reason": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1000
          },
          "effective_from_round_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "team_id",
          "action",
          "reason"
        ]
      },
      "EvaluationAuthorityV2": {
        "type": "object",
        "required": [
          "version",
          "scope",
          "designation",
          "match",
          "rubric",
          "participation",
          "window",
          "can_submit",
          "reason",
          "recovery"
        ],
        "properties": {
          "version": {
            "type": "integer",
            "enum": [
              2
            ]
          },
          "scope": {
            "type": "object",
            "required": [
              "tenant_id",
              "match_id",
              "evaluator_user_id"
            ]
          },
          "designation": {
            "type": "object",
            "required": [
              "state",
              "assignment_id"
            ]
          },
          "match": {
            "type": "object",
            "required": [
              "state",
              "match_state"
            ]
          },
          "rubric": {
            "type": "object",
            "required": [
              "state",
              "revision_id"
            ]
          },
          "participation": {
            "type": "object",
            "required": [
              "state",
              "revision"
            ]
          },
          "window": {
            "type": "object",
            "required": [
              "state",
              "opens_at",
              "closes_at",
              "server_time"
            ],
            "properties": {
              "state": {
                "type": "string",
                "enum": [
                  "open",
                  "closed",
                  "not_configured"
                ]
              }
            }
          },
          "can_submit": {
            "type": "boolean"
          },
          "reason": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "assignment_not_confirmed",
                  "match_not_post_match",
                  "evaluation_ruleset_not_published",
                  "evaluation_not_required_for_competition",
                  "participation_not_complete",
                  "evaluation_window_not_configured",
                  "evaluation_window_closed",
                  "report_version_not_available",
                  "evaluation_batch_v2_not_supported"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "recovery": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      }
    },
    "securitySchemes": {
      "ApiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-LC8-Api-Key",
        "description": "Tenant-bound API key. Scopes are enforced server-side. Public widget keys may only carry read:public.* scopes."
      },
      "Bearer": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "User session token. Issued by the auth service (P03)."
      }
    }
  }
}
